Test Plan

Part 1: 

What our test plan would look like if we had enough time:

  • Unit testing
    • We would use Jest, a JavaScript testing framework for our unit testing. The ts-jest module allows us to use Jest with our TypeScript app. 
    • Test FirebaseAuth
    • Test Firestore CRUD methods
      • Create games
      • Create users
      • Create teams
      • Read games
      • Read specific game
      • Read users
      • Read teams
      • Update games
      • Update users
      • Update teams
      • Delete games
      • Delete users
      • Delete teams
  • System/Integration testing 
    • For these we will ensure the data that is in our Firestore database is being displayed in real time by the front end
  • Tools used
    • VScode as an IDE
    • Firebase for backend as a service
    • Expo for UI testing and deployment
    • ESLint for linting
    • TypeScript for type checking
    • Jest for unit testing
    • React Native Testing Library
  • Types of users
    • Admin
      • The admin user is a user who works for the event owner that manages the behavior of the game such as questions, the timing, and point values
    • Player
      • The player user plays games in order to win redeemable rewards at eligible FanzPlay partners
  • Usability testing
    • We will go through all possible navigation paths to ensure page transitions are functional, and test on android and iOS to ensure usability for cross platform users.
  • Performance testing
    • Firebase console’s app metric dashboard along with in-app monitoring that tracks delays in data requests
    • In the future, FanzPlay must be able to run with thousands of users at the same time. We can use tools like Firebase Performance Monitoring to identify and monitor any performance issues we may encounter. Firebase Performance Monitoring would allow us to monitor the network, HTTP/S network requests, start-up and rendering times, and crashes. 
  • Acceptance testing
    • Our client will review the app’s functionality and features to assess whether it meets the expected requirements. This is something we have been iteratively doing throughout the semester to receive incremental feedback as we develop and change features

Part 2:

What our testing will realistically look like given our time constraints:

  • Unit testing
    • We would use Jest, a JavaScript testing framework for our unit testing. The ts-jest module allows us to use Jest with our TypeScript app. 
    • Test FirebaseAuth
    • Test Firestore CRUD methods
      • Create games
      • Create users
      • Create teams
      • Read games
      • Read specific game
      • Read users
      • Read teams
      • Update games
      • Update users
      • Update teams
      • Delete games
      • Delete users
      • Delete teams
  • Acceptance testing
    • Our client will review the app’s functionality and features to assess whether it meets the expected requirements. This is something we have been iteratively doing throughout the semester to receive incremental feedback as we develop and change features
  • System/Integration testing 
    • We manipulated data in the Firestore database to ensure data is being displayed in real time by the front end
  • Tools used
    • VScode as an IDE
    • Firebase for backend as a service
    • Expo for UI testing and deployment
    • ESLint for linting
    • TypeScript for type checking
    • Jest for unit testing
    • React Native Testing Library

While our realistic test plan may not provide the comprehensive coverage our ideal plan does, this plan still ensures all the necessary components of our application are functioning as expected. Unit and acceptance testing are prioritized in order to ensure both the best experience for the user, but also client satisfaction with the product.

Testing our Code

The testing is done inside the test folder in our GitHub repo.

This app has unit testing for our database operations. To test our Firestore database functionality, we use a Firestore Emulator. This emulator allows us to test without worrying about modifying our live database.

Prerequisites (one time setup):

  1. Ensure you are an editor or owner for the FanzPlay (if you do not have access, request access by emailing brennamehl@gmail.com and sharing the Google account you would like to use).
  2. Ensure your Node.js version is >=18.0.0 || >=20.0.0
  3. Install Firebase CLI: npm install -g firebase-tools
  4. Install all project dependencies (including testing modules): npm install

Initialize the Emulator (one time setup):

  1. In the terminal, login to Firebase: firebase login
  2. Initialize Firebase: firebase init
  3. Select firestore and emulators
  4. Select use an existing project
  5. Choose fanzplay-6229f
  6. Choose Firestore Emulator
  7. Use default port
  8. Select download now

Launch Emulator and Run Tests:

  1. In a terminal, login to Firebase: firebase login
  2. Start emulators: firebase emulators:start
  3. Open a separate terminal and run the tests: npm test
  4. Restart the emulators each time you test