Nightwatch.js
Nightwatch.js GitHub: https://github.com/nightwatchjs/nightwatch
Nightwatch.js is testing solution.
In nightwatch homepage say:
"Nightwatch.js is an automated testing framework for web applications and websites, written in Node.js and using the Selenium WebDriver API."
- Guide
Guide : http://nightwatchjs.org/guide
- Install
//install nightwatch
$npm install nightwatch
//install selenium server
$wget http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.0.jar
//runing
$java -jar selenium-server-standalone-2.53.0.jar
11:47:47.404 INFO - Launching a standalone Selenium Server
11:47:47.690 INFO - Java: Oracle Corporation 25.60-b23
11:47:47.690 INFO - OS: Windows 8.1 6.3 x86
11:47:47.819 INFO - v2.53.0, with Core v2.53.0. Built from revision 35ae25b
11:47:48.155 INFO - Driver class not found: com.opera.core.systems.OperaDriver
11:47:48.155 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
11:47:48.169 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform WIN8_1
11:47:48.170 INFO - Driver class not found: org.openqa.selenium.htmlunit.HtmlUnitDriver
11:47:48.170 INFO - Driver provider org.openqa.selenium.htmlunit.HtmlUnitDriver is not registered
11:47:49.851 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
11:47:49.851 INFO - Selenium Server is up and running
//help selenium server
$java -jar selenium-server-standalone-2.53.0.jar -help
- Configure
//file setting, nightwatch.json
- In my test
1. Start selenium server
$java -jar selenium-server-standalone-2.53.0.jar
2. Start nightwatch
##Before start nightwatch##
$npm install nightwatch -g
$mkdir nightwatch-test
$cd nightwatch-test
$npm install nightwatch
$cp -r node_modules/nightwatch/examples .
##End##
//Do tests
$nightwatch
[Digg] Test Suite
=================
digg module is disabled, skipping...
[Github] Test Suite
===================
Running: Demo test GitHub
Error retrieving a new session from the selenium server
{ state: 'unhandled error',
sessionId: null,
hCode: 17478365,
value:
{ buildInformation:
{ buildRevision: '35ae25b',
buildTime: '2016-03-15 17:00:58',
releaseLabel: '2.53.0',
hCode: 87554,
class: 'org.openqa.selenium.internal.BuildInfo' },
cause: null,
systemInformation: 'System info: host: \'pineoc-pc\', ip: \'192.168.99.1\', os.name: \'Windows 8.1\', os.arch: \'x86\', os.version: \'6.3\', java.version: \'1.8.0_60\'',
additionalInformation: '\nDriver info: driver.version: FirefoxDriver',
screen: null,
suppressed: [ [length]: 0 ],
class: 'org.openqa.selenium.WebDriverException',
localizedMessage: 'Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: WIN8_1\nBuild info: version: \'2.53.0\', revision: \'35ae25b\', time: \'2016-03-15 17:00:5
8\'\nSystem info: host: \'pineoc-pc\', ip: \'192.168.99.1\', os.name: \'Windows 8.1\', os.arch: \'x86\', os.version: \'6.3\', java.version: \'1.8.0_60\'\nDriver info: driver.version: FirefoxDriver',
supportUrl: null,
message: 'Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: WIN8_1\nBuild info: version: \'2.53.0\', revision: \'35ae25b\', time: \'2016-03-15 17:00:58\'\nSyst
em info: host: \'pineoc-pc\', ip: \'192.168.99.1\', os.name: \'Windows 8.1\', os.arch: \'x86\', os.version: \'6.3\', java.version: \'1.8.0_60\'\nDriver info: driver.version: FirefoxDriver',
hCode: 5692872 },
class: 'org.openqa.selenium.remote.Response',
status: 13 }
Connection refused! Is selenium server started?
...
install firefox please.
I will return install firefox next time.
댓글 없음:
댓글 쓰기