This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Invoking bean from JUnit Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "Invoking bean from JUnit" Watch "Invoking bean from JUnit" New topic
Author

Invoking bean from JUnit

Yan Lee
Ranch Hand

Joined: Sep 15, 2003
Posts: 94
Hi:
I have written a stateless session bean, created an ear and put deployed it on my server(Weblogic 7.0). I have written a stand-alone JUnit that invokes the ejb. What arguments do I have to pass along with the java command to run the JUnit?
Thanks in advance for the help.
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
There are multiple ways to run unit tests. You should consult the JUnit documentation for a listing of these. Personally, I usually use the Swing runner. If you're running the unit tests within your container that's a whole different story though. Check out your JUnit docs.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26192
    
  66

If you put a main method in your class, you can run the class without having to worry about any arguments.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Invoking bean from JUnit
 
Similar Threads
junit gui problem
JUnit for SCJD
EJB Testing using JUnit
Is it possible to start 20 Threads Simultaneosly under a JUnit TestCase
Help....Junit mocking problem