this folder contains browser automated tests that run on selenium server.
Go to client folder and run:
λ koding/client make testThis will configure your nightwatch environment, transpile coffee-scripts under test/lib directory into test/build, start selenium-server, and run your tests in the correct order that they need to be run.
In order to run tests written with Nightwatch.js framework, you need to generate a configuration script.
This file can be automatically generated with:
λ client/test make configureor you can directly run the configuration tool itself:
λ client/test ./bin/cmd.coffee browserRunning any of those will write two files in client directory:
This is the configuration file expected by nightwatch and it is generated specifically for the platform (os) you are on.
By default configuration tool, uses a blueprint file for the defaults.
But you can overwrite any key from cli using dot notation:
λ client/test ./bin/cmd.coffee browser --selenium.port 5555This file is also extended with a test.url key that you have specified.
Following is the help output of the configuration tool:
usage: coffee bin/cmd.coffee <command> [options]
Commands:
browser configure browser tests
Options:
--help, -h show this message
--url specify a url that koding webserver is running on
--nightwatch specify a nightwatch config blueprint file.
actual config file will be written to client/.nightwatch.json
--start-selenium if enabled starts a selenium server process [default: true]
There is a handful of Makefile targets defined to make life easier:
Configure and write client/.nightwatch.json file:
λ client/test make configureYou can pass additional args that is expected by configuration tool (bin/cmd.coffee):
λ client/test TEST_EXTRAS=--no-start-selenium make configureTranspile coffee files under test/lib into test/build:
λ client/test make compileA complete build with configuration and transpilation:
λ client/test make buildRun tests in the correct order that they need to be run:
λ client/test make runBuild and run:
λ client/test make allYou can run tests individually using either test or run.sh scripts, these scripts are same except that test retranspiles coffees before running:
Run activity suite tests:
λ client/test ./test activityRun activity/likeunlike suite
λ client/test ./test activity likeunlikeGravatar:
username: kodingtestuser1 / kodingtestuser@koding.com password: passfortestuser
2015 Koding, Inc