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.
4
votes
we use JUnit for a lot of different tests, not just "unit tests". In a way unit tests are "cute" but using JUnit to verify, for example, that a complicated output is correct based on huge inputs (like a directory containing files and files) does just so much more than a unit test. It's not because JUnit is mostly for unit test than you can't use it for much more important tests.
– SyntaxT3rr0r
2 Answers
2
votes
1
votes
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/