Welcome to the testing repository for Group 6. Below are the detailed instructions to perform both UI and API tests for the project. Follow each step carefully to ensure accurate results.
To run UI tests using Playwright and Cucumber, follow the steps below:
-
Navigate to the UI testing directory
cd .\ui-tesing-playwright\
This command moves you to the directory where the UI testing project is located.
-
Install project dependencies
npm i
This will install all the required Node.js modules listed in the
package.jsonfile. -
Install Playwright browsers
npx playwright install
This command downloads the necessary browsers for Playwright testing.
-
Run tests using Cucumber
npx cucumber-js test --format json:allure-results/results.jsonThis runs the UI test suite and generates results in a format compatible with Allure Reports.
-
Generate the Allure report
allure generate allure-results --clean
This creates a clean, comprehensive Allure report from the test results.
-
View the Allure report
allure open
This command launches the Allure report in your default web browser for detailed analysis.
To run API tests using Maven and Cucumber, follow these steps:
-
Navigate to the API testing directory
cd .\api-testing-cucumber\
This changes the working directory to where the API testing project is located.
-
Clean and install the project dependencies
mvn clean install
This cleans the existing build and installs all the dependencies required for the project.
-
Run the test suite
mvn run testExecutes the API test cases defined in the project.
-
Generate the Allure report
mvn allure:report
Creates an Allure report based on the API test results.
-
Open the Allure report
mvn allure:serve
Launches the Allure report in a browser for analysis.
- Ensure you have all prerequisites installed, including Node.js, Maven, and Allure CLI.
- Follow the steps in order to avoid missing any dependencies or configurations.
- For any issues or clarifications, reach out to the Group 6 team.