angular / protractor

E2E test framework for Angular apps
http://www.protractortest.org
MIT License
8.75k stars 2.31k forks source link

Protractor passes tests without running the tests. #3125

Closed jgossett closed 8 years ago

jgossett commented 8 years ago

SYMPTOMS

When Protractor is run, the test pass however Protractor does not run through the pages. The page load blank and have "data:text/html" or "data:text/html" in the address. (see screenshot).

The test show passes but 0 assertions. See the Protractor output below.

Also, I work on a team. This does not occur with other team members.

Screenshot http://i.stack.imgur.com/An9Uv.jpg

Console Output

[09:49:23] Using gulpfile c:\Workspace\main\cuas-ui\gulpfile.js
[09:49:23] Starting 'cleanProtractor'...
[09:49:23] Starting 'ft'...
[09:49:23] Finished 'cleanProtractor' after 14 ms
[09:49:23] Finished 'ft' after 5.23 ms
[launcher] Running 5 instances of WebDriver
...................
------------------------------------
    [chrome #1-0] PID: 9540
[chrome #1-0] Specs: c:\Workspace\main\cuas-ui\test\functional\account-spec.js
[chrome #1-0] 
[chrome #1-0] Starting selenium standalone server...
[chrome #1-0] Selenium standalone server started at http://10.212.159.91:58064/wd/hub
[chrome #1-0] ...........Uncaught exception: Error while waiting for Protractor to sync with the page: "angular could not be found on the window"

[launcher] Runner process exited unexpectedly with error code: 1
[launcher] 5 instance(s) of WebDriver still running

------------------------------------
[chrome #1-4] PID: 15712
[chrome #1-4] Specs: c:\Workspace\main\cuas-ui\test\functional\assignGroupsToOrders-spec.js
[chrome #1-4] 
[chrome #1-4] Starting selenium standalone server...
[chrome #1-4] Selenium standalone server started at http://10.212.159.91:53291/wd/hub
[chrome #1-4] ...
[chrome #1-4] 
[chrome #1-4] Finished in 0.197 seconds
[chrome #1-4] 3 tests, 0 assertions, 0 failures

 [0m [chrome #1-4] [chrome #1-4] Shutting down selenium standalone server.

[launcher] 5 instance(s) of WebDriver still running

------------------------------------
[chrome #1-3] PID: 1960
[chrome #1-3] Specs: c:\Workspace\main\cuas-ui\test\functional\accountUserUnlock-spec.js
[chrome #1-3] 
[chrome #1-3] Starting selenium standalone server...
[chrome #1-3] Selenium standalone server started at http://10.212.159.91:62120/wd/hub
[chrome #1-3] .
[chrome #1-3] 
[chrome #1-3] Finished in 0.108 seconds
[chrome #1-3] 1 test, 2 assertions, 0 failures

 [0m [chrome #1-3] [chrome #1-3] Shutting down selenium standalone server.

[launcher] 5 instance(s) of WebDriver still running

------------------------------------
[chrome #1-2] PID: 12664
[chrome #1-2] Specs: c:\Workspace\main\cuas-ui\test\functional\accountUserEdit-spec.js
[chrome #1-2] 
[chrome #1-2] Starting selenium standalone server...
[chrome #1-2] Selenium standalone server started at http://10.212.159.91:52770/wd/hub
[chrome #1-2] ..
[chrome #1-2] 
[chrome #1-2] Finished in 0.165 seconds
[chrome #1-2] 2 tests, 0 assertions, 0 failures

 [0m [chrome #1-2] [chrome #1-2] Shutting down selenium standalone server.

[launcher] 5 instance(s) of WebDriver still running

------------------------------------
[chrome #1-1] PID: 7408
[chrome #1-1] Specs: c:\Workspace\main\cuas-ui\test\functional\accountFeatures-spec.js
[chrome #1-1] 
[chrome #1-1] Starting selenium standalone server...
[chrome #1-1] Selenium standalone server started at http://10.212.159.91:56992/wd/hub
[chrome #1-1] ..
[chrome #1-1] 
[chrome #1-1] Finished in 0.169 seconds
[chrome #1-1] 2 tests, 0 assertions, 0 failures

 [0m [chrome #1-1] [chrome #1-1] Shutting down selenium standalone server.

[launcher] 5 instance(s) of WebDriver still running
......F.F......
------------------------------------
[chrome #1-5] PID: 17184
[chrome #1-5] Specs: c:\Workspace\main\cuas-ui\test\functional\assignUserToGroup-spec.js
[chrome #1-5] 
[chrome #1-5] Starting selenium standalone server...
[chrome #1-5] Selenium standalone server started at http://10.212.159.91:60187/wd/hub
[chrome #1-5] ...
[chrome #1-5] 
[chrome #1-5] Finished in 0.111 seconds
[chrome #1-5] 3 tests, 0 assertions, 0 failures

 [0m [chrome #1-5] [chrome #1-5] Shutting down selenium standalone server.

------------------------------------
[chrome #1-25] PID: 16200
[chrome #1-25] Specs: c:\Workspace\main\cuas-ui\test\functional\siteLetter-spec.js
[chrome #1-25] 
[chrome #1-25] Starting selenium standalone server...
[chrome #1-25] Selenium standalone server started at http://10.212.159.91:54525/wd/hub
[chrome #1-25] ...
[chrome #1-25] 
[chrome #1-25] Finished in 0.109 seconds
[chrome #1-25] 3 tests, 0 assertions, 0 failures

 [0m [chrome #1-25] [chrome #1-25] Shutting down selenium standalone server.

[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1-0 failed with exit code: 1
[launcher] chrome #1-4 passed
[launcher] chrome #1-3 passed
[launcher] chrome #1-2 passed
[launcher] chrome #1-1 passed
[launcher] chrome #1-5 passed
[launcher] chrome #1-7 passed
[launcher] chrome #1-6 passed
[launcher] chrome #1-8 passed
[launcher] chrome #1-9 failed 2 test(s)
[launcher] chrome #1-10 passed
[launcher] chrome #1-11 passed
[launcher] chrome #1-14 passed
[launcher] chrome #1-12 passed
[launcher] chrome #1-13 passed
[launcher] chrome #1-16 passed
[launcher] chrome #1-15 passed
[launcher] chrome #1-17 passed
[launcher] chrome #1-19 passed
[launcher] chrome #1-18 passed
[launcher] chrome #1-21 failed with exit code: 1
[launcher] chrome #1-20 passed
[launcher] chrome #1-22 passed
[launcher] chrome #1-24 passed
[launcher] chrome #1-23 passed
[launcher] chrome #1-26 failed with exit code: 1
[launcher] chrome #1-25 passed
[launcher] overall: 2 failed spec(s) and 3 process(es) failed to complete
[launcher] Process exited with error code 100

CONFIGURATION

Protractor 2.2.0 Gulp Protractor 1.4.28 Chrome 49.0.2623.112

NickTomlin commented 8 years ago

Can you share an example spec file and your protractor configuration file? As well as the additional items in the issue template

jgossett commented 8 years ago

Nick

Below is the SPEC file.

ofs-spec.txt

Caradonna9 commented 8 years ago

Put all of your variable declarations within the describe block.

juliemr commented 8 years ago

This sounds like a support question if it only occurs for you, so I'm closing it. Please see https://github.com/angular/protractor/blob/master/CONTRIBUTING.md

tjmurphy511 commented 8 years ago

I had a similar issue which was due to the seleniumServerJar config value in my protractor config. I updated the value and the path from where I was running the tests and the issue was fixed.

jgossett commented 8 years ago

tymurphy551,

Thanks for the reply. I was able to fix this issue by upgrading nodejs, protractor and jasmine.

Josh