Testing


Aside from manual testing (which are recorded in Experimental Log) we've conducted automated unit testing on our backend.

Unity provides a collection of testing tools that allow us to do unit, integration and assertion testing. However, we mostly used integration testing for our PoC as it is commonly done in Unity because unit testing is too low level and there are plugins/assets that do unit testing automatically for us. Integration testing allows us to test multiple objects interaction in the same scene and requires little to no coding and everything is done in a separated test scene independently, meaning in each test the scene will be cleaned up before they take place. This testing is done for user interaction with the AR element which in our case, user opening and closing the chest.

Vuforia is a very powerful AR development platform meaning it comes with the cutting edge and reliable image recognition algorithm. We tested different types of images (different colour and pattern) as the “Image Target” and the app never fails to recognise the image regardless of the surface. This was the most authentic form of testing because it gave us a true idea of how the app works on a real device.

Unit Testing

At the launch of the application, Django runs a couple of unit tests(test at the atomic-level, which is functions in this instance) to verify the that the server runs properly and returns an expected result. There are tests that are run at certain levels:

  • First of all, on request level. Django is able to simulate the requests to the server(just like how an app would do). It runs a get request to obtain the test area-code and the test user account. Also, it runs a post method to create a new area-code, which gets deleted in the later stage.

  • Second of all, on functions level. Django recommends the use of unittest module in python, and it is used with assertions in the tests to ensure that the functions do not crash. Examples include management of the models, such as retrieving and editing.

  • Last of all, on script level. This test ensures that the backup script and continuous integrations scripts are running properly, and appropriate number of backups have been created. On testing server, scripts restore the database to the latest original state, and the server checks if there’s any fault in the database, by using tests discussesd above.

These tests are done automatically, and a single failure of the tests will prevent the server from being launched, and reports the failure to the developers via email.

Vuforia has got many sample applications demonstrating its capability. From reading the sample apps and Unity tutorials, we’ve made a few simple interactions such as image recognition, user defined targets recognition, markerless augmented reality and text recognition.

Below is a document containing the test cases we carried out on our final system along with their respective results:

Below are screenshots of the HCI of the PoC. (From left to right: Login page, facing camera to advertisement, clicking on the AR object, rewards page)