blob: 7bb0d6331e14fe354135f9be72c7e634543d2ac0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
==== INTRO ===================================================================
QtUiTest is an experimental tool for automated testing of Qt user interfaces.
Do NOT use this tool for any serious development work, instead use the tools
provided by our partners.
==== BUILDING ================================================================
* Qt
QtUiTest requires Qt 4.5 or higher. Please ensure Qt has been built or
installed before continuing.
* Default TCP/IP port for communication
By default the TCP/IP port used is 5656, this can be changed by
1) running qmake with the port specified, eg:
qmake DEFINES+="DEFAULT_AUT_PORT=5156" ~/depot/qtuitest/qtuitest.pro
and 'touching' qtuitest_config.h eg:
touch ~/depot/qtuitest/qtuitest_config.h
OR
2) changing the value of DEFAULT_AUT_PORT macro in qtuitest_config.h
Hint: If QtUitest is reporting problem connecting try a different TCP/IP port for autport.
*nix users can try seeing what TCP/IP ports are being used by running : netstat -n
See below for setting autport via QTUITEST_DEFAULT_OPTIONS environment variable
* Enabling building support for Orbit or QML
To enable Orbit suport run qmake with the addition of CONFIG+=hbwidgets
To enable QML suport run qmake with addition of CONFIG+=qmlwidget
* Disable building tests or examples
To disable tests run qmake with addition of CONFIG+=no_tests
To disable example run qmake with addition of CONFIG+=no_examples
* Enabling debug code
By default no debuging code is printed. To enable print of debuging to console
1) set QTUITEST_DEBUG environment variable to greater than zero value eg:
export QTUITEST_DEBUG=1
OR
2) run qmake with DEFINES+=QTUITEST_DEBUG eg :
qmake DEFINES+=QTUITEST_DEBUG ~/depot/qtuitest/qtuitest.pro
* Linux and Mac OS X
Assuming source is in ~/depot/qtuitest, build in ~/build/qtuitest :
mkdir -p ~/build/qtuitest
cd ~/build/qtuitest
qmake ~/depot/qtuitest/qtuitest.pro
make
make install
* Windows
Assuming source is in c:\depot\qtuitest :
mkdir \build\qtuitest
cd \build\qtuitest
qmake c:\depot\qtuitest\qtuitest.pro
nmake
nmake install
If using MinGW, use mingw32-make instead of nmake.
* Symbian
Shadow building is not supported for Symbian, you need to build in the
same directory as the source. The build procedure is essentially the same
as for other platforms :
qmake
make debug-winscw (to build for emulator)
make release-armv5 (to build for device)
Note that by default qtuitestrunner is not built for Symbian, as you
would normally run qtuitestrunner on a local machine and connect to a
device to run tests.
Once built, an installable .SIS package must be created and installed
on the phone. For example :
cd symbian
qmake qtuitest.pro
createpackage.bat QtUiTest_template.pkg release-armv5 rd.cer rd-key.pem
* Orbit
QtUiTest includes experimental support for Orbit. To build, ensure that the
environment variables HB_SOURCE_DIR and HB_INSTALL_DIR are set to the
appropriate locations, and use qtuitest-orbit.pro instead of qtuitest.pro.
The sys_orbit tests require the Orbit test applications to be built, and
HB_INSTALL_DIR set correctly.
==== USING ===================================================================
There are some tests included which can be run like this (Linux):
cd ~/build/qtuitest/tests/qtuitest/sys_input
make test
To set a different autport to eg 5121 run:
export QTUITEST_DEFAULT_OPTIONS="-autport 5121"
before starting the test.
|