Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xfail reason isn't part of xml message field (in comparison to skip) #4907

Closed
dafnita87 opened this issue Mar 11, 2019 · 3 comments

Comments

Projects
None yet
5 participants
@dafnita87
Copy link

commented Mar 11, 2019

Hello team,

We are not able to see the xfail reason message in jenkins report.
After checking jreport.xml, we found the following:

pytest.xfail('lets see XFAIL')
<?xml version="1.0" encoding="utf-8"?>
<testsuite errors="0" failures="0" name="pytest" skipped="1" tests="1" time="18.862">
    <testcase classname="tests.casb.IM.test_im_conversations.TestIM" file="tests/casb/IM/test_im_conversations.py"
              line="7"
              name="test_im_channel_conversation[vendor:slack_slack_casb_license-dlp_content_file-pps_qa_clean_PCITrue#3.docx0-dialog]"
              time="18.552">
        <skipped message="expected test failure">reason: lets see XFAIL</skipped>

I compared it to skip and the skip reason is added accordingly to the message field. See the difference:

pytest.skip('lets see SKIP')
<?xml version="1.0" encoding="utf-8"?>
<testsuite errors="0" failures="0" name="pytest" skipped="1" tests="1" time="2.519">
    <testcase classname="tests.casb.IM.test_im_conversations.TestIM" file="tests/casb/IM/test_im_conversations.py"
              line="7"
              name="test_im_channel_conversation[vendor:slack_slack_casb_license-dlp_content_file-pps_qa_clean_PCITrue#3.docx0-dialog]"
              time="2.442">
       <skipped message="lets see SKIP" type="pytest.skip">

The versions i'm using:
pytest 4.3.0 (the latest)
pytest-html 1.20.0 (the latest as well).

Are you aware of this issue? Can I expect for a resolution?

Thanks!
Dafna

@nicoddemus

This comment has been minimized.

Copy link
Member

commented Mar 15, 2019

Hi @dafnita87,

Indeed this is a bug, thanks for the report!

samueljsb added a commit to samueljsb/pytest that referenced this issue Apr 10, 2019

samueljsb added a commit to samueljsb/pytest that referenced this issue Apr 10, 2019

@blueyed

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2019

@dafnita87
Please help reviewing #5087.

samueljsb added a commit to samueljsb/pytest that referenced this issue Apr 10, 2019

samueljsb added a commit to samueljsb/pytest that referenced this issue Apr 11, 2019

samueljsb added a commit to samueljsb/pytest that referenced this issue Apr 11, 2019

@samueljsb

This comment has been minimized.

Copy link
Contributor

commented Apr 17, 2019

This was fixed by PR #5087.

@samueljsb samueljsb closed this Apr 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.