private Integer extractNumber(Path path){
                String name = path.getFileName().toString();
                int numStart = screenshotAppFileNamePrefix.length();
                int numEnd = name.lastIndexOf(".png");
                return Integer.parseInt(name.substring(numStart, numEnd));
            }
Boots up the application on a separate thread (blocks this thread) and then does the following:
- Takes screenshots on the requested frames
- After all the frames have been taken it stops the application
- Compares the screenshot to the expected screenshot (if any). Fails the test if they are different
jme3-screenshot-tests/src/main/java/org/jmonkeyengine/screenshottests/testframework/TestDriver.java