Is there a Java library for testing command line applications? JUnit seems to work well for unit tests, but I'm not interested in unit tests, I want to test and entire command line application as a black box.
I have created a text-based adventure game project for my students and I am trying to build an auto-grader. I do not have any web infrastructure and I would prefer to just creating a local application to test students' submissions. I also would like it to be easy enough to students to use to check their work (JUnit doesn't seem to be easily usable outside of an IDE).
I am looking to create a program that will attempt to compile a students code and run the game through all the possible paths. I could just build something like this from scratch, but I feel like there should already be some kind of framework to make handling test cases and printing results easy. I haven't found anything outside of web-based services, which isn't what I'm looking for.
Is there any library to help with this, or am I better off just making my own grader from scratch?
There is expect. It is designed to test interactive command-line systems. For non-interactive programs it is easier.
expect is not java, but as pointed out in the comments. The language is irrelevant, as the testing is done from the outside.