Best practice for acceptance tests in Java
We have a program that that we would like to do acceptance tests on it.
The input is an XML file 开发者_如何学编程with different "tasks". The output is another XML file with results. What would be the best practice to automate acceptance tests for it? We will probably have to store pairs of input and output files, run the program on the inputs and compare result to the provided outputs. Is Ant good for this task? Should the acceptance tests cover all corner cases, or only test that the functionality is in general working. Any other tips regarding acceptance tests in java would be appreciated.I think DDSteps will be a lot of help for this.
Some general tips
- Make sure that non technical people such as clients or business analysts understand the tests.
- Strive to organize your test suites well. Probably you could organize them per feature or functionality. Also try to separate tests for corner cases from the "normal" tests.
I think that XMLUnit can do diffing of XML files http://xmlunit.sourceforge.net/
精彩评论