# auto-test-template **Repository Path**: xinlc/auto-test-template ## Basic Information - **Project Name**: auto-test-template - **Description**: No description available - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-08-11 - **Last Updated**: 2023-05-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # auto-test-template Automated testing template ## Getting started ```bash # install dependency pip3 install -r requirements.txt # for MacOS brew install allure # ulimit -c unlimited # Driver requirements https://www.selenium.dev/documentation/en/webdriver/driver_requirements/ # run test pytest -s -v --alluredir=./reports/allure_results --clean-alluredir tests/test_baidu_ddt.py # pytest -s -v --alluredir=./reports/allure_results --clean-alluredir --browser=Firefox tests/test_baidu_ddt.py # start allure server allure serve ./reports/allure_results # generate html report #allure generate ./reports/allure_results allure generate -c -o ./reports/allure-report ./reports/allure_results # open allure report allure open ./reports/allure-report ``` ## MacOS ```bash # vim .zshrc # python B alias python="/opt/homebrew/bin/python3" alias pip="/opt/homebrew/bin/pip3" # alias python2="/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7" alias python2="/usr/bin/python2" alias pip2="/usr/local/bin/pip2" # python E # selenium B export SELENIUM_DRIVER_HOME=$HOME/workspace/software/selenium_driver export PATH=$PATH:$SELENIUM_DRIVER_HOME/ # selenium E # openjdk B # export PATH="/opt/homebrew/opt/openjdk/bin:$PATH" # openjdk E ``` ## Project Structure ```tree ├── common # common or lib ├── config # configs │ └── allure # allure config ├── data # data driven: excel、json、csv ├── docs # documents ├── logs # logging files ├── pages # Page Object Model (POM) ├── reports # test reports ├── screenshots # error screenshots └── tests # test cases ├── conftest.py # fixture ├── pytest.ini # pytest config ├── LICENSE ├── README.md ├── requirements.txt ``` ## EVN - MacOS Big Sur 11.5 Apple M1 - Python 3.9.4 - pip(3) 21.1.3 - Pytest 6.2.4 - Selenium 3.141.0 - Google Chrome 92.0.4515.107 (arm64) - ChromeDriver 91.0.4472.101 - Allure 2.14.0 - OpenJDK 1.8 (Zulu) ## Documents - [python](https://github.com/python/cpython) - [selenium](https://github.com/SeleniumHQ/selenium) - [pytest](https://github.com/pytest-dev/pytest) - [allure2](https://github.com/allure-framework/allure2) - [pandas](https://github.com/pandas-dev/pandas)