h2. Brief 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, all is driven by a pretty intuitive (JavaScript) test script describing the testing procedures. Unlike "CKTester":http://docs.cksource.com/CKTester/Users_Guide (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. h2. Important Notes # 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":http://www.w3.org/International/questions/qa-lang-priorities. # Browser window need to fronted (and focus gained) when the robot is working, otherwise there will be exception thrown regard invisible element. h2. Quick Start # 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. h2. Test Script 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". h2. Script Meta A test script holds a group of meta data that communicate with the runner of its preferences, those are defined as comment annotations at the beginning of the javascript file, the following are currently supported: * @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. h2. Environment Variables 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). h2. Test Framework The familiarised "YUITest":https://github.com/yui/yuitest is used for both the runner and test apis, which is consistent with CKTester. h2. Test Report 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. h2. Tested Browers * InternetExplorer 7-9 (ie) * Firefox 3.x (ff) h2. Tested OS * Windows7 h2. Selenium Selenium/WebDriver version "2.0b1":http://code.google.com/p/selenium/downloads/detail?name=selenium-server-standalone-2.0b1.jar (lib/selenium.jar) is used but not the latest Selenium release.