Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saucelabs session/job name not set #202

Closed
kerin opened this issue Jul 9, 2014 · 8 comments
Closed

Saucelabs session/job name not set #202

kerin opened this issue Jul 9, 2014 · 8 comments

Comments

@kerin
Copy link

kerin commented Jul 9, 2014

With our current test configuration:

{
  "src_folders" : ["tests/javascript/nightwatch"],
  "output_folder" : "reports/nightwatch",

  "selenium" : {
    "start_process" : false,
    "host": "ondemand.saucelabs.com",
    "port": 80
  },

  "test_settings" : {
    "default" : {
      "launch_url" : "${LAUNCH_URL}",
      "silent": true,
      "desiredCapabilities": {
        "browserName": "phantomjs"
      }
    },

    "chrome34win81": {
      "launch_url" : "${LAUNCH_URL}",
      "silent": true,
      "selenium_host": "ondemand.saucelabs.com",
      "selenium_port": 80,
      "username": "${SAUCE_USER}",
      "access_key": "${SAUCE_KEY}",
      "desiredCapabilities": {
        "browserName": "chrome",
        "platform": "Windows 8.1",
        "version": "35"
      }
    },

    "ie9win7": {
      "silent": true,
      "launch_url" : "${LAUNCH_URL}",
      "selenium_host": "ondemand.saucelabs.com",
      "selenium_port": 80,
      "username": "${SAUCE_USER}",
      "access_key": "${SAUCE_KEY}",
      "desiredCapabilities": {
        "browserName": "internet explorer",
        "platform": "Windows XP",
        "version": "7"
      }
    }

  }
}

Test names aren't set as the Saucelab session/job name, so all jobs are shown as 'Unnamed job':

screenshot 2014-07-09 11 59 40

Is this a bug, a feature request, or am I missing something in our nightwatch.json?

@beatfactor
Copy link
Member

the latter, check: https://github.com/beatfactor/nightwatch/blob/master/bin/nightwatch.json#L53

@beatfactor beatfactor reopened this Jul 9, 2014
@kerin
Copy link
Author

kerin commented Jul 9, 2014

I did notice that, but then every job for a given run has the same name, so it's not much different from 'unnamed job' - what would really be useful is if each job had the name of the corresponding test, as in the second screenshot in #140

@beatfactor
Copy link
Member

hmm, ok. So that means you need to alter the desiredCapabilities per module?

@kerin
Copy link
Author

kerin commented Jul 9, 2014

Ideally, yes - we're running Nightwatch tests on Saucelabs via Jenkins, so when a test fails we can see in Jenkins which test it was, but currently have no easy way to find the associated job in Saucelabs and see what actually happened in the test run.

@beatfactor
Copy link
Member

The other saucelabs specific functionality you'll have to build in yourself, as seen in this example from the saucelabs branch:
https://github.com/beatfactor/nightwatch/blob/features/saucelabs-job-update/examples/tests/google.js

We also need to merge the changes there into master also of course.

@mam-p
Copy link

mam-p commented Jul 15, 2014

Andrei: Any idea when the test names will appear in the Sauce results without us having to build it in? I followed your example nightwatch.json, so all of my jobs are named "test-example"; it is virtually impossible to locate the failing one(s) so we can see the video from Sauce.

@beatfactor
Copy link
Member

can we close this?

@satish2516
Copy link

If you are using java use the Desired capability as
caps.setCapability("name", "Your Job name");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants