rhevm-qe-automation / pytest_jira

py.test plugin to integrate with JIRA
GNU General Public License v2.0
29 stars 25 forks source link

Adding skipped reason for test-cases #71

Closed lukas-bednar closed 6 years ago

lukas-bednar commented 7 years ago

Partially fixes #68

lukas-bednar commented 7 years ago

This PR is WorkInProgress, so far it doesn't behave consistently for all cases xfail/xpass/skipped. It needs tests covering all cases.

lukas-bednar commented 7 years ago

I was able to get into into report for skipped and xfailed status, but I can not achieve it for xpassed.

<testsuite errors="0" failures="0" name="pytest" skips="2" tests="3" time="0.053">
  <testcase classname=".tox.py27.tmp.testdir.test_jira_report_issue_details0.test_jira_report_issue_details" file=".tox/py27/tmp/testdir/test_jira_report_issue_details0/test_jira_report_issue_details.py" line="2" name="test_skipped" time="0.000269889831543">
    <skipped message="JIRA[ORG-1382] Issue https://issues.jboss.org/browse/ORG-1382" type="pytest.skip">/home/lbednar/work/pytest_jira/pytest_jira.py:127: &lt;py._xmlgen.raw object at 0x7f6ac0675610&gt;</skipped>
  </testcase>
  <testcase classname=".tox.py27.tmp.testdir.test_jira_report_issue_details0.test_jira_report_issue_details" file=".tox/py27/tmp/testdir/test_jira_report_issue_details0/test_jira_report_issue_details.py" line="6" name="test_xpassed" time="0.000361680984497"/>
  <testcase classname=".tox.py27.tmp.testdir.test_jira_report_issue_details0.test_jira_report_issue_details" file=".tox/py27/tmp/testdir/test_jira_report_issue_details0/test_jira_report_issue_details.py" line="10" name="test_xfail" time="0.000775098800659">
    <skipped message="expected test failure">JIRA[ORG-1382] Issue
https://issues.jboss.org/browse/ORG-1382</skipped>
  </testcase>
</testsuite>

so it doesn't cover all requirements in #68 issue ...

codecov-io commented 7 years ago

Codecov Report

Merging #71 into master will increase coverage by 0.03%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #71      +/-   ##
==========================================
+ Coverage   98.27%   98.31%   +0.03%     
==========================================
  Files           1        1              
  Lines         174      178       +4     
==========================================
+ Hits          171      175       +4     
  Misses          3        3
Impacted Files Coverage Δ
pytest_jira.py 98.31% <100%> (+0.03%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 477ee55...3befccc. Read the comment docs.

lukas-bednar commented 7 years ago

Hi @liiight ,

I did some progress here, but still it will not show issue for xpassed tests. Feel free to take a look ...

Lukas.

liiight commented 7 years ago

I'll try to take a peek.

lukas-bednar commented 6 years ago

Closing in favor of #91