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

Sauce Labs Test Publisher Configuration

XMLWordPrintable

      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

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

              Created:
              Updated: