- Overview
- Frontend Tests
- Cross-Platform Tests
- Stress Tests
- Link to Videos and Reports
- Link to Final Testing Document
Welcome to the Qwitter Testing repository! This repository contains testing scripts for frontend, cross-platform, and stress tests for the backend of the Qwitter application. The testing suite is designed to ensure the robustness and reliability of the application across different layers.
The frontend tests in this repository are written using Cypress, a powerful end-to-end testing framework. To run the frontend tests, follow these steps:
- Open a terminal window.
- Navigate to the
/Web
directory of this repository:cd Web
. - Run
npm i
to install all required packages. - Run the command:
npx cypress open
to open the Cypress GUI. - Click on E2E tests, then choose your preferred browser to run tests inside.
- Alternatively, you can run the tests headless using
npx cypress run
.
The cross-platform tests in this repository are written using Appium in JavaScript. To run the tests, follow these steps:
- Ensure you have an android device running in an emulator like the Android Emulator in Android Studio.
- Open the Appium Desktop app and start a new server. Configure it with port number
4724
and make sure to allow CORS. - Start the server and navigate to the appium inspector.
- Configure the appium inspector with your desired capabilities. These will look something like this:
{ "platformName": "Android", "appium:deviceName": <DeviceName>, "appium:platformVersion": <AndroidVersion>, "appium:app": <PathToYourApp>, "appium:automationName": "UIAutomator2" }
- Start the session
- Navigate to the
/Mobile
directory of this repository:cd Mobile
. - Run
npm i
to install all required packages. - Run
npx wdio --spec <PathToYourSpec>
to run a test. - Make sure to run the script
kill-port.bat
after any test you run to kill the process running on port4723
The stress tests in this repository are written using k6. To run the stress tests, follow these steps:
- Navigate to the
/Stress
directory of this repository:cd Stress
. - Run
npm i
to install all required packages. - Create a
config.js
file and configure it with your fixture data. - Run
k6 run <PathToYourSpec>
to run a stress test. - These tests can be configured to run in a docker container and we can use grafana/influxdb for visualizations.
- To do so, first run
docker-compose up -d influxdb grafana
- Then run
docker-compose run k6 run <PathToYourSpec>
to run the spec file inside the docker container. - You can now navigate to
localhost:3000
to view live metrics of the stress test. - Please ensure that you have Docker and k6 installed on your machine before running the stress tests.