API automation using Python and requests library and cypress automation for the FE app
Main goals for the project:
- Identify the areas of the project that require testing.
- Write test cases that cover all possible scenarios and edge cases.
- Execute the test cases and record the results.
End-to-end tests for the following scenarios are included in this project:
- Submit correct Transaction Hash and verify the page
- Submit incorrect Transaction Hash and verify the page
API test build in Python using requests library to verify a POST request
- Cypress as the test automation framework.
- TypeScript as the programming language.
- Cypress Testing Library for writing tests in a concise and maintainable manner.
- Page Object Model for organizing the tests into maintainable components.
- Behavior Driven Development (BDD) / Cucumber Style Syntax using cypress-cucumber-preprocessor for writing tests in a human-readable format.
- Reusable functions and test steps to make tests easy to maintain and scalable.
- Data Driven Testing to reduce repetitive code.
FOLLOW THESE INSTRUCTIONS CAREFULLY:
- The following repo cloned: https://github.com/KaterinaUK/automated_localhost_app
- Following this README file
Make sure that you started an application and you can access http://localhost:3000/
-
Open terminal and run
npm install
To start the tests, run the following command:
if you want to see the browser - npm run cypress:open
to run in headless mode - npm run cypress:run
Before running the tests for this application, please make sure that the following prerequisites are met:
- The application should be running
- Python is installed
To install the requests library, please run the following command:
python3 -m pip install requests
This will install the necessary package required for running the tests.
To run the tests for this application, first navigate to the 'api_tests' folder and run the following command:
npm test
This command will run the test suite and provide the results of the tests. Please ensure that the application is running before running the tests.