【发布时间】:2016-10-26 03:40:40
【问题描述】:
按照基于量角器的项目的 testingBot 示例,我得到了这段代码
var TestingBot = require('testingbot-api');
describe('Protractor Demo App', function () {
var tb;
beforeEach(function () {
tb = new TestingBot({
api_key: "master_key",
api_secret: "secret_007"
});
});
afterEach(function () {
browser.getSession().then(function (session) {
tb.updateTest({
'test[success]': true/*where do I get this 'test[success]' attribute? */
}, session.getId(), function () {
console.log("Hi! :D");
});
})
});
it('should have a title', function () {
browser.get('http://juliemr.github.io/protractor-demo/');
expect(browser.getTitle()).toEqual('Super Calculator');
});
});
我需要通过 tb.updateTest() 将测试成功发送回,但我不知道从哪里获得通过或失败测试的值。现在这个值是静态的。我也很欣赏茉莉花的方法。
【问题讨论】:
标签: jasmine protractor automated-tests