SauceLabs で分度器テストを正常に実行していますが、テストの名前をサービスに送信できるようにしたいと考えています。たとえば、すべてのテストがブラウザー名でグループ化されています。
テスト名を SauceLabs に渡す方法はありますか?
SauceLabs で分度器テストを正常に実行していますが、テストの名前をサービスに送信できるようにしたいと考えています。たとえば、すべてのテストがブラウザー名でグループ化されています。
テスト名を SauceLabs に渡す方法はありますか?
次のようなものを追加するだけでよい場合があります。
var testName = 'Testing'; //Change Project's name here in order to be identified in BrowserStack
// An example configuration file.
exports.config = {
// The address of a running selenium server.
seleniumAddress: 'http://xxxxx:xxxxx@ondemand.saucelabs.com:80/wd/hub',
//seleniumAddress: 'http://hub.browserstack.com/wd/hub',
//seleniumAddress: 'http://127.0.0.1:4723/wd/hub',//Local Appium
// Capabilities to be passed to the webdriver instance.
multiCapabilities: [
{
name: testName,
platformName: 'iOS',
platformVersion: '7.1',
browserName: '',
app: 'safari',
deviceName: 'iPhone Simulator',
'appium-version': "1.4.0",
username: 'xxxxxx',
accessKey: 'xxxxx'
}
,
{
name: testName,
platformName: 'Android',
platformVersion: '4.4',
browserName: 'Browser',
deviceName: 'Android Emulator',
'appium-version': "1.4.0",
username: 'xxxxx',
accessKey: 'xxxxx'
}
],
次の小さなスクリプトを実行できます。
browser.executeScript("sauce:job-name=" + name )
テストの開始中または開始直前に名前を動的に設定したい場合に一般的に役立ちます。