I am relatively new to game development and I am wondering how to write regression test-cases. Usually I write test-cases in parallel to the development of software, so that new commits do not break the functionality. Typically in past the input and output of my program used to be a file. So I used to make an input file, gold file, and run the program to get output file and compare it with gold file. There were many such test-cases. But output of jme is sort of video. How to make test-cases in this scenario?
You can’t properly. You can see if some graphics call actually crashes but you will need somebody to look at the image to see if the output is correct. If the output is actually static you might be able to do an in-memory render and compare it to a saved image but for things like animation or anything thats more than one static image you’re pretty much at a loss. Thats why we don’t have any unit tests btw.
You can still use unit tests to check your algorithms and data structures - rendering is only the last step of the process.
If you’re doing a web application, I don’t think you’re actually comparing the result HTML file to your gold HTML file, right?
@Momoko_Fan said: You can still use unit tests to check your algorithms and data structures - rendering is only the last step of the process. If you're doing a web application, I don't think you're actually comparing the result HTML file to your gold HTML file, right?
No, but for rendering a html page you don’t have 60% of the relevant stuff happening in a separate memory and processor either. For checking if a web site works on a certain browser you still need to use that browser and look at the result. Same here.
And note: OP was not talking about unit tests (and neither is normen really) but now somehow we are mixing discussion topics.