protractor timeout after 30000msec

2019-04-10 17:19发布

问题:

I am tryin to integrate protractor e2e tests in my cruisecontrol I am using the following testspec:

describe('index', function () {
    var ptor;

    it('should have a title', function () {
        browser.get('http://juliemr.github.io/protractor-demo/');

        expect(browser.getTitle()).toEqual('Super Calculator');
    });

    it('Check google', function () {
        browser.driver.get('http://www.google.com');
    })
});

When I run this spec though the command line works fine. However when I run it as a nant target in the build config it says there is a timeout error:

31mtimeout: timed out after 30000 msec waiting for spec to complete

How can I get my protractor e2e tests goin though the cc.net ?

回答1:

You can try to set time out interval, for example: jasmineNodeOpts: {defaultTimeoutInterval: 500000} more info here



回答2:

Try adding below timeoutinterval in config file

jasmineNodeOpts: {
defaultTimeoutInterval: 360000
}
allScriptsTimeout: 360000,

You can modify the miliseconds of timeout