WebDriver for combitorial testing
Overview
testcase
interaction script
Getting Started
$ npm install -g wd-ct$ wd-ct -sAre you sure you want to generate testcase? > yInput testcase file name.> Are you sure you want to generate interaction.js? > yInput interaction script name> Input source of testcase>
Usage
$ wd-ct --help ############################################## # ██╗ ██╗██████╗ ██████╗████████╗ # # ██║ ██║██╔══██╗ ██╔════╝╚══██╔══╝ # # ██║ █╗ ██║██║ ██║█████╗██║ ██║ # # ██║███╗██║██║ ██║╚════╝██║ ██║ # # ╚███╔███╔╝██████╔╝ ╚██████╗ ██║ # # ╚══╝╚══╝ ╚═════╝ ╚═════╝ ╚═╝ # ############################################## Usage: node /Users/sideroad/workspace/wd-ct/bin/wd-ct [options]Display usage -h, --helpContinue to execute test even though error occurred -f, --forceCapture page when error occurred. please set captured image directory path -es, --error-screenshot <value>Use saucelabs -sl, --saucelabsExecute only specified row number test -rn, --rownum <value>Interation start column index number should be set -sc, --start-column <value>Pause on error -pe, --pause-on-errorStepwise execution -sw, --stepwiseGenerate interaction script and testcase file from template --scaffoldNot apply color to console -nc, --no-colorBrowser -b, --browsers <value>Not output logging -nl, --no-loggingPrepare stored variable before execution --store <value>Target interaction file -i, --interaction <value>Target testcase file -t, --testcase <value>
Concreate interaction script and testcase file.
Referrence for interaction as wd and assertion as chai.
Advanced
Store value
When you want to use variable after the command.
wd-ct prepare store object for keeping variable.
Benefit to use store object is to be able to check variable when break
command executed.
break
command will be explain in next section.
return this
Debugging
wd-ct
provides bunch of approach for effective debug
Pause options
-
Stepwise execution Will be pause after each command execution
wd-ct --stepwise ...
-
Break on error Will be pause when error occurred
wd-ct --break-on-error ...
Pause command
If you want to pause manually, break
method can be used for pause.
return this // will be pause on here
During paused, we can check stored variable on store object.
// interaction.js// ... return this ;// ...
Debugging console log is below.
Input command or press enter to continue.> store
Other options for debug
-
Capture page when error occurred
wd-ct --error-screenshot ...
-
Continue to execute test even though error occurred
wd-ct --force ...
Additional methods
wd-ct provides additional wd methods.
fire
Fire event for specified DOM element
return this
naturalType
This is a alias to emulate typing below
return this
is same as
return this clear type'foo'
select
select option of selectbox
return this