How to pass the functional test name to Sauce Labs using intern.io

StackOverflow https://stackoverflow.com/questions/23506486

  •  16-07-2023
  •  | 
  •  

Вопрос

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();
    }
  });
});
Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top