• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejb3unit

 
Bil Bob
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone here have experience, good or bad, with ejb3unit? would you recommend it?

Thanks
Billy
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dave Wiesemeyer
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sarah otter
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know if EJB3Unit supports Message Driven Bean (MDB) testing?

Thanks,
--Z
 
Amritendu De
author
Ranch Hand
Posts: 188
11
Java Oracle
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic