Hey
How are u guys writing tests for your RPCs?
Has anyone given nktest a go and got it working?
In our game, we are approaching to testing with different manner. Since we are using lua for scripting i have made a whole testing environment for nakama in ZeroBraneEditor, and what we can do, we can pretty much mock everything or execute whole logic without the need of turning on servers or running clients. However in clients we do need to run different kind of tests for animation and are packets correctly parsed/received and is game state same as server one.
If we want to test scripts with real data, all we need to do is export database as csv and import it in testing framework.
And example to testing a rpcs is something like this:
As for match/logic, it is same, use users, create match instance and then do the calls.
Some drawbacks in this approach:
I see, I wanted to try and keep everything in Go, otherwise I would probably resort to js and do something similar to you ye.