cprieto / tsqlt-teamcity

TeamCity runner for tSQLt tests
29 stars 5 forks source link

Test output in TeamCity appears to recursively add to previous result for failed tests #8

Open Jevonius opened 5 years ago

Jevonius commented 5 years ago

Struggling to describe this, but there appears to be a bug with the error details when reporting failed tests.

Running latest version of TC, but have seen this error previously - fairly sure it's been there since we started using the plugin (thanks!), but we don't usually have enough/any failing tests to notice the issue. I think we're using the latest released version of the plugin too (we're using the SSO option), although it shows as 1.0 still in the TC plugin list. Is there a newer release we should try? There have been a number of commits since then apparently.

For a class with three failed tests, the test summary looks like this:

Test 1 Title
   Test 1 Error Details

Test 2 Title
   Test 2 Error Details
   Test 1 Error Details

Test 3 Title
   Test 3 Error Details
   Test 2 Error Details
   Test 1 Error Details

Looking at the Build Log:

...
Class Name
   [Class Name] Test 1 Title
      [Test 1 Title] Test 1 Error Details
      [Test 1 Title] Test 2 Title
         [Test 2 Title] Test 2 Error Details
         [Test 2 Title] Test 3 Title
            [Test 3 Title] Test 3 Error Details
...

Perhaps a string concatenation not being reset for failed tests? My Java is rusty so I haven't dug into the code yet to try and work it out.