我在使用REST API进行Sauce Labs测试时遇到了一些问题,我使用了一个命令:
$ curl -X POST https://saucelabs.com/rest/v1/username/js-tests -u username:key -d platforms ='[[“Windows 8.1”,“chrome”,“44.0”],[“Windows 8.1”,“firefox”,“ 39.0“],[”Windows 8.1“,”Internet Explorer“,”11.0“],[”Windows 8“,”Internet Explorer“,”10.0“],[”Windows 7“,”Internet Explorer“,”9.0“ ],[“OS X 10.10”,“safari”,“8.0”],[“OS X 10.11”,“safari”,“8.1”],[“Linux”,“chrome”,“44.0”],[“ Linux“,”firefox“,”39.0“]]'-d url =”http://test-page.html“-d framework = mocha -d name = name -d passed = true -d public = public -d构建= 20
效果很好。但是,如果我尝试将某些移动设备添加到平台列表中,则会导致一些问题:
["iOS", "iphone", "8.4", "iPhone Simulator"]
["Android", "android", "5.1", "AndroidEmulator"]
这种情况会导致邮件Resolution you specified is not available for this OS/browser/version/device combo
所以我尝试指定屏幕分辨率:
["iOS", "iphone", "8.4", "iPhone Simulator", "1024x768"]
["Android", "android", "5.1", "AndroidEmulator", "1024x768"]
// or
["iOS", "iphone", "8.4", "iPhone Simulator", "portrait"]
["Android", "android", "5.1", "AndroidEmulator", "portrait"]
这种情况会导致消息"Invalid platform '['iOS', 'iphone', '8.4', 'iPhone Simulator', 'portrait']"
那么我如何将这两个平台添加到我的平台列表中呢?
答案 0 :(得分:0)
我使用的格式无效。有效:
["iOS", "iphone", "8.4"]
["Android", "android", "5.1"]