Skip to content

Latest commit

 

History

History
61 lines (43 loc) · 1.34 KB

README.md

File metadata and controls

61 lines (43 loc) · 1.34 KB

What is interface-automated-testing

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.

Quick Start

  1. install dependencies
# Python3.5+
pip3 install -r requirements.txt
  1. edit conf/setting.ini
[URL]
protocol = http/https
host = "$yourip"
port = "$yourport"
  1. write data/your_test_data.yaml
test_login: # data['test_login']
  - ["Default", "administrator", "99cloud", True, 200] # interface parameter
  - ["Default", "test", "123456", False, 401] 
  1. edit testcases/conftest.py
api_data = __get_data("api_test_data.yml") # loading testing data
  1. write testcases/test.py

Project Structure

  • 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

Run Testcase

pytest testcases/api_test/* --show-capture=stderr

Generate Test Report

allure serve ./report