Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-12671

JUNIT parser ignores test results created/provided from preceeding tasks

    • Icon: Bug Bug
    • Resolution: Answered
    • Icon: Low Low
    • None
    • None
    • Tests

      Steps to reproduce

      1. In the default job, create task to checkout a repository that has no any test result files
      2. Create a script task that will create or copy a test result file to the build working directory. See screenshot script.png
      3. Create a Junit parser task to parse the result files created in step 2 above.
      4. The build fails with the error "Could not find test result reports in the ...."

      This same configuration worked in Bamboo 4.1 but fails in later versions of 4.3.x

        1. parser.jpg
          parser.jpg
          82 kB
        2. script.jpg
          script.jpg
          42 kB

            [BAM-12671] JUNIT parser ignores test results created/provided from preceeding tasks

            I'm having this problem using JUnit Parser on 5.14.  In my case I am passing the xml file from one stage to the next as an artifact.  Is this not exactly what artifacts are for?

            To fix it you could have the artifact copy for a given stage touch the file so that its timestamp is after the start of the stage.

            Better yet, if your goal is to avoid picking up files from previous builds, why not check their time vs. the start of the build rather than the start of the stage?

             

            Phil Rittenhouse added a comment - I'm having this problem using JUnit Parser on 5.14.  In my case I am passing the xml file from one stage to the next as an artifact.  Is this not exactly what artifacts are for? To fix it you could have the artifact copy for a given stage touch the file so that its timestamp is after the start of the stage. Better yet, if your goal is to avoid picking up files from previous builds, why not check their time vs. the start of the build rather than the start of the stage?  

            Seem to be having the same problem with MSTest parser. Unable to pick up the .trx file generated.

            Rostislav Pasechnikov added a comment - Seem to be having the same problem with MSTest parser. Unable to pick up the .trx file generated.

            we still have this problem too: 05.2016, is there any way to switch off this behaviour?

            Emre Kutbay added a comment - we still have this problem too: 05.2016, is there any way to switch off this behaviour?

            I still have this problem in Atlassian Bamboo version 5.9.2 build 5917 - 09 Jul 15
            When will there be a concrete work around or fix for this?

            Have tried all known work arounds with no success

            Brian Johnson added a comment - I still have this problem in Atlassian Bamboo version 5.9.2 build 5917 - 09 Jul 15 When will there be a concrete work around or fix for this? Have tried all known work arounds with no success

            devon.merritt we fixed this problem as part of BAM-12768 in Bamboo 5.0.1. If you are running into new issues with the parser, please create a new ticket and we will investigate.

            James Dumay added a comment - devon.merritt we fixed this problem as part of BAM-12768 in Bamboo 5.0.1. If you are running into new issues with the parser, please create a new ticket and we will investigate.

            Devon added a comment -

            This is an issue for me as well when using the NUnit parser. We have another system that generates the build results and the Bamboo task just parses them. Sometimes the external system will be fast enough to generate the results before the Bamboo task is started. When that happens Bamboo ignores the results and all the tests fail.

            Devon added a comment - This is an issue for me as well when using the NUnit parser. We have another system that generates the build results and the Bamboo task just parses them. Sometimes the external system will be fast enough to generate the results before the Bamboo task is started. When that happens Bamboo ignores the results and all the tests fail.

            This change in behaviour is apparently not limited to JUnit Result Parser. I am having this problem with the NUnit Result Parser as well.

            It would have been better if these Parser tasks had the option of "Parse Files" and options "Modified since the plan started", "Modified since the job started", and "Always".

            Sean Dockery added a comment - This change in behaviour is apparently not limited to JUnit Result Parser. I am having this problem with the NUnit Result Parser as well. It would have been better if these Parser tasks had the option of "Parse Files" and options "Modified since the plan started", "Modified since the job started", and "Always".

            "Hi Patrick" - read it as "Hi James"... apologies.

            Lyudmil Lyudmil added a comment - "Hi Patrick" - read it as "Hi James"... apologies.

            HI Patrick
            This is incompatible change. It seems reasonable what you have explained above. But loosing time investigating a tool that is supposed to save you time is not a good situation.
            Since you are open to suggestions here are two:
            1. Document the task behaviour in more details: https://confluence.atlassian.com/display/BAMBOO/JUnit+Parser
            2. Add checkbox in task configuration - "Parse old results" with detailed hint in task configuration - save us time looking up the WIki, but still don't forget to document it on the Wiki.
            Regards Lyudmil

            Lyudmil Lyudmil added a comment - HI Patrick This is incompatible change. It seems reasonable what you have explained above. But loosing time investigating a tool that is supposed to save you time is not a good situation. Since you are open to suggestions here are two: 1. Document the task behaviour in more details: https://confluence.atlassian.com/display/BAMBOO/JUnit+Parser 2. Add checkbox in task configuration - "Parse old results" with detailed hint in task configuration - save us time looking up the WIki, but still don't forget to document it on the Wiki. Regards Lyudmil

            Hi Patrick,

            We've made this decision because this problem has generated a lot of support on our side in the past and relatively few people in comparison have complained about the behaviour change.

            I don't think there is a great way to solve this problem to keep every one happy but I'd be open to any suggestions you guys can come up with.

            Thanks
            James

            James Dumay added a comment - Hi Patrick, We've made this decision because this problem has generated a lot of support on our side in the past and relatively few people in comparison have complained about the behaviour change. I don't think there is a great way to solve this problem to keep every one happy but I'd be open to any suggestions you guys can come up with. Thanks James

              kbrazulewicz Krystian Brazulewicz
              smaiyaki Sultan Maiyaki (Inactive)
              Affected customers:
              2 This affects my team
              Watchers:
              14 Start watching this issue

                Created:
                Updated:
                Resolved: