Pytest junitxml plugin error vs failure question #7950
-
Hi! Iv'e been messing around with the junitxml plugin for pytest and after reading a bit in the junitxml documentation I understand that the difference between error and failure is if the test failed on an assertion or on a random error. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @niroshaimos, pytest considers a failure any assertion error or exception raised inside a test function; errors happen when an assertion error or exception is raised during setup/teardown/collection. When writing the junitxml file, we follow the same semantics, writing an |
Beta Was this translation helpful? Give feedback.
Hi @niroshaimos,
pytest considers a failure any assertion error or exception raised inside a test function; errors happen when an assertion error or exception is raised during setup/teardown/collection.
When writing the junitxml file, we follow the same semantics, writing an
error
orfailure
tag accordingly.