-
Notifications
You must be signed in to change notification settings - Fork 1
Testing Strategies
The general test plan for the project includes the following testing strategies:
-
Unit Testing: Individual components will be tested in isolation as they are being developed to ensure they function as expected. Mock data will be used to simulate external dependencies where necessary.
-
Integration Testing: The interaction between different modules and components will be tested to verify their proper integration and ensure data flows correctly across the system with mock data. This testing will be implemented as two features that interact with each other is developed.
-
Mock Data: Mock data will be used during testing to simulate real-world inputs and edge cases, ensuring the application performs as expected under various scenarios.
-
Regression Testing: After each change to the main branch, existing features will be re-tested to ensure new modifications don’t negatively affect the system.
-
End-to-End Testing: Complete workflows will be tested from start to finish in the last weekend of the last Customer Demo to ensure the product functions as a whole in real-life usage scenarios.
-
Performance Testing: The system's and external API's responsiveness and stability will be evaluated under load to ensure scalability and reliability.
This strategy aims to ensure comprehensive coverage and quality assurance at all levels of the development cycle.
Unit tests are widely used for almost every endopoint we have implemented. For most of the endpoints, we write the unit test after the implementation of that endpoint, which is a very straightforward method. On the other hand, for a few endpoints we have tried to write the tests before the implementation, resulting in test driven implementation. Both methods have been helpful in testing and developing safe endpoints.
The tests can be found under ./backend/core/tests
Integration tests are a crucial step in our testing strategy. While unit tests focus on individual components or functions, integration tests verify that multiple components work together as expected. For our endpoints, integration tests ensure seamless interaction between various modules of the backend and, where applicable, the database or external services.
UAT (User Acceptance Tests) are the final step for the testing phase for each endpoint. After the implementation and integration of each endpoint, we have tested if they serve their purpose as expected. We approach as a user to test the application if everything works as intended.
Unit tests are only effective in areas without dependencies on external systems. Since most frontend functionality is tightly coupled with either the server or browser APIs, we focused on testing vanilla TypeScript utilities, such as relative date calculations, number differences, pluralization, and similar isolated functions.
We have chosen Vitest as our testing framework because it is versatile and built on top of our module bundler, Vite. Its clear and intuitive API, combined with its seamless integration with our existing tools, makes it a great choice.
The tests can be found under ./client/src/tests
As stated in the frontend section; the unit tests are only effective in areas without dependencies on external systems and since most mobile functionality is tightly coupled with either the server or browser APIs, we focused on testing vanilla TypeScript utilities, namely a function combining the different types of hints fetched from the backend.
The tests can be found under ./mobile/app/tests
Here is a sample test result from the CLI using Vitest:
Turquiz App
DONE
- Lab Report #1
- Lab Report #2
- Lab Report #3
- Lab Report #4
- Lab Report #5
- Lab Report #6
- Lab Report #7
- Lab Report for Lab 9
- Lab Meeting #1
- Meeting #1
- Lab Meeting #2
- Meeting #2
- Project Plan Meeting
- Frontend Meeting #1
- Lab Meeting #3
- Meeting #3
- Meeting #4
- Lab Meeting #4
- Meeting #5
- Meeting #6
- Meeting #7
- Meeting #8
- User Scenario 1 - Explore and Register
- User Scenario 2 - Search for a Quiz & Create a Quiz
- User Scenario 3 - Take & Review a Quiz
- User Scenario 4 - Search Forum & Bookmark & Upvote & Answer
- User Scenario 5 - User Badges
- User Scenario Template
- User Stories