Unit Testing in Java EE

We are porting our application to the Java EE container and are looking for tools for unit testing (and integration testing) of our ported application. Our requirements include:

  • Special testing: the ability to run tests manually, on demand (for use by developers when developing code).
  • Batch testing: the ability to regularly run a large (and growing) test suite.
  • In-Container: integration tests that use EJBs as they are deployed in the container
  • Unit testing: class testing is not necessary within the EJB context
  • Nice to have: Easy to configure, integrates with ant / IDE
  • No need to test servlets / JSP - only POJO and EJB

What do you use to achieve testing in Java EE? What technologies / settings did you deploy?

My research has revealed cacti and JUnitEE: have you had success in setting them up?

+5
source share
2 answers

We use regular JUnit for unit tests and integration testing. We switch between them using the virtual machine argument and check the annotations of the tests for markers for direct and nasty. We have our own TestSuite class, although it finds and runs tests based on this information, since it was easier and less error prone than manually, which tests should be run.

Spring EJB ( ), - Eclipse.

JunitEE , JUnit . , IDE. , . , .

+1

JUnit (EE) - , ($ 100mil +), . , , , / .

, , JUnit. , , - , JUnit . , , JUnit . ~ 200 , .

, , , , .

+1

All Articles