The attached TAP does not parse with "Enable subtests" checked.

        1. exception.txt
          1 kB
        2. tap.txt
          0.2 kB

          [JENKINS-17947] Nested TAP not parsed correctly

          James Howe created issue -
          James Howe made changes -
          Attachment New: exception.txt [ 23648 ]
          Attachment New: tap.txt [ 23649 ]
          Description Original: The following TAP does not parse with "Enable subtests" checked.

          ..3
              1..1
              ok 1 - subtest 1
          ok 1 - test 1
              1..4
              ok 1 - subtest 1
              ok 2 - subtest 2
              ok 3 - subtest 3
              ok 4 - subtest 4
          ok 2 - test 2
              1..15
              Bail out!
              not ok 1 - test 3

          org.tap4j.parser.ParserException: Error parsing TAP Stream: Duplicated TAP Plan found.
          at org.tap4j.parser.Tap13Parser.parse(Tap13Parser.java:204)
          at org.tap4j.parser.Tap13Parser.parseFile(Tap13Parser.java:170)
          at org.tap4j.plugin.TapParser.parse(TapParser.java:105)
          at org.tap4j.plugin.TapPublisher.loadResults(TapPublisher.java:297)
          at org.tap4j.plugin.TapPublisher.perform(TapPublisher.java:239)
          at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
          at hudson.model.Build$BuildExecution.post2(Build.java:183)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
          at hudson.model.Run.execute(Run.java:1600)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:241)
          Caused by: org.tap4j.parser.ParserException: Duplicated TAP Plan found.
          at org.tap4j.parser.Tap13Parser.onPlan(Tap13Parser.java:394)
          at org.tap4j.parser.Tap13Parser.parseLine(Tap13Parser.java:294)
          at org.tap4j.parser.Tap13Parser.parse(Tap13Parser.java:199)
          ... 13 more
          New: The attached TAP does not parse with "Enable subtests" checked.

          James Howe added a comment -

          If the first test has no subtests then parsing completes, but then none of the subtests appear in the results.

          James Howe added a comment - If the first test has no subtests then parsing completes, but then none of the subtests appear in the results.
          Bruno P. Kinoshita made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          @James, thanks, I'll take a look on it in the next days. Probably it's a bug in tap4j.

          Thanks for attaching the exception and a sample tap stream

          Bruno P. Kinoshita added a comment - @James, thanks, I'll take a look on it in the next days. Probably it's a bug in tap4j. Thanks for attaching the exception and a sample tap stream

          Confirmed it's a bug in tap4j [1]. Already fixed, cutting a new release.

          Will bump up the tap4j dependency version and will test again to see if the exception is gone.

          [1] https://github.com/tupilabs/tap4j/issues/12

          Bruno P. Kinoshita added a comment - Confirmed it's a bug in tap4j [1] . Already fixed, cutting a new release. Will bump up the tap4j dependency version and will test again to see if the exception is gone. [1] https://github.com/tupilabs/tap4j/issues/12
          Bruno P. Kinoshita made changes -
          Labels New: pending-dependency-release

          Code changed in jenkins
          User: Bruno P. Kinoshita
          Path:
          pom.xml
          http://jenkins-ci.org/commit/tap-plugin/3823b83e9fa2ae249a0cadcdbb936291c1c2781f
          Log:
          [FIXED JENKINS-17947] Nested TAP not parsed correctly

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Bruno P. Kinoshita Path: pom.xml http://jenkins-ci.org/commit/tap-plugin/3823b83e9fa2ae249a0cadcdbb936291c1c2781f Log: [FIXED JENKINS-17947] Nested TAP not parsed correctly
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]

          Just tested locally, seems to be working now.

          However, the subtests are not being included in the table of TAP tests. I'll take a look, since there are other issues related to enhancing the information displayed in the TAP tests table.

          Thanks in advance!
          Bruno

          Bruno P. Kinoshita added a comment - Just tested locally, seems to be working now. However, the subtests are not being included in the table of TAP tests. I'll take a look, since there are other issues related to enhancing the information displayed in the TAP tests table. Thanks in advance! Bruno

            kinow Bruno P. Kinoshita
            jameshowe James Howe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: