Skip to main content

Excel http api test

Project description

excel-runner

Run Http requests list in excel sheet

how to use

Install excel-runner v0.1.2

pip install excel-runner==0.1.2

Create excel data file data.xlsx

name method url data headers verify result
get请求 get https://httpbin.org/get?a=1&b=2 res.status_code==200
post-form post https://httpbin.org/post name=Kevin&age=1 Content-Type: application/x-www-form-urlencoded res.status_code==200
res.json()['form']['name']=='Kevin']
post-json post https://httpbin.org/post {"name": "Kevin", "age": 1} Content-Type: application/json
post-xml post https://httpbin.org/post hello Content-Type: application/xml result.json()["data"]=="hello"

Run excel data file

from excel_runner import run_excel

run_excel('data.xlsx')

Open data.xlsx again, you will see the test result

name method url data headers verify result
get请求 get https://httpbin.org/get?a=1&b=2 res.status_code==200 PASS
post-form post https://httpbin.org/post name=Kevin&age=1 Content-Type: application/x-www-form-urlencoded res.status_code==200
res.json()['form']['name']=='Kevin']
PASS
post-json post https://httpbin.org/post {"name": "Kevin", "age": 1} Content-Type: application/json PASS
post-xml post https://httpbin.org/post hello Content-Type: application/xml result.json()["data"]=="hello" PASS

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

excel_runner-0.1.2.tar.gz (11.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page