Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

ejb3unit

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anyone here have experience, good or bad, with ejb3unit? would you recommend it?

Thanks
Billy
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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);
}
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anyone know if EJB3Unit supports Message Driven Bean (MDB) testing?

Thanks,
--Z
 
author
Posts: 188
11
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check this out for EJB unit testing: http://amritendude.blogspot.in/2012/07/unit-testing-ejb-30-and-jpa-20.html
 
Get off me! Here, read this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic