TestAutomation

From Develop

Jump to: navigation, search

Contents

Test Automation Information for PCF Projects

Miro and Miro Video Converter are desktop apps that have automated tests driven by Sikuli, a visual technology to search and automate graphical user interfaces (GUI) using images (screenshots).

The Sikuli test suites are created as python unit tests.

Our web projects, Miro Community, and Universal Subtitles have automated test suites driven by selenium-rc, a functional test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.

The selenium-rc test suites use the python client driver.

The automated test suites for all projects are available from the PCF-qa github repository, and everyone is welcome to contribute.

Sikuli Testing Setup Instructions

The test suites for Sikuli testing assume that you are using Sikuli X 1.0 (rc2 or later) and are designed around the instructions from the How to Run Sikuli from the Command line page, section Running sikuli-script.jar from Command line.

Download the latest version of Sikuli X from Sikuli.org downloads page

For each OS on the downloads page, there is a list of the prerequisites for the particular system. Be sure that you have met the requirements, and that you can launch Sikuli-IDE on your test system.

Get the test suites that you want to run from the test repository.

You can download or clone them.

cd TEST_DIR
git clone https://github.com/jdragojevic/miro-qa Miro
or
 tar or unzip into TEST_DIR

You should now have a project directory PROJECT_DIR below TEST_DIR (ex. TEST_DIR/MVC or TEST_DIR/Miro)

testing on os x

Assumptions: Sikuli-X and prerequisites are installed on your test machine.

1. Set two following environment variables on your system to point to the directories containing the sikuli-script.jar and your PROJECT_DIR.

export SIKULI_HOME=/Applications/Sikuli-IDE.app/Contents/Resources/Java/ 
export PCF_TEST_HOME=<TEST_DIR as defined above>

or

see this blog post to set permanent environment variables

2. Change your system default font. Because Sikuli relies on Text Recognition software, it is sensitive to some font styles and sizes. On osx, the System default font size is too small in the Miro sidebar and causes some finds to fail. To correct this, you need to update your System font size to 15.

To update the font on osx:

2. Execute the tests:

cd PROJECT_DIR
python run_suite.py

testing on windows

Assumptions:


1. Set an environmental variable called "PCF_TEST_HOME" to point to the PROJECT_DIR (for example on my machine the path is Z:/Sikuli-testing/). See the lifehacker post for instructions on setting variables.

2. Use the provided windows .Theme file. Because Sikuli is image based and some images contain text that depend on the Theme used, it is important to run with the same Windows Theme that was used in test creation.

To update the Theme:


3. Change the default sidebar font in Miro,in order for the text recognition to work properly. Miro currently sets a default to Tahoma 11 for non-ascii characters to be rendered properly in the sidebar, however the Sikuli test recognition has trouble reading some of the characters in Tahoma font. A script is provided to change the font.

To change the font:

4. Execute the tests:

cd PROJECT_DIR
python run_suite.py

testing on linux

Assumptions: Sikuli-X and prerequisites are installed on your test machine.

1. Set two following environment variables on your system to point to the directories containing the sikuli-script.jar and your TEST_DIR.

export SIKULI_HOME=<path to the Sikuli-IDE directory on you machine>
export PCF_TEST_HOME=<TEST_DIR as defined above>


2. Execute the tests:

cd PROJECT_DIR
python run_suite.py

More Information about the Sikuli Tests

See MiroTestAutomation for more details about the tests, organization and results reporting.

email jed at pculture dot org if you have any additiona questions.

PCF Projects tested with Sikuli

Selenium-RC Testing Setup Instructions

testing on windows / os x / linux

Selenium-RC provides great documentation for getting started and basic installation.

Assumptions: java and python are installed on your system.

1. Download the selenium 2 standalone server from the selenium downloads page Choose selenium-server-standalone-2.0xx.jar (using a server from the 1.x series won't work for some tests).

2. Start the Selenium server

java -jar selenium-server-standalone-2.0b3.jar 

3. cd to the directory where you plan to run the tests (TEST_DIR)

cd TEST_DIR

4. Either download or clone the repository of tests from the github repository.

git clone <test repository>
or
 tar or unzip into TEST_DIR
.

You should now have a project directory PROJECT_DIR below TEST_DIR (ex. TEST_DIR/universal-subtitles or TEST_DIR/MiroCommunity)

5. Execute the tests:

cd PROJECT_DIR
python test_withHTMLOutput.py

We also have a quick setup guide for windows users written by our intern maggie.s.

If you want to run selenium server as a daemon on your mac, check out these awesome instructions.

PCF Projects tested with Selenium-RC

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox