NUnit Test Parser doesn't recognize test name properly when it ends with dot

XMLWordPrintable

    • 2
    • Severity 3 - Minor

      HTR

      1. Have a NUnit test suite with test case which ends with a dot. (e.g)
        <?xml version="1.0" encoding="utf-8" standalone="no"?>
        <test-results name="C:\devel\test.dll" total="1" failures="1" not-run="0"              date="2007-04-30" time="11:09:30">
            <environment nunit-version="2.2.8.0" clr-version="2.0.50727.42"
                         os-version="Microsoft Windows NT 5.1.2600 Service Pack 2" platform="Win32NT" cwd="C:\devel\" 
        machine-name="SuperMachine" user="admin" user-domain="UserDomain"/>
            <culture-info current-culture="en-AU" current-uiculture="en-US"/>
            <test-suite executed="True" name="Test Suite with dot on the end." result="Failure" success="False" time="0.21">
                <results>
                    <test-case
                            name="Im ended with dot."
                            executed="True" result="Failure" success="False" time="0.21">
                        <failure>
                            <message><![CDATA[expected: <150> but was: <200>]]></message>
                            <stack-trace>WHAT A TERIBLE FAILURE</stack-trace>
                        </failure>
                    </test-case>
                </results>
            </test-suite>
        </test-results>
        
      1. Setup NUnit Test parser to parse this report

      Expected behavior

      NUnit parses report properly and we Bamboo recognize tests accordingly.

      Actual behavior

      NUnit Parser tries to get test name out of test-case by doing a substring of last '.'. fqTestName.substring(fqNameWithoutParams.lastIndexOf(".") + 1). As an effect test method name is an empty string.

      It doesn't impact a task result (test failures are detected and build is failed) but it does impact the UI and a way how we present failed tests. Empty test methods are filtered out.

       

       

      Although logs state

      simple 05-Apr-2018 09:46:14 Failing task since 1 failing test cases were found.

      BAM-17883 summary

      Summary
      Test methods that contain a '.' in their arguments get parsed incorrectly by Bamboo when displaying results and in the REST APIs.

      Expected Results
      The class/method split last '.' before the arguments.

      Actual Results
      The class/method split is on the last '.'

      Workaround
      There is none at this time.

        1. screenshot-1.png
          63 kB
          Grzegorz Lewandowski

            Assignee:
            Alexey Chystoprudov
            Reporter:
            Grzegorz Lewandowski
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: