I have a web tool that, when requested, returns the generated Java classes based on the arguments in the URL.
The classes we retrieve from the web server change daily, and we need to make sure that they can still handle known inputs.
Please note that these classes do not test the web server, they run locally and convert xml to a custom format. I am not testing a web server.
Then these classes should be placed in a specific package structure, compiled and run with a known set of input data and compared with known output data.
I would like to do this automatically every night to make sure that the generated classes are correct.
What is the best way to achieve this?
In particular, what is the best way:
- get the code from the web server and put it in a file
- compile the code and then call it
I am sure that a combination of junit and ant can achieve this, but is there a standard solution / approach for this?
source
share