I have a Java program that has a command line interface using Commons CLI and processes an input file and writes an output file.
I use JUnit to test objects and their methods. However, I wonder if there is a possibility to test my whole compiled program with JUnit or any other way inside the tool rather than write an own test suite program as a seperate Java project.
What I would like to do:
- Load an input file
test.txtfrom a defined directory inside the Java project - Call the program:
java -jar -enableassertions MyTool.jar -i \Path\To\Test\test.txt - See if any errors or assertions are thrown
- Repeat this for multiple test input files
Aucun commentaire:
Enregistrer un commentaire