我成功地在SauceLabs上运行了我的量程器测试,尽管我希望能够将我的测试名称发送到服务,例如我的所有测试都按浏览器名称进行分组。量角器和Saucelabs发送测试名称
有没有一种方法可以将测试名称传递给SauceLabs?
我成功地在SauceLabs上运行了我的量程器测试,尽管我希望能够将我的测试名称发送到服务,例如我的所有测试都按浏览器名称进行分组。量角器和Saucelabs发送测试名称
有没有一种方法可以将测试名称传递给SauceLabs?
如果在测试过程中,您拥有SauceLabs sessionId,那么就像发送JSON包到the REST API一样简单。
curl https://saucelabs.com/rest/v1/users/USERNAME -u YOUR_USERNAME:ACCESS_KEY
你或许可以通过启动手动SauceLabs会话,从它得到的会话ID,然后手动发送在browsser JSON REST客户端API请求,如“Postma N”进行测试。
你可能只需要增加这样的事情:
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:[email protected]: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'
}
],
我所见过的名字,并建立领域,但问题是这些获取代码开始运行之前设置,所以无法通过测试名字进入。我可以通过在'''beforeEach''上运行一个'''this.description'''来获得每个测试的名字,但是我正努力将其注入到配置中。 – joshuahornby10 2014-11-06 15:07:57
'name'和'build'只能在Selenium实例启动时设置。您在测试套件中启动了多少个实例? – Louis 2014-11-06 23:28:33