interface-automated-testing is an interface automation testing framework that using Python+Requests+Pytest+YAML+Allure, which helps users quickly write automated testcases and generate a detailed test report.
🎯 Project Goal:Writing interface testcases in the most light and convenient way.
- install dependencies
# Python3.5+
pip3 install -r requirements.txt
- edit conf/setting.ini
[URL]
protocol = http/https
host = "$yourip"
port = "$yourport"
- write data/your_test_data.yaml
test_login: # data['test_login']
- ["Default", "administrator", "99cloud", True, 200] # interface parameter
- ["Default", "test", "123456", False, 401]
- edit testcases/conftest.py
api_data = __get_data("api_test_data.yml") # loading testing data
- write testcases/test.py
- api ====>> encapsulating the http interface into python interface
- common ====>> various tools
- core ====>> requests request method encapsulation
- config ====>> configuration files
- data ====>> managing test data files
- requirements.txt ====>> related dependency files
- testcases ====>> testcases files
pytest testcases/api_test/* --show-capture=stderr
allure serve ./report