D4: Test Plan

Actual Testing

Unit Testing

Realistically, we will use Jest and native JS to test components, state changes, and methods for the frontend. In Unity, we aim to test the C# scripts, especially for the methods which take in parameters and change gameObject variables. Therefore, Unity script unit tests will assess specific game mechanics, controls, and logic using the Unity Test Framework. Thorough documentation of test cases, resolutions, and weekly progress meetings will ensure a robust unit testing phase.

Integration Testing

The most effective form of integration testing for our app would be to allow users to test the Unity-React interactions to ensure that methods behave properly. Given the amount of time left in the semester, key objectives include validating data exchange, confirming cross-browser and cross-platform compatibility, and ensuring consistent user interface design. Thus, we will specifically test the “View Location” button through our integration tests, as this button triggers a cross-platform method between React and Unity. We will run integration tests by starting up the entire app, mimicking real user interactions, and monitoring processes from start to finish.

Performance and Reliability

One potential cause for concern as the app scales is how performance will be affected which, unsurprisingly, is negatively correlated with the resolution of the Unity model. With the resources currently at our disposal, we can test the performance of the app on computers with varying GPUs and RAM, ranging from an Intel-based Mac to a Windows laptop equipped with a RTX 2080 Ti. We can also test reliability with varying locations on and around campus, which will demonstrate the app’s ability to run on different connection speeds. Finally, we can contact the users in Nepal to run on a v0 of the app to verify that the most common end-user environment will work properly.

Acceptance Testing

We will manually test the features on the webpage ourselves to ensure that we have met our client’s requests before handing it off to her for her judgment. Some tasks that we would go through to verify proper functionality include: 

  • Navigating to the website using a link to view the model 
  • Verifying that A moves the screen left, D right, W in, and S out
  • Pressing the ESC key twice to make the cursor visible
  • Clicking anywhere in the model to hide the cursor 
  • Using the keypad to “drag” the model in any direction to have a complete 360-degree view
  • Navigating the model to identify the boxes that we have for each annotation
  • Clicking the ‘?’/help button on the upper right side of the screen to open the tutorial
  • Clicking the hamburger menu button to expand the annotation list 
  • Clicking the ‘>’ button to minimize the annotation list 
  • Clicking each annotation to expand its description
  • Clicking each annotation’s expanded view to minimize the description 
  • Clicking each annotation’s ‘VIEW’ button and verifying that the view of the model is adjusted to point to the box with the number associated with that annotation 
  • Verifying annotations with videos are linked to a video that is accessible/playable
  • Playing each video in the annotation sidebar to verify that it can be played in a minimized view 
  • Clicking the full-screen, pop-out, and picture-in-picture buttons behave as expected 

Given Infinite Time

Unit Testing

Our test plan covers functional, usability, performance, and compatibility testing for both the ReactJS frontend and the Unity game. Our main objective is to ensure the reliable functionality and performance of the application that combines a ReactJS frontend and a Unity game component. Some potential testable components include:

  • Verify all React components render correctly.
  • Ensure React state management functions as intended.
  • Test Unity game mechanics, scripts, and interactions.

Integration and System Testing (with UI)

We plan to utilize integration tests to manage the user experience between React and Unity in our app. A particularly important part of these tests will be communicating between React and Unity; integration testing will ensure that no data is lost for methods that translate data between platforms. We would ideally use e2e testing software to mimic user clicks and function calls in Unity, as well as Unity to React interactions such as clicking inside the game.

Performance and Reliability

With more time and resources, we would test the website on a more comprehensive range of computers and browsers to ensure that the model is truly accessible to all users. We would also evaluate how the website translates to smaller screen sizes since the model should ideally be accessible to anyone with a device that connects to the internet. Due to time constraints, limitations with the current model, and access to resources, we currently do not have the ability to extensively test a VR experience. Ideally, we would test the VR version of the model on a variety of VR headsets and ensure that the quality of the graphics and user mobility through the model is as expected. Users should be able to move freely as they would in the web browser version and have the ability to select and view annotations. 

Acceptance Testing

Given more time, we would have a more iterative testing process and a larger pool of testers. The idea is to hand the product to them and let them test the features: playing the game, opening the tutorial dialog, opening and closing the annotation list, clicking on the show location button, viewing videos, navigating the model according to realistic physical restrictions. With more people testing, we’ll have a better idea of if we’ve met our non-functional requirements, and we can more thoroughly test the functional features on a variety of devices. Additional user flows that we would test are: 

  • Clicking every key, in different combinations, and verifying that they produce the expected behavior (correct movement or lack of an error) 
  • Navigating all areas of the model to verify that users are not able to walk through walls/boundaries/the ground

While users are interacting with the model, we would also want to observe their natural behavior to see if users intuitively gravitate to certain areas of the website, are able to navigate the website independently (without our guidance), or are confused by other aspects including navigation of the model itself or design of the user interface. Following each test with each user, we would conduct a survey to receive additional feedback on improvements we could make. 

Tools

Jest is a JavaScript testing framework, widely used for testing JavaScript and React applications. Developed by Facebook, Jest is known for its simplicity and speed. It provides a test runner, assertion library, and mocking support out of the box, making it easy for developers to write and execute unit tests for their code. Jest is particularly popular in the React ecosystem but can be used for testing any JavaScript application. It emphasizes simplicity and aims to provide an integrated solution for testing that requires minimal configuration.

Unity Test Framework (UTF) is a testing framework designed for the Unity game development platform. Developed by Unity Technologies, it enables developers to create and execute tests to ensure the reliability and correctness of their game code. Some developer features for UTF include a Test Runner, Assertions, Play/Edit Mode Tests, and Mocking. 

End Users

Our end users include users of any web browser including Google Chrome, Safari, Firefox, and Microsoft Edge. These users should be able to operate the website on a variety of devices including different types of computers, tablets, and phones. Currently, the website is optimized for viewing on a laptop. Ideally, the website should be able to be viewed easily on smaller screen sizes. Our end users also include people who have access to a VR headset.