teerapap / grunt-protractor-runner

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

Build fails when running on Chrome even though specs pass #117

Open chazzlabs opened 9 years ago

chazzlabs commented 9 years ago

I'm running on Windows 8.1 using grunt-protractor-webdriver and grunt-protractor-runner. When I have this config:

multiCapabilities: [
        { 'browserName': 'firefox' },
        { 'browserName': 'chrome' }
    ]

my tests pass on Firefox and Chrome and the build is successful. With this config:

capabilities: {
        browserName: 'chrome'
    }

I get the following output:

Running "protractor:local" (protractor) task
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
Session created: count=1, browserName=chrome
Started
*.

2 specs, 0 failures, 1 pending spec
Finished in 5.977 seconds
Session deleted: Going to shut down the Selenium server
Shutting down Selenium server: http://127.0.0.1:4444
Shut down Selenium server: http://127.0.0.1:4444 (OKOK)

<projectDir>\node_modules\grunt-protractor-runner\node_modules\protractor\node_modules\selenium-webdriver\http\index.js:145

      callback(new Error(message));
               ^
>>
Warning: Tests failed, protractor exited with code: 1 Use --force to continue.

Aborted due to warnings.
chazzlabs commented 9 years ago

This seems related to #111 and seckardt/grunt-protractor-webdriver/issues/11. Adding

keepAlive = true

to my protractor_options resolves the issue, but I'm not sure I like that workaround.