CKEditor functional testing automated
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
_dev
lib
samples
src
.gitignore
README.textile
ckrobot.bat

README.textile

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 (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.

Important Notes

  1. 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”
  2. 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.
  3. Browser window need to fronted (and focus gained) when the robot is working, otherwise there will be exception thrown regard invisible element.

Quick Start

  1. git clone this repository
  2. cd to the root directory
  3. “ckrobot -h” to kick start the CLI.
  4. “ckrobot -r samples” to launch the sample test scripts.

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”.

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.

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).

Test Framework

The familiarised YUITest is used for both the runner and test apis, which is consistent with CKTester.

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.

Tested Browers

  • InternetExplorer 7-9 (ie)
  • Firefox 3.x (ff)

Tested OS

  • Windows7

Selenium

Selenium/WebDriver version 2.0b1 (lib/selenium.jar) is used but not the latest Selenium release.