Uploaded image for project: 'SonarPHP'
  1. SonarPHP
  2. SONARPHP-614

PhpUnitResultParser fails for unknown tags in report

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8
    • Component/s: Unit Tests
    • Labels:
      None

      Description

      testcase can have child elements properties, system-err and system-out. When they present in a report file, PhpUnitResultParser fails

      02:40:11 INFO: ------------------------------------------------------------------------
      02:40:11 INFO: EXECUTION FAILURE
      02:40:11 INFO: ------------------------------------------------------------------------
      02:40:11 Total time: 16.928s
      02:40:11 Final Memory: 25M/127M
      02:40:11 INFO: ------------------------------------------------------------------------
      02:40:11 ERROR: Error during Sonar runner execution
      02:40:11 ERROR: Unable to execute Sonar
      02:40:11 ERROR: Caused by: Report file is invalid, plugin will stop.
      02:40:11 ERROR: Caused by: system-out : system-out : system-out : system-out
      02:40:11 ---- Debugging information ----
      02:40:11 message             : system-out : system-out
      02:40:11 cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException
      02:40:11 cause-message       : system-out : system-out
      02:40:11 class               : org.sonar.plugins.php.phpunit.xml.TestSuites
      02:40:11 required-type       : org.sonar.plugins.php.phpunit.xml.TestCase
      02:40:11 path                : /testsuites/testsuite/testsuite[13]/testcase/system-out
      02:40:11 line number         : 65
      02:40:11 -------------------------------
      02:40:11 ERROR: Caused by: system-out : system-out
      02:40:11 ERROR: 
      02:40:11 ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
      02:40:11 ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
      

      xsd for this format https://windyroad.com.au/dl/Open%20Source/JUnit.xsd

        Attachments

          Activity

            People

            Assignee:
            elena.vilchik Elena Vilchik
            Reporter:
            elena.vilchik Elena Vilchik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: