Version0 /
Regression Testing in the Browser HostOverviewThe browser host offers automated regression testing. The process is as follows:
SetupThese instructions assume that node.js is already installed. Install the selenium-webdriver package for node: npm install -g selenium-webdriver Firefox is supported by default. Firefox versions 47+ are NOT supported. Additional drivers are required for other browsers; please see the selenium-webdriver page. ExecutionRun using NodeOpen a command prompt, navigate to node regressionTestScript.js Test results are written to <?xml version="1.0" encoding="UTF-8"?> <testsuites> <testsuite name="BrowserHost" tests="7" failed="3"> <testsuite name="Composite Accessor Tests"> <testcase name="test/auto/RampJSDisplay.js> </testcase> <testcase name="test/auto/RampJSTest.js> </testcase> <testcase name="test/auto/RampJSTestDisplay.js> </testcase> <testcase name="test/auto/TestComposite.js> </testcase> <testcase name="net/test/auto/WebSocketClient2JS.js> <failure message="Error from accessor at net/test/auto/WebSocketClient2JS.js: TypeError: WebSocket.supportedReceiveTypes is not a function"/> </testcase> <testcase name="net/test/auto/WebSocketClient3JS.js> <failure message="Error from accessor at net/test/auto/WebSocketClient3JS.js: TypeError: WebSocket.supportedReceiveTypes is not a function"/> </testcase> <testcase name="net/test/auto/WebSocketClientJS.js> <failure message="Error from accessor at net/test/auto/WebSocketClientJS.js: TypeError: WebSocket.supportedReceiveTypes is not a function"/> </testcase> </testsuite> </testsuite> </testsuites> The script will automatically search for an open port, starting at 8089 and incrementing. If a port is occupied, you will see an error message echoed to the console, then the script will try the next port. For example, if ports 8089 and 8090 are occupied: Starting server on port 8089. { [Error: listen EADDRINUSE :::8089] code: 'EADDRINUSE', errno: 'EADDRINUSE', syscall: 'listen', address: '::', port: 8089 } Starting server on port 8090. { [Error: listen EADDRINUSE :::8090] code: 'EADDRINUSE', errno: 'EADDRINUSE', syscall: 'listen', address: '::', port: 8090 } Starting server on port 8091. Server listening. Run using antTo run using ant
Creating testsThe browser regression tester supports two kinds of tests: Composite accessor tests and Mocha tests. Composite accessor tests can be created using the CapeCode code generator. Place your file in For Mocha test files, please see the Mocha instructions. Place your file in Integration with the nightly buildManually running script as JenkinsThis requires permissions to run scripts as the Jenkins user on
Note that the Jenkins nightly build runs Firefox 47.0Firefox under Mac OS X crashes when running the tests. Yes, it turns out Firefox 47 is incompatible with the latest version of Selenium. This drove me nuts! My FF also auto-updated and I had no idea why the script quit working. Turns out Selenium is migrating to a new driver for Firefox, which some people are still having problems with, but unfortunately FF47 doesn't work with the old driver. I have a workaround script using the new driver if we need it and can post instructions. https://github.com/SeleniumHQ/selenium/issues/2110 terra is running: bash-4.1$ /usr/bin/firefox --version Mozilla Firefox 45.2.0 Back to testing module. |