Skip to content

[docker-ptf]PTF adds xmlrunner for xunit report#8417

Merged
richardyu-ms merged 1 commit intosonic-net:masterfrom
richardyu-ms:richard/add-xmlrunner-for-report
Aug 12, 2021
Merged

[docker-ptf]PTF adds xmlrunner for xunit report#8417
richardyu-ms merged 1 commit intosonic-net:masterfrom
richardyu-ms:richard/add-xmlrunner-for-report

Conversation

@richardyu-ms
Copy link
Contributor

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

  • vxlan/test_vxlan_decap.py
  • local test case for sai testing

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

@richardyu-ms richardyu-ms requested a review from lguohan as a code owner August 10, 2021 23:38
@richardyu-ms richardyu-ms changed the title PTF adds xmlrunner for xunit report [docker-ptf]PTF adds xmlrunner for xunit report Aug 10, 2021
Copy link
Contributor

@wangxin wangxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@richardyu-ms richardyu-ms force-pushed the richard/add-xmlrunner-for-report branch from 7d9f5ac to 8932c03 Compare August 11, 2021 04:18
@richardyu-ms richardyu-ms requested a review from wangxin August 11, 2021 04:21
@lguohan
Copy link
Collaborator

lguohan commented Aug 11, 2021

@wangxin , why not using pytest report? can we converge on using one report same as sonic-mgmt?

@richardyu-ms richardyu-ms merged commit 9417fe9 into sonic-net:master Aug 12, 2021
@richardyu-ms richardyu-ms deleted the richard/add-xmlrunner-for-report branch August 12, 2021 06:28
qiluo-msft pushed a commit that referenced this pull request Aug 12, 2021
Co-authored-by: richardyu-ms <richard.yu@microsoft.com>
@wangxin
Copy link
Contributor

wangxin commented Aug 13, 2021

@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.

richardyu-ms added a commit to richardyu-ms/sonic-buildimage that referenced this pull request Aug 16, 2021
Co-authored-by: richardyu-ms <richard.yu@microsoft.com>
richardyu-ms added a commit to richardyu-ms/sonic-buildimage that referenced this pull request Aug 16, 2021
Co-authored-by: richardyu-ms <richard.yu@microsoft.com>
judyjoseph pushed a commit that referenced this pull request Aug 20, 2021
Co-authored-by: richardyu-ms <richard.yu@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants