Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-30778

Sauce Labs Test Publisher Configuration

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I'm using TestNG (also tried JUnit) to run tests in Sauce Labs cloud. In order to update the pass/fail status of those tests in Sauce Labs once they done, I added the "Run Sauce Labs Test Publisher" post-build action to my Jenkins build.

      First of all, the documentation isn't even clear about how this integration must be configured. This is what it says: "In addition, you will need to output the following line to your for each test that is run using Sauce Labs: SauceOnDemandSessionID=YOUR_SESSION_ID job-name=YOUR_JOB_NAME." What does that mean? To your what?

      Based on source code, I figured there has to be <system-out> tag in the Surefire XML Report, the content of which must be that line. But that doesn't make much sense, because those tags are only generated when an error happens. Also no matter what I've tried, I just couldn't make Surefire/TestNG output that tag into the report at all. Not even when test failed.

      I'm either not understanding something (probably) or this way of configuring things is messed up.

      Last few lines of my log:
      Starting post-build for Sauce Labs plugin
      Finished post-build for Sauce Labs plugin
      Recording test results
      Starting Sauce Labs test publisher
      Finished Sauce Labs test publisher
      Starting Sauce Labs test publisher
      Finished Sauce Labs test publisher

        Attachments

          Issue Links

            Activity

            grulex Alex G. created issue -
            grulex Alex G. made changes -
            Field Original Value New Value
            Description I'm using TestNG (also tried JUnit) to run tests in Sauce Labs cloud. In order to update the pass/fail status of those tests in Sauce Labs once they done, I added the "Run Sauce Labs Test Publisher" post-build action to my Jenkins build.

            First of all, the documentation isn't even clear about how this integration must be configured. This is what it says: "In addition, you will need to output the following line *{color:red}to your {color}* for each test that is run using Sauce Labs: SauceOnDemandSessionID=YOUR_SESSION_ID job-name=YOUR_JOB_NAME." What does that mean? *To your what?*

            Based on source code, I figured there has to be <system-out> tag in the Surefire XML Report, the content of which must be that line. But that doesn't make much sense, because those tags are only generated when an error happens. Also no matter what I've tried, I just could make Surefire/TestNG output that tag into the report at all. Not even when test failed.

            I'm either not understanding something (probably) or this way of configuring things is messed up.

            Last few lines of my log:
            Starting post-build for Sauce Labs plugin
            Finished post-build for Sauce Labs plugin
            Recording test results
            Starting Sauce Labs test publisher
            Finished Sauce Labs test publisher
            Starting Sauce Labs test publisher
            Finished Sauce Labs test publisher
            I'm using TestNG (also tried JUnit) to run tests in Sauce Labs cloud. In order to update the pass/fail status of those tests in Sauce Labs once they done, I added the "Run Sauce Labs Test Publisher" post-build action to my Jenkins build.

            First of all, the documentation isn't even clear about how this integration must be configured. This is what it says: "In addition, you will need to output the following line *{color:red}to your {color}* for each test that is run using Sauce Labs: SauceOnDemandSessionID=YOUR_SESSION_ID job-name=YOUR_JOB_NAME." What does that mean? *To your what?*

            Based on source code, I figured there has to be <system-out> tag in the Surefire XML Report, the content of which must be that line. But that doesn't make much sense, because those tags are only generated when an error happens. Also no matter what I've tried, I just couldn't make Surefire/TestNG output that tag into the report at all. Not even when test failed.

            I'm either not understanding something (probably) or this way of configuring things is messed up.

            Last few lines of my log:
            Starting post-build for Sauce Labs plugin
            Finished post-build for Sauce Labs plugin
            Recording test results
            Starting Sauce Labs test publisher
            Finished Sauce Labs test publisher
            Starting Sauce Labs test publisher
            Finished Sauce Labs test publisher
            svenstyla Sven Ehlert made changes -
            Link This issue duplicates JENKINS-25435 [ JENKINS-25435 ]
            thecampbellcash Andrew Campbell made changes -
            Assignee Kohsuke Kawaguchi [ kohsuke ] Andrew Campbell [ thecampbellcash ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 165905 ] JNJira + In-Review [ 182195 ]

              People

              Assignee:
              thecampbellcash Andrew Campbell
              Reporter:
              grulex Alex G.
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: