Not really ready for prime time. Works well for us
- Only npm support at this point. So you'll need something like browserify to bundle it into the browser.
- requires jQuery
Has two components.
- Server: a reporting server where test run information is logged
- lib/automate.js is the runner code that needs to be bundled with the js app
npm install automatejs
Start the server using
node appjs//ornpm start
Create an instance of automate for each run. This creates a unique run id, used to submit reports to server
var Automate = require"automate"var automate = serverUrl nameOfTest;
Now use the various methods to say what all you need to do
automatetap"#foo div";automatewaitFor300;automatetap"#bar span";
Add your asserts at any point. You can use any assert library, here I use chai.
automatethenexpect$".uiPageActive .subToolBar em"htmltocontainstring"Philadelphia to SF";;
Signal that you are done specifying your tests
automaterunAll; //Runs each step one by one, and submits the report to server
var automate = automateSeverUrl nameOfTest;//examplevar automate = "" "regression suite";
fill a textbox or text input
automatefillselector value;//exampleautomatefill"#loginUsername" "firstname.lastname@example.org";
select a drop down
automateselectselector value;//exampleautomateselect"#environment" "production";
waitFor: timeout or function
automatewaitFortimeMilliSeconds;automatewaitForfnfn: return true to indicate waitFor condition is met//exampleautomatewaitFor300;automatewaitForreturn $"#foo"length === 1;
runAll: Signal that you are done specifying the test. Now run actions one by one. On each step, information will be logged in automate server. If there is an error in any step, it'll bail out.
module: Indicate start of a module. Once a module is set, any actions done like a tap are logged under that module. If none specified, all tests go into 'default' module. Module names should be unique, or reports will get messed up.
Extension Cord is released under the Apache 2.0 license. Comments, bugs, pull requests, and other contributions are all welcomed! For questions please feel free to contact email@example.com or firstname.lastname@example.org