Hi Jeff and team,
Thank you for writing the book!! I have enjoyed reading it. I have the task to create a functional test suite for an open source ERP (iDempiere). My first question is: “Is JUnit the correct testing tool for my needs?”. Here are the details/questions:
It is an OSGi application, this means that my test suite will be a plugin to a much bigger system. It also means that I need to execute my test via the ‘JUnit Plugin Test’. There does not seem to by much documentation about this concept.
All the tests will depend on an initialization of the system. Each initialization take about 2 second to create (load resources, populate context, create session, etc…). Even if you perform this process in a @BeforeClass method, each class will have a substantial overhead. Is there a tool/hook to initialize the system before the Test Suite is executed?
Just about everything functional task that happens results in a record created in the database. This also means that the test will assert against the existence and accuracy of these records.
The @Before of our functional test can be very involved. An extreme example would be to test an inventory replenish process where you need to create and process 2 Physical Inventory documents, 10 POs, 8 Material Receipts documents, 3 Invoice documents, Run the replenish process, then check to make sure all expected conditions (resulting records) are present and accurate. My gut tells me this violates some if not all the principles in your book; however, this test is very much needed as described.
My hope in writing this post is that you can quickly give me a go / no-go answer and potentially save me a lot of time in determining if JUnit is the right solution. Thank you for taking the time to read!!
Regards, Chuck Boecking www.chuckboecking.com email@example.com