This repository contains the automated tests for the form submission feature of our web application. The tests cover various functionalities including user input validation, avatar image upload, and captcha verification, ensuring robustness and reliability of the form submission process.
These instructions will guide you through getting a copy of the project up and running on your local machine for development and testing purposes.
Ensure you have the following installed on your system:
- Node.js (v14 or newer)
- npm (usually comes with Node.js)
Check the installed versions with:
node -v
npm -v
To install the required dependencies:
- Clone the repository to your local machine.
- Navigate to the project's root directory.
- Run the following command:
This will install all dependencies listed in
npm install
package.json
.
Execute the automated tests using Playwright with the command:
for headless mode: npm run test
for headed mode: npm run test-ui
This will run all tests located within the tests
directory.
The tests are organized in the tests
directory, with key components structured as follows:
FormPage.ts
: Page Object Model for handling interactions on the form page.SuccessPage.ts
: Page Object Model for validations on the success page after form submission.SliderCaptcha.ts
: Utility class to automate the slider captcha interaction.submissionForm.spec.ts
: Main test suite file containing various test scenarios.
The suite includes the following test scenarios:
- Submit Form with Valid Data: Validates successful form submission, including the correct display of success messages and data verification on the success page.
- Negative Test Cases: Tests for common form errors, such as mismatched passwords and inadequate password lengths.
- Avatar Upload: Tests the functionality for uploading different avatar image formats and verifies their correct display.
- Playwright: For cross-browser testing and automation.
- TypeScript: For writing test scripts with strong typing support.
- Nikita - Initial work and test suite development.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Expanded Overview: Provides a more detailed description of what the test suite covers.
- Step-by-step Installation Guide: Clarifies the installation process, including cloning the repository.
- Detailed Test Structure: Breaks down the structure of the test suite for better understanding.
- Comprehensive Test Case Descriptions: Elaborates on the scenarios covered by the test suite.
- Technology Stack Section: Highlights the primary technologies used in the project.