[docker-ptf]PTF adds xmlrunner for xunit report#8417
[docker-ptf]PTF adds xmlrunner for xunit report#8417richardyu-ms merged 1 commit intosonic-net:masterfrom
Conversation
wangxin
left a comment
There was a problem hiding this comment.
The xmlrunner package is pretty old. Not sure if it supports python3 well. We need to consider python3 support while adding packages. Is the unittest-xml-reporting package a better option?
Reference: https://github.com/xmlrunner/unittest-xml-reporting
7d9f5ac to
8932c03
Compare
|
@wangxin , why not using pytest report? can we converge on using one report same as sonic-mgmt? |
Co-authored-by: richardyu-ms <richard.yu@microsoft.com>
|
@guohan, talked with @richardyu-ms, each SAI PTF script has many test cases. However, for a pytest case running the PTF script, it will only report single result based on pass or fail of the PTF script. It would be better for the PTF script to generate a junit xml result with more fine grained results. The junit xml result can be copied back to sonic-mgmt. Then we can take advantage of the existing tools to process the PTF script junit XML result files to generate better test reports. |
Co-authored-by: richardyu-ms <richard.yu@microsoft.com>
Co-authored-by: richardyu-ms <richard.yu@microsoft.com>
Co-authored-by: richardyu-ms <richard.yu@microsoft.com>
Why I did it
add xmlrunner to generate the test report in xunit format
How I did it
add xmlrunner to generate the test report in xunit format
How to verify it
built the ptf docker and check the function with test cases
Which release branch to backport (provide reason below if selected)
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)