formidablelabs / rowdy Goto Github PK
View Code? Open in Web Editor NEWA small, rambunctious WD.js / WebdriverIO configuration wrapper.
License: MIT License
A small, rambunctious WD.js / WebdriverIO configuration wrapper.
License: MIT License
Error from npm test
.
[SERVER] [stderr] 15:19:06.455 ERROR - org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "X:\scm\fmd\rowdy\node_modules\.bin\phantomjs" (in directory "."):
CreateProcess error=193, %1 is not a valid Win32 application)
[SERVER] [stderr] 15:19:06.455 DEBUG - Exception: [null, newSession {desiredCapabilities=Capabilities [{browserName=phantomjs, javascriptEnabled=true, version=, platform=ANY}]}]
... but weirdly:
X:\scm\fmd\rowdy>node_modules\.bin\phantomjs
phantomjs> phantom.exit()
works.
Potentially related issues:
Full npm test
works with:
diff --git a/lib/server.js b/lib/server.js
index 8080633..ee5b006 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -86,7 +86,10 @@ Server.prototype.start = function (callback) {
// Start selenium process.
selenium.start({
- seleniumArgs: debug ? ["-debug"] : [],
+ seleniumArgs: [].concat(
+ debug ? ["-debug"] : [],
+ ["-Dphantomjs.binary.path=..\\..\\node_modules\\phantomjs\\lib\\phantom\\phantomjs.exe"]
+ ),
spawnOptions: {
stdio: "pipe"
},
TASK:
I want to set the global waitforTimeout on webdriverio. http://webdriver.io/guide/testrunner/timeouts.html#WebdriverIO_related_timeouts
how is this done in rowdy config? (i am also using sauceLabs)
If you supply mocha/node with the --use_strict
flag, rowdy throws the following error:
TypeError: Cannot read property 'async' of undefined
at node_modules/portscanner/node_modules/async/lib/async.js:8:30
at Object.<anonymous> (node_modules/portscanner/node_modules/async/lib/async.js:690:2)
at require (internal/module.js:20:19)
at Object.<anonymous> (node_modules/portscanner/node_modules/async/index.js:3:18)
at require (internal/module.js:20:19)
at Object.<anonymous> (node_modules/portscanner/lib/portscanner.js:3:14)
at require (internal/module.js:20:19)
at Server.start (node_modules/rowdy/lib/server.js:83:21)
at Function.rowdy.setupServer (node_modules/rowdy/index.js:59:19)
at Context.<anonymous> (node_modules/rowdy/adapters/mocha/server.js:30:11)
It's only used once and for deep merge.
The adapter currently unconditionally starts the local Selenium server, even if it's not used.
server.start
builder
and concurrent
tasks in CI with scripted start of selenium server.It would be nice to have the capability to set the selenium basePath from the rowdy config.
opts.basePath sets the base directory used to load the selenium standalone .jar and drivers
https://www.npmjs.com/package/selenium-standalone#seleniuminstallopts-cb
Hey @ryan-roemer, admittedly this may not be an issue with ROWDY, but possibly a configuration issue. I would like your input.
When I run a test using saucelabs, it seems Windows_2008 is deleting the session before my tests complete. Have you seen this before? I've been banging my head on it.
Issue occurs on:
IE_10_Windows_2008_Desktop
IE_11_Windows_2008_Desktop
(possibly other browsers combos)
sauce commands screenshot: http://ookla.d.pr/1lG54
Works on:
IE_9_Windows_2008_Desktop
IE_10_Windows_2012_Desktop
chrome_26_Windows_2008_Desktop
sauce screenshot: http://ookla.d.pr/17MUk
This screenshot basically picks up where the other one deletes the session.
So the first part of my test works fine until adapter.client.get
try's to get the next url, then the session is deleted.
Consider making selenium-standalone
an optional dependency if a user wants to use rowdy with (1) an already running Sel server and/or (2) BS/SL
When it's ready upstream.
Configuration is complex right now.
lib/config.js
parsing (ugh)options.client|server
settings.local.defaults.server
is confusing and merge path isn't clear.TASK:
Setting ROWDY_SETTINGS="sauceLabs.ie8-winxp"
fails.
See: https://travis-ci.org/FormidableLabs/rowdy/jobs/36314148
Console info:
> [email protected] test /home/travis/build/FormidableLabs/rowdy
> cd examples/mocha && mocha
[cmd] CALL init({"tags":["rowdy@feature-browserstack"],"name":"Functional Tests","browserName":"internet explorer","platform":"Windows XP","version":"8"})
[http] POST /session {"desiredCapabilities":{"tags":["rowdy@feature-browserstack"],"name":"Functional Tests","browserName":"internet explorer","platform":"Windows XP","version":"8","javascriptEnabled":true}}
[status] Driving the web on session: 2a07e6e80f0447919022275aac3005fe
[cmd] RESPONSE init({"tags":["rowdy@feature-browserstack"],"name":"Functional Tests","browserName":"internet explorer","platform":"Windows XP","version":"8"}) "2a07e6e80f0447919022275aac3005fe",{"takesScreenshot":true,"webdriver.remote.sessionid":"2a07e6e80f0447919022275aac3005fe","unexpectedAlertBehaviour":"dismiss","ie.browserCommandLineSwitches":"","browserAttachTimeout":0,"ie.ensureCleanSession":false,"ignoreProtectedModeSettings":false,"platform":"WINDOWS","version":"8","ignoreZoomSetting":false,"nativeEvents":true,"handlesAlerts":true,"javascriptEnabled":true,"requireWindowFocus":false,"ie.usePerProcessProxy":false,"hasMetadata":true,"proxy":{"proxyAutoconfigUrl":"http://127.0.0.1:19876/proxy.pac","proxyType":"pac"},"initialBrowserUrl":"http://localhost:58779/","enableElementCacheCleanup":true,"cssSelectorsEnabled":true,"browserName":"internet explorer","elementScrollBehavior":0,"enablePersistentHover":true,"ie.forceCreateProcessApi":false}
[cmd] CALL setImplicitWaitTimeout(200)
[http] POST /session/:sessionID/timeouts/implicit_wait {"ms":200}
[cmd] RESPONSE setImplicitWaitTimeout(200)
notes
[cmd] CALL get("http://backbone-testing.com/notes/app/")
[http] POST /session/:sessionID/url {"url":"http://backbone-testing.com/notes/app/"}
[cmd] RESPONSE get("http://backbone-testing.com/notes/app/")
[cmd] CALL waitForElementByCss("input#note-new-input")
[cmd] CALL elements("css selector","input#note-new-input")
[http] POST /session/:sessionID/elements {"using":"css selector","value":"input#note-new-input"}
[cmd] RESPONSE elements("css selector","input#note-new-input") [{"ELEMENT":"0"}]
[cmd] RESPONSE waitForElementByCss("input#note-new-input") {"ELEMENT":"0"}
[cmd] CALL element.type("Delete Test")
[http] POST /session/:sessionID/element/0/value {"value":["Delete Test"]}
1) adds a note and deletes it
[cmd] CALL get("http://backbone-testing.com/notes/app/")
[http] POST /session/:sessionID/url {"url":"http://backbone-testing.com/notes/app/"}
[cmd] RESPONSE get("http://backbone-testing.com/notes/app/")
[cmd] CALL waitForElementByCss("input#note-new-input")
[cmd] CALL elements("css selector","input#note-new-input")
[http] POST /session/:sessionID/elements {"using":"css selector","value":"input#note-new-input"}
[cmd] RESPONSE elements("css selector","input#note-new-input") [{"ELEMENT":"1"}]
[cmd] RESPONSE waitForElementByCss("input#note-new-input") {"ELEMENT":"1"}
[cmd] CALL element.type("Edit Test")
[http] POST /session/:sessionID/element/1/value {"value":["Edit Test"]}
2) adds a note and edits it
[cmd] CALL sauceJobStatus(false)
[http] POST /rest/v1/:user/jobs/:sessionID {"passed":false}
[cmd] RESPONSE sauceJobStatus(false)
[cmd] CALL quit()
[http] DELETE /session/:sessionID
[status] Ending your web drivage..
[cmd] RESPONSE quit()
0 passing (14s)
2 failing
1) notes adds a note and deletes it:
Error: [element.type("Delete Test")] Error response status: 11, ElementNotVisible - An element command could not be completed because the element is not visible on the page. Selenium error: Element is not displayed (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 46 milliseconds
Build info: version: '2.40.0', revision: 'fbe29a9', time: '2014-02-19 20:54:28'
System info: host: 'chef-win2003', ip: '172.20.45.7', os.name: 'Windows 2003', os.arch: 'x86', os.version: '5.2', java.version: '1.7.0_45'
Session ID: XXXXXXXX-XXXX-XXXX-XXXX-XXXX43ea9301
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{platform=WINDOWS, javascriptEnabled=true, elementScrollBehavior=0, ignoreZoomSetting=false, enablePersistentHover=true, ie.ensureCleanSession=false, browserName=internet explorer, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss, version=8, ie.usePerProcessProxy=false, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, requireWindowFocus=false, handlesAlerts=true, initialBrowserUrl=http://localhost:58779/, ie.forceCreateProcessApi=false, nativeEvents=true, proxy={proxyAutoconfigUrl=http://127.0.0.1:19876/proxy.pac, proxyType=pac}, browserAttachTimeout=0, ie.browserCommandLineSwitches=, takesScreenshot=true}]
at exports.newError (/home/travis/build/FormidableLabs/rowdy/node_modules/wd/lib/utils.js:139:13)
at /home/travis/build/FormidableLabs/rowdy/node_modules/wd/lib/callbacks.js:33:23
at /home/travis/build/FormidableLabs/rowdy/node_modules/wd/lib/webdriver.js:169:5
at Request._callback (/home/travis/build/FormidableLabs/rowdy/node_modules/wd/lib/http-utils.js:84:7)
at Request.self.callback (/home/travis/build/FormidableLabs/rowdy/node_modules/wd/node_modules/request/request.js:236:22)
at Request.emit (events.js:98:17)
at Request.<anonymous> (/home/travis/build/FormidableLabs/rowdy/node_modules/wd/node_modules/request/request.js:1142:14)
at Request.emit (events.js:117:20)
at IncomingMessage.<anonymous> (/home/travis/build/FormidableLabs/rowdy/node_modules/wd/node_modules/request/request.js:1096:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:943:16
at process._tickCallback (node.js:419:13)
2) notes adds a note and edits it:
Error: [element.type("Edit Test")] Error response status: 11, ElementNotVisible - An element command could not be completed because the element is not visible on the page. Selenium error: Element is not displayed (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 78 milliseconds
Build info: version: '2.40.0', revision: 'fbe29a9', time: '2014-02-19 20:54:28'
System info: host: 'chef-win2003', ip: '172.20.45.7', os.name: 'Windows 2003', os.arch: 'x86', os.version: '5.2', java.version: '1.7.0_45'
Session ID: XXXXXXXX-XXXX-XXXX-XXXX-XXXX43ea9301
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{platform=WINDOWS, javascriptEnabled=true, elementScrollBehavior=0, ignoreZoomSetting=false, enablePersistentHover=true, ie.ensureCleanSession=false, browserName=internet explorer, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss, version=8, ie.usePerProcessProxy=false, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, requireWindowFocus=false, handlesAlerts=true, initialBrowserUrl=http://localhost:58779/, ie.forceCreateProcessApi=false, nativeEvents=true, proxy={proxyAutoconfigUrl=http://127.0.0.1:19876/proxy.pac, proxyType=pac}, browserAttachTimeout=0, ie.browserCommandLineSwitches=, takesScreenshot=true}]
at exports.newError (/home/travis/build/FormidableLabs/rowdy/node_modules/wd/lib/utils.js:139:13)
at /home/travis/build/FormidableLabs/rowdy/node_modules/wd/lib/callbacks.js:33:23
at /home/travis/build/FormidableLabs/rowdy/node_modules/wd/lib/webdriver.js:169:5
at Request._callback (/home/travis/build/FormidableLabs/rowdy/node_modules/wd/lib/http-utils.js:84:7)
at Request.self.callback (/home/travis/build/FormidableLabs/rowdy/node_modules/wd/node_modules/request/request.js:236:22)
at Request.emit (events.js:98:17)
at Request.<anonymous> (/home/travis/build/FormidableLabs/rowdy/node_modules/wd/node_modules/request/request.js:1142:14)
at Request.emit (events.js:117:20)
at IncomingMessage.<anonymous> (/home/travis/build/FormidableLabs/rowdy/node_modules/wd/node_modules/request/request.js:1096:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:943:16
at process._tickCallback (node.js:419:13)
npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0
The command "[ "$ROWDY_CHECK" ] || npm test" exited with 1.
Done. Your build exited with 1.
Experiment: Took existing green build #80.2 with console text:
[SERVER] [stderr] 05:08:52.079 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@1aaeead8
05:08:52.079 INFO - Started HttpContext[/wd,/wd]
[CLIENT] [cmd] CALL init({"browserName":"phantomjs"})
[CLIENT] [http] POST /session {"desiredCapabilities":{"browserName":"phantomjs","version":"","javascriptEnabled":true,"platform":"ANY"}}
[SERVER] [stderr] 05:08:52.084 INFO - Started SocketListener on 0.0.0.0:4444
05:08:52.085 INFO - Started org.openqa.jetty.jetty.Server@95b24dd
[SERVER] [stderr] 05:08:52.479 INFO - Executing: [new session: Capabilities [{platform=ANY, javascriptEnabled=true, browserName=phantomjs, version=}]])
[SERVER] [stderr] 05:08:52.499 INFO - Creating a new session for Capabilities [{platform=ANY, javascriptEnabled=true, browserName=phantomjs, version=}]
And rebuilt it:
[SERVER] [stderr] 23:50:38.630 INFO - RemoteWebDriver instances should connect to: http://127.0.0.2:4444/wd/hub
[SERVER] [stderr] 23:50:38.630 INFO - Selenium Server is up and running
[SERVER] [error] Error: Server start timeout
1) "before all" hook
0 passing (5s)
1 failing
1) "before all" hook:
Error: Server start timeout
at null.<anonymous> (/home/travis/build/FormidableLabs/rowdy/lib/server.js:127:15)
And now it fails.
Looks like new "started" string in log Selenium Server is up and running
.
ROWDY_SETTINGS="local.safari" npm test
ROWDY_SETTINGS="local.phantomjs" npm test
ROWDY_SETTINGS="local.firefox" npm test
ROWDY_SETTINGS="local.chrome" npm test
cmd /C "set ROWDY_SETTINGS=local.ie && npm test"
cmd /C "set ROWDY_SETTINGS=local.phantomjs && npm test"
chore-win-compat
cmd /C "set ROWDY_SETTINGS=local.firefox && npm test"
cmd /C "set ROWDY_SETTINGS=local.chrome && npm test"
All of BS is now failing with:
Error: [init({"name":"ryanroemer2@master","project":"Rowdy Tests","build":"111@d9d999050aa9f5aa8f3c19c0ebe65c9998052259","browserName":"safari","os":"OS X","os_version":"Mavericks"})] The environment you requested was unavailable.
Disabling until we can get a handle on what's going so, so wrong...
Target library:
POC for a full port: https://github.com/FormidableLabs/rowdy/compare/chore-rowdio-bootstrap
Current work:
package.json
with permissive dependencies.WD.js
, wd
config.js
so that it permissively swaps WD.js/WebdriverIO differences (like host for BS/SL, etc.)Done:
adapter.refreshClient(cb)
as an alternative to perTest
.Need additional status setting in the following situations:
perTest: true
. Need status after each test.adapter.refreshClient()
. Need status after each call (this may be weird to set).UPDATE: On thinking through this more, the most correct plan of action is probably:
Because it keeps failing for now reason...
Seems spurious -- as other build of same setting succeeded. Maybe there is some hidden async thing with guacamole?
1) "before all" hook:
Error: Bad ROWDY_SETTINGS path: sauceLabs.IE_11_Windows_2012_R2_Desktop
at /home/travis/build/FormidableLabs/rowdy/lib/config.js:231:13
at arrayReduce (/home/travis/build/FormidableLabs/rowdy/node_modules/lodash/index.js:1516:23)
at Function.<anonymous> (/home/travis/build/FormidableLabs/rowdy/node_modules/lodash/index.js:3505:13)
at module.exports (/home/travis/build/FormidableLabs/rowdy/lib/config.js:229:19)
at module.exports (/home/travis/build/FormidableLabs/rowdy/index.js:12:13)
at Function.Object.defineProperty.get (/home/travis/build/FormidableLabs/rowdy/index.js:25:7)
at Object.defineProperty.get (/home/travis/build/FormidableLabs/rowdy/adapters/mocha/base.js:13:36)
at Context.<anonymous> (/home/travis/build/FormidableLabs/rowdy/adapters/mocha/server.js:22:15)
Just build permutations from several arrays to programmatically create things like:
- ROWDY_SETTINGS="sauceLabs.safari7-mac"
- ROWDY_SETTINGS="sauceLabs.chrome-win7"
- ROWDY_SETTINGS="sauceLabs.firefox-win7"
- ROWDY_SETTINGS="sauceLabs.ie9-win7"
- ROWDY_SETTINGS="sauceLabs.ie10-win7"
- ROWDY_SETTINGS="sauceLabs.ie11-win8"
BrowserStack + Safari is failing like 3/4 times or something.
Now Safari + SauceLabs is too which means there may be a poor test / bad adapter / bad library issue with how we deal with maybe client teardown and the browser window not being in focus / available ??
Different SL issues:
/cc @Maciek416
Using worker: worker-linux-docker-f8ef7611.prod.travis-ci.org:travis-linux-2
## SNIPPED ##
$ export ROWDY_OPTIONS='{ "client":{ "logger":true }, "server":{ "logger":true } }'
$ export SAUCE_USERNAME=[secure]
$ export SAUCE_ACCESS_KEY=[secure]
$ export BROWSER_STACK_USERNAME=[secure]
$ export BROWSER_STACK_ACCESS_KEY=[secure]
$ export ROWDY_SETTINGS="sauceLabs.safari_7_OS_X_10_9_Desktop"
## SNIPPED ##
-----
0.01s$ if [ "$ROWDY_CHECK" ]; then npm run check; else true; fi
The command "if [ "$ROWDY_CHECK" ]; then npm run check; else true; fi" exited with 0.
0.01s$ if [ "$ROWDY_CHECK" ]; then ROWDY_OPTIONS="{ \"client\":{ \"logger\":true }, \"server\":{ \"logger\":true,\"port\":4321 } }" npm run test; else true; fi
The command "if [ "$ROWDY_CHECK" ]; then ROWDY_OPTIONS="{ \"client\":{ \"logger\":true }, \"server\":{ \"logger\":true,\"port\":4321 } }" npm run test; else true; fi" exited with 0.
192.42s$ [ "$ROWDY_CHECK" ] || npm test
> [email protected] test /home/travis/build/FormidableLabs/rowdy
> npm run test-wd && npm run test-webdriverio
> [email protected] test-wd /home/travis/build/FormidableLabs/rowdy
> npm run test-wd-default-config && npm run test-wd-manual-config && npm run test-wd-per-test-client
> [email protected] test-wd-default-config /home/travis/build/FormidableLabs/rowdy
> cd examples/mocha/wd && mocha
notes - wd.js
✓ adds a note and deletes it (4650ms)
✓ adds a note and edits it (4493ms)
with refreshed (new) client
1) "before each" hook
2) "after all" hook
2 passing (3m)
2 failing
1) notes - wd.js with refreshed (new) client "before each" hook:
Error: timeout of 60000ms exceeded. Ensure the done() callback is being called in this test.
2) "after all" hook:
Error: timeout of 60000ms exceeded. Ensure the done() callback is being called in this test.
npm ERR! Linux 3.13.0-40-generic
npm ERR! argv "/home/travis/.nvm/versions/node/v0.12.7/bin/node" "/home/travis/.nvm/versions/node/v0.12.7/bin/npm" "run" "test-wd-default-config"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] test-wd-default-config: `cd examples/mocha/wd && mocha`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] test-wd-default-config script 'cd examples/mocha/wd && mocha'.
npm ERR! This is most likely a problem with the rowdy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cd examples/mocha/wd && mocha
npm ERR! You can get their info via:
npm ERR! npm owner ls rowdy
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/travis/build/FormidableLabs/rowdy/npm-debug.log
npm ERR! Linux 3.13.0-40-generic
npm ERR! argv "/home/travis/.nvm/versions/node/v0.12.7/bin/node" "/home/travis/.nvm/versions/node/v0.12.7/bin/npm" "run" "test-wd"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] test-wd: `npm run test-wd-default-config && npm run test-wd-manual-config && npm run test-wd-per-test-client`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test-wd script 'npm run test-wd-default-config && npm run test-wd-manual-config && npm run test-wd-per-test-client'.
npm ERR! This is most likely a problem with the rowdy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run test-wd-default-config && npm run test-wd-manual-config && npm run test-wd-per-test-client
npm ERR! You can get their info via:
npm ERR! npm owner ls rowdy
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/travis/build/FormidableLabs/rowdy/npm-debug.log
npm ERR! Test failed. See above for more details.
The command "[ "$ROWDY_CHECK" ] || npm test" exited with 1.
Done. Your build exited with 1.
$ export DISPLAY=:99.0######################################################################## 100.0%
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.