Qiwu auto test tool, supports accuracy / pressure
tests for knowledge base, QA API and server backend
[TOC]
Feliciano Long
Zhiyu.Zhou
Python2 > 2.7 and Python3
- For Windows users please download (Mac users could skip this step)
https://www.python.org/ftp/python/2.7/python-2.7.msi
- Install requirements
pip install -r requirements.txt
python app.py testcase
session number
test duration
last two parameters are ignorable
test one case:
python app.py ./testcases/test1.yml
test multiple cases:
python app.py ./testcases/test1.yml ./testcases/test2.yml
Use multiple threads to test, in this mode only one CPU is used.
start 10 sessions in 5 seconds
python app.py ./testcases/test3.yml 10 5
print_conversation
switch is suggested to turn off in multiple session test to make report more readable
Use multiple processes to test, in this mode the program will start logical CPU number processes (each assigned session number DIV CPU number
tasks)
Similar to multi threading test, this mode will be enabled when session count larget than 1000 and start interval less than 0.1s
start 1200 sessions in 60 seconds
python app.py ./testcases/test4.yml 1200 60
Examples are under /testcases
folder
Check test1
(full explanation) and test2
(minimum test case) for knowledge tests, test3
(json request / QA dialogue) and test4
(form request / knowledge backend) for api test