CKRobot is a high-level functional testing automation tool designed specifically for CKEditor, the “robot” works from
outside web browsers to verify editor behaviors from an end user’s perspective, interacting with the editor UI purely,
Unlike CKTester (CKEditor’s unit testing tool), CKRobot doesn’t hit the browser sandbox limitation, so tasks like typing
inside the editor iframe was made possible, plus the possibility of covering different browsers on multiple platform, making
it a very good companion of CKTester in the sense of functional testing.
- Browsers will be located at the default installation location, otherwise you need to specify it manually
by passing the location via JVM argument, e.g. -Dwebdriver.firefox.bin=“d:\Program Files\Mozilla Firefox\firefox.exe”
- Name references in test script are UI language aware, this means e.g. editor must be running with the default editor language (en) to have them passed,
you can achieve that by changing browser’s language preferences.
- Browser window need to fronted (and focus gained) when the robot is working, otherwise there will be exception thrown regard invisible element.
- git clone this repository
- cd to the root directory
- “ckrobot -h” to kick start the CLI.
- “ckrobot -r samples” to launch the sample test scripts.
You can grok the way of authoring test script by checking into the default sample scripts, detailed API document could
be generated using “_dev/docs”.
A test script holds a group of meta data that communicate with the runner of its preferences, those are defined as comment annotations
- @tc Each file much hold this to declare itself a CKRobot test script.
- @name The title of this piece of test, will be used as the test case name in test runner.
- @browsers A list of browser names that the script dedicate to, this’s useful when the test script is supposed to be running only for one or more browers.
Within test script variables could be used to avoid hard-coded strings that requires alternation when environment changes, e.g. base url of editor sample pages.
The refereed variables are resolved from the content of a file named vars.js inside of the tests repository (-r).
The familiarised YUITest is used for both the runner and test apis, which is consistent with CKTester.
The test report is available in JUnit test report format which is the most friendly one for other consumers, output by default in “reports” dir, as well as the html version.
- InternetExplorer 7-9 (ie)
- Firefox 3.x (ff)
Selenium/WebDriver version 2.0b1 (lib/selenium.jar) is used but not the latest Selenium release.