Meego Wiki
Views

Quality/QA-tools/QmlUITestlib

From MeeGo wiki
< Quality | QA-tools
Revision as of 06:20, 30 May 2011 by Shaofeng (Talk | contribs)
Jump to: navigation, search

Contents

MeeGo QML UI Testlib

Overview

MeeGo QML UI Testlib is an open tool for testing against MeeGo QML GUI application automatically. The test framework is based on "TDriver", and provide a set of pre-defined cucumber steps for designer to prepare test cases with natural language. and also BAT and L10N test cases of MeeGo QML UI applications are also involved in Testlib.

Architecture

Testlib architecture.png

BAT and L10N Test cases and a pre-defined library, in which many Cucumber steps are involved for covering all actions on MeeGo QML UI applications, are included in this Testlib.

Installation

This tool is based on cucumber and TDriver. make sure if TDriver and cucumber already work well on your machine.

Verifying if TDriver works well:

$> tdriver_visualizer &

Check if visualizer could connect to device via sut_qt.

Verifying if Cucumber works well

$> cucumber --help

For TDriver installation, please refer to Quality/QA-tools/TDriver#Installation. For cucumber, please refer to Cucumber Home site

For downloading this tools, just run "git clone ssh://..."(The git project is still under preparing)

Dependency

Because the patch "QML_ID" isn't accepted by neither Qt upstream, nor MeeGo QT maintainer. so we need to update the qt-related packages by ourselves. for the latest images, an OBS repository is available for this patch.

Follow below steps to update the qt-related packages

$> cd /etc/zypp/repo.d/

$> wget http://download.meego.com/live/home:/cathysh/Trunk_Testing_standard/home:cathysh.repo

$> sudo zypper up

Below is the updated package list:

libqt-devel-4.7.2-8.18.i586.rpm

libqtcore4-4.7.2-8.18.i586.rpm

libqtdbus4-4.7.2-8.18.i586.rpm

libqtdeclarative4-4.7.2-8.18.i586.rpm

libqtdeclarative4-folderlistmodel-4.7.2-8.18.i586.rpm

libqtdeclarative4-gestures-4.7.2-8.18.i586.rpm

libqtdeclarative4-particles-4.7.2-8.18.i586.rpm

libqtdesigner4-4.7.2-8.18.i586.rpm

libqtgui4-4.7.2-8.18.i586.rpm

libqthelp4-4.7.2-8.18.i586.rpm

libqtnetwork4-4.7.2-8.18.i586.rpm

libqtopengl-devel-4.7.2-8.18.i586.rpm

libqtopengl4-4.7.2-8.18.i586.rpm

libqtscript4-4.7.2-8.18.i586.rpm

libqtscripttools4-4.7.2-8.18.i586.rpm

libqtsql4-4.7.2-8.18.i586.rpm

libqtsql4-sqlite-4.7.2-8.18.i586.rpm

libqtsvg4-4.7.2-8.18.i586.rpm

libqttest4-4.7.2-8.18.i586.rpm

libqtxml4-4.7.2-8.18.i586.rpm

libqtxmlpatterns4-4.7.2-8.18.i586.rpm

qt-debuginfo-4.7.2-8.18.i586.rpm

qt-demos-4.7.2-8.18.i586.rpm

qt-designer-4.7.2-8.18.i586.rpm

qt-devel-tools-4.7.2-8.18.i586.rpm

qt-qmake-4.7.2-8.18.i586.rpm

qt-qmlviewer-4.7.2-8.18.i586.rpm

Usage

Run existing test cases

some BAT test cases are also provided for MeeGo applications. For running them, follow below steps:

$> cd <Testlib_HOME>

$> cucumber

Prepare your own scenarios (test cases)

Besides running the existed test cases, you can also define your own scenario (test cases) using the predefined cucumber steps.

For instance, you can define a new test cases for verifying if MeeGo browser can access a new web site (for instance, Amazon).

 Scenario: Check if browser works for Amazon
   Given I launch meego browser
   And I sleep "5" second
   And I input "www.amazon.com" into "urlTextInput"
   And I sleep "5" second
   Then In meego browser, I should see "Amazon"
   And In meego browser, I should see "Sign in"


Test Result

Beside the result of cucumber scripts, snapshot will also be captured automatically to help QA and developer to investigate what happen when the verification failed. and the snapshot is named as

xxxx_xxxxx.png

First part is the name of the testing application, such as email, im, browser Second part is a short description of the failed verification.

Personal tools