teerapap / grunt-protractor-runner

A Grunt plugin for running protractor runner.
MIT License
149 stars 123 forks source link

Grunt protractor process exits on any errors without reports #71

Open raksja opened 10 years ago

raksja commented 10 years ago

We have a setup of grunt protractor runner which runs suites. Whenever there is an error on any one of the tests, it just quits the grunt process altogether.

 protractor: {
            options: {
                configFile: 'test/conf/protractor.conf.js',
                keepAlive: true
            },
            'e2e': {
                options: {
                    keepAlive: true,
                    noColor: false,
                    args: {
                        browser: 'chrome'
                    }
                }
            }
 }

Tried the keepAlive: true & false both and no difference. It would be better if we can have some way to handle exceptions.

"grunt-protractor-runner": "^1.0.0", "grunt-protractor-webdriver": "^0.1.8",

teerapap commented 10 years ago

Can you show me the output when grunt process exits ?

Ostro commented 9 years ago

hi, i think i run into the same issue, here is some log printed : my test said

Error: Error while waiting for Protractor to sync with the page: {"stack":"ReferenceError: 'angular' is  undefined\n   at Anonymous function (Unknown script code:24:5)\n   at Anonymous function (Unknown script code:21:20)\n   at Anonymous function (Unknown script code:21:2)","description":"'angular' is undefined","number":-2146823279}

and then after all my webdriver instance terminated i have this :

[launcher] overall: 1 failed spec(s)
>> 
Fatal error: protractor exited with code: 100

this error break grunt process, so i can't handle those kind of error.

chisonne commented 9 years ago

Same problem:

[launcher] overall: 45 failed spec(s) and 1 process(es) failed to complete
25-Aug-2015 12:25:35    [launcher] Process exited with error code 100
25-Aug-2015 12:25:35    >> 
25-Aug-2015 12:25:35    Warning: Tests failed, protractor exited with code: 100 Use --force to continue.

And this is the cause of the failing process:

Uncaught exception: Timed out waiting for Protractor to synchronize with the page after 150 seconds. Please see https://github.com/angular/protractor/blob/master/docs/faq.md

Is running grunt with --force the right solution here?

xfh commented 8 years ago

Are you actually testing a page running AngularJS? If not, then have a look at this discussion: http://stackoverflow.com/q/20927652