Open farooqkz opened 1 year ago
If we really do that, we might need a way to interact with the Minetest client engine. I am thinking a hacked client, combined with a headless Xorg server, but if Minetest Engine itself can make some shared libraries for building a test client, it would be better.
headless clients exist, but it's not really possible for testing code to do any more than the developer just testing their code locally
headless clients exist, but it's not really possible for testing code to do any more than the developer just testing their code locally
That's exactly the point. We make some common tests automatic. Therefore we can know about the PRs and the master/main branch that certain things work for sure without having to test the PRs ourselves.
If you make a PR you should test it. I don't want to allow bad habits to form
If you make a PR you should test it. I don't want to allow bad habits to form
Yeah and if I don't test it, the merging will be blocked. As a usage example.
Yeah and if I don't test it, the merging will be blocked. As a usage example.
There's no point in the suggested automated testing in that case then
Yeah and if I don't test it, the merging will be blocked. As a usage example.
There's no point in the suggested automated testing in that case then
I don't understand. Can you elaborate on your point? My point is that, like any other program, this game could have unit tests and use Actions+Headless client to enforce them.
I'd prefer to have code documentation before we start doing unit tests https://github.com/MT-CTF/capturetheflag/blob/master/docs/ctf-api.md
We could possibly check if the code works upon launch by launching a test server(in Github Actions?)
Additionally, we could possibly check if various aspects of the game works. Not sure what is the best way for this. One way is launching a test server and connecting a test client which does somethings. Like throwing grenade to see if the grenade can be thrown without a crash. In other words, we can write test cases for the game.