Htmltestrunner Chinese Version
- 20170925
- Complete localization of test reports, including Chinese processing of error logs
- Increased failure auto functionality for selenium UI tests
- Increased failure auto-retry function
- Increase pie chart Statistics
- Compatible with both python2.x and 3.x
- 20180402
- Table Style Optimization
- Fix some bugs
- Add groups to show multiple, first turn on auto play
- Increase shows only the last run result, and when multiple retries, each test case is shown only once
Report Chinese
Selenium
function according to the test results, when the result is fail or error automatic method in _testresult test results collection, can be adjusted according to their own frame, selenium use get_screenshot_as_base64 Get the base64 encoding of the page to avoid problems with the picture file
So to extract the driver variable in the use case gets the Webdriver object, so the implementation function must be defined in the use case to define webdriver as driver
SetUp (self): self.imgs=[] = webdriver. Chrome ()
You can also customize the addition of a step during the test process, such as creating a report that will show the results uniformly
Use case failed retry
According to the operation mechanism of unittest, judge the test result in stoptest, if the failure or error status is 1, decide whether to retry;
Appends a parameter when instantiating a Htmltestrunner object, retry, specifying the number of retries, and if Save_last_try is true, a use case displays only the results of the last Test.
Htmltestrunner (title="test report with description=" trial Sledgehammer Stream=open ("Sample_ test_report.html"WBverbosity=Retry=save_last_try=True)
If Save_last_try is false, the results of all retries are displayed.
Htmltestrunner (title="test report with description=" trial Sledgehammer Stream=open ("Sample_ test_report.html"WBverbosity=Retry=save_last_try=False)
The output in the run is as follows:
Url:https://github.com/goversky/htmltestrunner_cn/blob/master/readme.md
Source url:https://github.com/goversky/htmltestrunner_cn/blob/master/htmltestrunner_cn.py oneself Also in Baidu Cloud collection
Htmltestrunner Chinese Version---Source of a great God source (added failed, use case failed to re-execute function)