allure-framework/allure-csharp

Allure matches 2 error categories and duplicates failure for both of them

DenisKorbovskyTds opened this issue · 0 comments

I'm submitting a ...

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

1 failed test case displayed as 2 failed on categories tab (gets duplicated with 2 categories if both of them match). Documentation says (https://allurereport.org/docs/categories/)

The test gets assigned the first matching category

If the current behavior is a bug, please provide the steps to reproduce and, if possible, a minimal demo of the problem

image
  1. Create 2 categories when 2nd should not continue to match if 1st is matched
    { "name": "Product defects", "messageRegex": "System\\.Reflection\\.TargetInvocationException : Exception has been thrown by the target of an invocation\\.\n ----> Altom\\.AltDriver\\.WaitTimeOutException" }, { "name": "Test defects", "messageRegex": "System.*" }
  2. Failure with such stacktrace matches 2 categories
    System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. ----> Altom.AltDriver.WaitTimeOutException : Element //Title_Ovser not loaded after 20 seconds

What is the expected behavior?

Categories tab should display 1 error with category "Product defects"

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • OS Linux/Windows/Mac OS
  • .NET framework .NET 8
  • Allure version: 2.27.0
  • Test framework: nunit@3.13.3
  • Allure adapter: allure-nunit@2.11.0

Other information