-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testability and "Wait, it broke again?" #872
Comments
I have never worked in the game industry, and game testing is something that I'd really like to know more about. My current knowledge of game testing is that it's relatively hard to automate testing for anything other than pure functions, at least without a custom library specifically for testing the game. There's also automated screenshot testing (like Dolphin's testing pipeline), which compares the game pixel-by-pixel at certain key moments. But most testing is relegated to human QA testers who deal with the brunt of testing objectives. It would probably be beneficial to start with a black-box test for critical paths - start a server, have the client connect, click a character button on the grid, try to write/send evidence, etc. No need to expose the courtroom.cpp mess - just as long as all of the widgets are well-named, seems like that's all that's needed for testing. |
A blackbox approach can work, but there are some questions left unanswered : If we were to join a server, we would either need a way to host it in an action or someone needs to perma-host one, which in turn would also cause it to be a target for A white box approach would help us test segments, but as your fairly pointed out there are some (almost all) segments that are not testable on an individual scale. |
This should work perfectly fine. Actions instances should allow listening on the loopback interface. Heck, I'm pretty sure you can run containers (Docker, Podman) inside Actions and they will work just fine. |
After some research if found this article on Github about service containers : https://docs.github.com/en/actions/using-containerized-services/about-service-containers If we containerise a test AO2-Server we should be able to do black-box testing on connectivity and handshake behaviour, etc without needing a fully-fledged external AO2 server. |
Testability is the hallmark of great software. Given we use Github Actions to get quick feedback on build errors on all platforms, it is only natural that we should consider the extra mile and start rewriting code with testability in mind.
Sadly, after reading through the major classes, it becomes obvious that AO2-Client has become so tightly woven that many features are not testable without a lot of overhead and hackery to get QTest to be able to properly test each individual segment, meaning we would spend a lot of time writing tests that may break simply due to some minor aspect changing and without an easy way to properly locate what exactly broke.
Moving forward contributions should be evaluated on grounds of testability as well to ensure that new code can be verified using a testing library of our choice to stop the guessing game of what broke this random feature today.
The text was updated successfully, but these errors were encountered: