2
votes

Of all the documentation on the headless chrome automated testing, there is little about doing it on windows. Even less info is out there on using headless chrome for automated testing, particularly e2e, for a fully developed app in Angular 2.

I have a sizable Angular 2 app for which I run 170 protractor tests which takes about 30 mins each time. I want to use the headless chrome option to get faster execution and of course, not have the window popping up all the time.

So far -

  1. added options to protractor conf
  2. updated protractor, webdriver-manager (got to chromedriver_2.31)
  3. have chrome beta(60) up and running
  4. Angular 4 out-of-the-box app (with similar test cases added) runs flawlessly

My question - What am I missing? There is no mention of minimum angular requirements anywhere or minimum version of any package for that matter other than the chrome driver being up to date. Has anyone tried to use this in an existing angular 2 app? If succeeded, then please share.

After step 2, I get the following error

protractor ./config/test/chrome.conf

Report destination:   report\report.html
[19:43:11] I/launcher - Running 1 instances of WebDriver
[19:43:11] I/direct - Using ChromeDriver directly...
[19:43:11] E/direct - Error code: 135
[19:43:11] E/direct - Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
[19:43:11] E/direct - Error: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
    at IError (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\built\exitCodes.js:6:1)
    at ProtractorError (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\built\exitCodes.js:11:9)
    at BrowserError (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\built\exitCodes.js:52:9)
    at Direct.getNewDriver (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\built\driverProviders\direct.js:63:31)
    at Runner.createBrowser (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\built\runner.js:195:43)
    at q.then.then (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\built\runner.js:339:29)
    at _fulfilled (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54)
    at self.promiseDispatch.done (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30)
    at Promise.promise.promiseDispatch (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13)
    at C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:556:49
[19:43:11] E/launcher - Process exited with error code 135
1

1 Answers

0
votes

Try running ./node_modules/protractor/bin/webdriver-manager update your project directory to update your project's local protractor installation.