- This is an Automation Test Project for an e-commerce development project - Stylish (Owned by AppWorks School).
- Stylish Website: http://54.201.140.239/
- System Requirement
- Stylish API Document
- Included both Web UI Test and API Test.
- The Framework is PyTest and Selenium.
- Incorporated parallel test execution to improve efficiency
- Project Structure
Please follow the steps below:
First, you need to configure the environment variables according to the descriptions provided in the .env-template
file. You can make a copy of the .env-template
and name it .env
, then set the values for the parameters.
cp .env-template .env
# Edit the .env file to set the values for the parameters
Execute the following command to install the necessary Python packages. This will install the required packages based on the dependencies listed in the requirements.txt
file.
pip install -r requirements.txt
Run the tests using pytest, specifying the name of the test file. Ensure that you have correctly set the environment variables and installed the required packages.
- Normal Test
pytest ./test_api
pytest ./test_api/test_api_product.py
- Parallel Test
pytest -n 2 ./test_api
- Parallel Test with Rerun
pytest -n 2 --reruns 3 --reruns-delay 2 ./test_api