Question

When viewing the functional tests on the saucelabs.com/tests page it appears that the Session column is displaying the test directory path name and not the test name that is defined inside of each functional test. My assumption was that the name property in the test would get passed to Sauce Labs but maybe this gets defined elsewhere?

define([
  'intern!object',
  'intern/chai!assert',
  'require'
], function (registerSuite, assert, require) {

  var copy = {
    inputValue: 'admin'
  };

  registerSuite({
    name: 'loginTest',

    'login test': function () {

      return this.remote
        .get(require.toUrl('http://localhost:9090/#login'))
        .waitForElementByCssSelector('body#console', 5000)

        .waitForElementByCssSelector('.progress', 5000)

        // Login Form
        // -------------------------
        .waitForElementByCssSelector('input[name=username]', 10000)
        .elementByCssSelector('input[name=username]')
          .clickElement()
          .type(copy.inputValue)
          .end()

        .elementByCssSelector('input[name=password]')
          .clickElement()
          .type(copy.inputValue)
          .end()

        .elementByCssSelector('#view-login button[type=submit]')
          .clickElement()
          .end();
    }
  });
});
Was it helpful?

Solution

All the functional tests in a configuration file run against a single browser instance on Sauce Labs, so it doesn’t make sense to pass a suite name to Sauce as the name for the test run. The name given to Sauce refers to the configuration file which was used to execute the tests, since this is the file that defines which tests were to be executed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top