This repository contains a comprehensive set of automated tests designed to validate the RagnarokWiki website. The primary approach involves verifying both the API calls made by the Front-End and the visual elements of the user interface, ensuring that all site functionalities operate as expected.
The test execution plan covers:
-
API Call Validation: Tests that ensure the requests made by the Front-End return the correct data and that communication with the server is efficient and accurate.
-
Visual Element Verification: Tests focused on ensuring that all user interface elements are displayed correctly and interact as expected. Mocks were used to simulate API responses, significantly optimizing test execution time.
All tests were implemented using the Cypress framework, which provides a powerful and intuitive tool for end-to-end test automation. This allows not only testing the behavior of the Front-End but also monitoring how it performs under different conditions. You can also run the automated tests simulating mobile screens.
As the RagnarokWiki website continues to evolve, the test execution plan will also expand. New tests will be added as new features are implemented, ensuring that the quality of the site is maintained and improved.
To set up and run the tests in this repository, the following requirements must be installed on your machine:
To start using Cypress in this project, follow the steps below:
Run the following command in the terminal to install Cypress as a project dependency:
npm installTo open the graphical interface of Cypress, use the following command:
npx cypress openIf you have any questions, check the official Cypress documentation.
This repository includes custom commands to facilitate running tests in different scenarios:
To open Cypress Launchpad with the default configuration:
npm run cy:openTo simulate a mobile environment when opening Cypress Launchpad:
npm run cy:open:mobileTo run tests in headless mode (without a graphical interface):
npm run testTo run tests in specific browsers, use the commands below. Ensure that the desired browser is installed on your machine.
Chrome:
npm run test:chromeElectron:
npm run test:electronFirefox:
npm run test:firefoxTo run tests simulating a mobile environment:
npm run test:mobile