Have you ever wondered how to do Dojo Objective Harness testing with Continuous integration ?
dRobotReport might just be the right solution for you.
I have seen a lot of hack around solutions using selenium and such kind so i decided to implement something that can send the results back to the server as they happen. So dRobotReport was born!
The project can be found on github
dRobotReport currently requires you to have node.js with a minimum version of 0.6.9 installed
Just clone the project next to your dojo installation
1 2 3 | /dojo /dRobotReporter /util |
Change into the directory where dRobotReporter and start running
1 | node runner.js |
This will present you with the help output listing all available commands
Then we can run it. I am starting it in manual mode now where i will need to open the browser and copy the URL over.
1 2 3 4 5 6 7 8 9 10 11 12 13 | $var/www/~/dRobotReporter: node runner.js -m widget.tests.module -u http://jenkins.iceweasel.local -B /js/dojo -M widget,/js/dojo/widget -s http://jenkins.local info: socket.io started Server started Listening on Port: 8000 Testing Module: widget.tests.module Running Browser: iceweasel Dojo basePath: /js/dojo Test url: http://jenkins.iceweasel.local/js/dojo/util/doh/runner.html?testModule=widget.tests.module®isterModulePath=dRobotReporter,/js/dojo/dRobotReporter;widget,/js/dojo/widget&dohPlugins=dRobotReporter/connector&port=8000&server=http://jenkins.local Server url: http://jenkins.local Waiting for Connection |
Open your browser and copy the “Test url” into the url and let the tests start running!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | Connection established 6 tests to run in 1 groups ------------------------------------------------------------ GROUP "widget.tests.apparence.ToggleButton" has 6 tests to run PASSED test: /js/dojo/widget/tests/apparence/_boiteCss/BorderWidth.html::widget.tests.apparence.ToggleButton::startup 0 ms PASSED test: /js/dojo/widget/tests/apparence/_boiteCss/BorderWidth.html::widget.tests.apparence.ToggleButton::onChange 1 ms PASSED test: /js/dojo/widget/tests/apparence/_boiteCss/BorderWidth.html::widget.tests.apparence.ToggleButton::setValue 4 ms PASSED test: /js/dojo/widget/tests/apparence/_boiteCss/BorderWidth.html::widget.tests.apparence.ToggleButton::quietSetValue 1 ms PASSED test: /js/dojo/widget/tests/apparence/_boiteCss/BorderWidth.html::widget.tests.apparence.ToggleButton::reset 1 ms PASSED test: /js/dojo/widget/tests/apparence/_boiteCss/BorderWidth.html::widget.tests.apparence.ToggleButton::disabled 2 ms PASSED test: /js/dojo/widget/tests/apparence/_boiteCss/BorderWidth.html 850 ms ------------------------------------------------------------ GROUP "widget.tests.apparence._boiteCss.BoxShadow" has 1 test to run 6 tests to run in 1 groups ------------------------------------------------------------ GROUP "widget.tests.apparence.ToggleButton" has 6 tests to run PASSED test: /js/dojo/widget/tests/apparence/_boiteCss/BoxShadow.html::widget.tests.apparence.ToggleButton::startup 5 ms PASSED test: /js/dojo/widget/tests/apparence/_boiteCss/BoxShadow.html::widget.tests.apparence.ToggleButton::onChange 3 ms PASSED test: /js/dojo/widget/tests/apparence/_boiteCss/BoxShadow.html::widget.tests.apparence.ToggleButton::setValue 3 ms PASSED test: /js/dojo/widget/tests/apparence/_boiteCss/BoxShadow.html::widget.tests.apparence.ToggleButton::quietSetValue 4 ms PASSED test: /js/dojo/widget/tests/apparence/_boiteCss/BoxShadow.html::widget.tests.apparence.ToggleButton::reset 3 ms PASSED test: /js/dojo/widget/tests/apparence/_boiteCss/BoxShadow.html::widget.tests.apparence.ToggleButton::disabled 7 ms PASSED test: /js/dojo/widget/tests/apparence/_boiteCss/BoxShadow.html 984 ms ------------------------------------------------------------ GROUP "widget.tests.apparence._boiteCss.ComboBox" has 1 test to run 5 tests to run in 1 groups ------------------------------------------------------------ ... ... ... ------------------------------------------------------------ | TEST SUMMARY: ------------------------------------------------------------ 172 tests in 35 groups 13 errors 2 failures ------------------------------------------------------------ TESTS FOR iceweasel FAILED ------------------------------------------------------------ |
You will get either tests Passed/Failed which can now be used in your CI environment.
You can also let the dRobotReporter take care of starting your browser by just setting “-b iceweasel” or whichever browser you want to use.
So long!












