File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Testing and the fly likes ejb3unit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "ejb3unit" Watch "ejb3unit" New topic
Author

ejb3unit

Bil Bob
Ranch Hand

Joined: Dec 24, 2004
Posts: 36
Does anyone here have experience, good or bad, with ejb3unit? would you recommend it?

Thanks
Billy


SCJP, SCWCD, SCBCD, almost SCEA<br />... and a real developer too ;)
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I haven't used ejb3unit but it looks like it has potential.

Having said that, I'd also like to point out (like I do in my book) that unit testing EJB 3.0 session beans is so straight-forward that you don't necessarily need third party tools for that.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Dave Wiesemeyer
Greenhorn

Joined: Sep 14, 2007
Posts: 2
We are using Ejb3Unit (Ejb3Unit) it in our project (150 devs.) and it's pretty stable, bug fixes are fixed quickly. Without Ejb3Unit the testing ouf our Ejb3 based infrastructure would be very painful (in container frameworks like cactus are too time consuming) - i think it' great framework -
Dave Wiesemeyer
Greenhorn

Joined: Sep 14, 2007
Posts: 2
Hey Lasse,
especially to test Session beans Ejb3Unit has grat support because it supports Ejb3 dependency injection. You can inject Mock objects (for unit testing) or "real" objects (other Session beans, Entity manager, Datasources) for integration testing.
Reg. Dave
Viggo Navarsete
Ranch Hand

Joined: Feb 02, 2009
Posts: 42
Has anyone been able to specify another date format for the CSV file? (I'm using ejb3unit 2.0.0-SNAPSHOT). The class CSVInitialDataSet should have a method called addDateFormat so that you can specify your own date format when working on test data, but I'm not able to find the method in the class. Anyone?
Nuwan Bnadara
Greenhorn

Joined: Mar 05, 2009
Posts: 4
Dave Wiesemeyer wrote:We are using Ejb3Unit (Ejb3Unit) it in our project (150 devs.) and it's pretty stable, bug fixes are fixed quickly. Without Ejb3Unit the testing ouf our Ejb3 based infrastructure would be very painful (in container frameworks like cactus are too time consuming) - i think it' great framework -


Nice to hear that your are using EJB3Unit. I've also done a RND on this. Can you tell me for what sort of tests cab be carried out in Entity and Session beans? If you can please name few test cases. Thanks
Don Heninger
Greenhorn

Joined: Jan 31, 2003
Posts: 5
Does anyone have a good example of using the ejb3unit_jndi stuff?

I need to get a bunch of session beans loaded up so I can inject them as required.

Thanks in advance.


SCJP<br />Admin IBM WebSphere 4.0 AE
sarah otter
Greenhorn

Joined: Jun 30, 2009
Posts: 1
You can set the date format for ejb3unit like this:

private static final CSVInitialDataSet CSV_SET_FOO =
new CSVInitialDataSet<Foo>(
Foo.class,
"tableFoo.csv",
"idCol", "dateCol", "language");


static {
DateFormats.USER_DATE.setUserDefinedFomatter("yyyy-MM-dd");
CSV_SET_MELDUNG.addDateFormat(DateFormats.USER_DATE);
}
Zemian Deng
Greenhorn

Joined: Jun 12, 2007
Posts: 21
Does anyone know if EJB3Unit supports Message Driven Bean (MDB) testing?

Thanks,
--Z
Amritendu De
author
Ranch Hand

Joined: Feb 21, 2009
Posts: 128
    
    6

Check this out for EJB unit testing: http://amritendude.blogspot.in/2012/07/unit-testing-ejb-30-and-jpa-20.html

Senior Architect (SCEA 5, TOGAF 9, IBM OOAD, PMI certified)
[Spring 4 and Hibernate 4: Agile Java Design and Development] [OCMJEA Practice Guide] [OCA Java SE-7 and SE-6 Practice Exams]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ejb3unit