- Quick, nothing fancy
- Include all functionalities
- Preferably fast to build
The image below shows a screenshot of the final test project, it consisted of a single page that contained all functionalities that had to be tested.
The test ‘game’ contained a button which could initialize CP Social after the game had been started to check the initialization and authentication of CP Social using a connected debugger, and the debug logs.
To check if CP Social would be running internally on the correct platform, the test project contained some easy to read label that would display what platform CP Social was initialized for internally. The app Id given to CP Social using the CP Social settings configured using the configurator.
The test project also would automatically show all the available user information after the authentication process would complete after initializing CP Social.
To test the achievement feature of CP Social, this test project contained a menu for unlocking and resetting an achievements using its universal reference name (explained in the ‘example’ here)
Cloud saving in the test project was done using a simple object containing the current date and in-game time that could be converted to JSON and saved and loaded to the cloud through CP Social’s cloud save service.
By using the current date and in-game time, it was possible to verify it has been saved an loaded correctly by comparing these values later on the the new current date and in-game time.
At the start of the realization phase I used the Unity test runner to test the steam implementations of CP Social. But when I started implementing the Android and iOS functionalities I found out that when trying to run the test for these platforms I had to create a build, copy it to a test device and then run the tests.
This process took quite a while and after a meeting with Martijn we decided skip the step of implementing test for these platforms and just use the test project itself to test CP Social features.