testomatio / reporter

Testomatio Reporter
126 stars 22 forks source link

In the "**Runs**" tab, the real status for tests with the **@mark.xfail** mark is not displayed #240

Closed BohdanObruch closed 3 months ago

BohdanObruch commented 1 year ago

Describe the bug In the "Runs" tab, the real status for tests with the @mark.xfail mark is not displayed

Precondition Create a test and add pytest mark with this test @mark.xfail

To Reproduce Steps to reproduce:

  1. Run the test with the mark @mark.xfail
  2. Check the test result in the console
  3. Go to the testomat.io website
  4. Go to the Runs tab
  5. Open the last launched test
  6. Check the display of the status of the test result

Expected behavior The status of the test should be "xpassed" and with a display of why. For example, how the reason for failed tests is displayed

Screenshots 1

2

Desktop (please complete the following information):

poliarush commented 1 year ago

@BohdanObruch what did you use to report the results to testomat.io? please give command example from terminal

BohdanObruch commented 1 year ago

I used the pytest-analyzer plugin, mark.skip appears in the report, but mark.xfail does not @ 2

BohdanObruch commented 1 year ago

I use pytest --analyzer sync command

BohdanObruch commented 1 year ago

and what is somewhat interesting: if I run tests by command in the console set TESTOMATIO=api_key; pytest --analyzer sync , for some reason does not accept the installation of the TESTOMATIO variable, indicates an error, only when I manually add it to the PC environment variable, it works

Ypurek commented 1 year ago

will check and fix on weekend

Ypurek commented 1 year ago

@BohdanObruch sorry for a delay. I was sick. I've looked through your issue and cannot figure out how to help you. There is no such status in testomat.io like xpassed. There only 3 @poliarush pls correct me if I am wrong

BohdanObruch commented 1 year ago

Hello, thank you for your reply Oleksii. I think you mean these statuses, but what about this pytest mark? Display in "Passed" status in testomat.io is not correct 1

Ypurek commented 1 year ago

do you suggest to fail this test in testomat.io?

Ypurek commented 1 year ago

image pycharm considers it as passed

BohdanObruch commented 1 year ago
  1. in the photo, you run the test by clicking the launch icon (triangle in the line of the name of the test) or by clicking on the file, but I will show you the command to run the tests through the console "pytest ..."
  2. I added a photo of what this status looks like in Allure, there it is clear what kind of status it is and why exactly (mark displayed is @pytest.mark.xfail) 2
BohdanObruch commented 1 year ago

with such a launch as you indicated there, regardless of the pytest marks in the test, only the status of either passed or failed will be displayed

poliarush commented 12 months ago

@Ypurek @BohdanObruch from testomat.io point of view there only 3 statues:

it's tricky part how to treat xfail and xpass

I think, the mapping from pytest's statuses to testomat.io's statuses should be like this:

However, I suggest to put message for test case for following statuses to it's visible in the list:

2023-11-23_21 46 39@2x

2023-11-23_21 50 45@2x

@DavertMik I think we need to introduce labels and custom fields for testrun

BohdanObruch commented 12 months ago

@poliarush thank you, I agree with you

poliarush commented 12 months ago

related to https://github.com/testomatio/app/issues/881

@BohdanObruch also, i've created a new item to introduce labels and custom fields for testrun, so then you can customly assign necessary labels to testruns and filter by it with some statistics

DavertMik commented 3 months ago

Closed in favor of https://github.com/testomatio/app/issues/881

poliarush commented 3 months ago

related to https://github.com/testomatio/moonactive-issues/issues/208