svanoort / pyresttest

Python Rest Testing
Apache License 2.0
1.15k stars 325 forks source link

Can i get HTML report for all testcases ? #267

Open Anjimeduri opened 6 years ago

mravitej commented 6 years ago

@Anjimeduri There doesn't appear to be a flag for Pyresttest to produce CSV, HTML, or a similar kind of output like JSON. The only other thing we can call the relevant logic from a Python program.

util/pyresttest within the source code, we can see it delegates to pyresttest/resttest.py. That file contains the logic for running the tests and printing the responses. so i customized the resttest.py to print

PASS/FAIL for individual test cases Number of test cases Passed or Failed in a group The whole result will parse to test_name_file.html

Just download zip file and extract it, the resttest.py will be present . Place it in pyresttest/pyresttest directory and run following command from pyresttest directory

$ sudo python setup.py install resttest.zip