1
- #+OPTIONS: ^:nil
2
- [[https://travis-ci.org/Dushistov/qt_monkey][https://travis-ci.org/Dushistov/qt_monkey.svg?branch=master]]
3
- [[https://github.com/Dushistov/qt_monkey/blob/master/LICENSE][https://img.shields.io/badge/license-BSD-green.svg]]
1
+ # Qt Monkey [ ![ Travis build status ] ( https://travis-ci.org/Dushistov/qt_monkey.svg?branch=master )] ( https://travis-ci.org/Dushistov/qt_monkey ) [ ![ Appveyor build status ] ( https://ci.appveyor.com/api/projects/status/c6h10uayiqmnr465?svg=true )] ( https://ci.appveyor.com/project/Dushistov/qt-monkey ) [ ![ License ] ( https://img.shields.io/badge/license-BSD-green.svg )] ( https://github.com/Dushistov/qt_monkey/blob/master/LICENSE )
2
+
3
+ ## Introduction
4
4
5
- * Introduction
6
5
Qt Monkey is a tool to automate testing of Qt-based applications (widgets only).
7
6
It automates creation/modification and running of the tests.
8
7
Tests are written in Javascript (Qt supported dialect).
@@ -11,40 +10,39 @@ To write your tests, simply run your application (instrumented by Qt Monkey) and
11
10
on widget, input text, etc. As a result, a script in Javascript will be generated
12
11
(see https://github.com/Dushistov/qt_monkey/blob/master/tests/test1.js for example).
13
12
14
- #+OPTIONS: ^:nil
15
- [[example of script][https://github.com/Dushistov/qt_monkey/blob/master/docs/qtmonkey_gui.png]]
13
+ [ ![ example of script] ( https://github.com/Dushistov/qt_monkey/blob/master/docs/qtmonkey_gui.png )]
16
14
17
15
After that you can add suitable asserts and run this script via command line or GUI tool.
18
16
19
- #+OPTIONS: ^:nil
20
- [[example of work of runnig script][https://github.com/Dushistov/qt_monkey/blob/master/docs/script_run_demo.gif]]
17
+ [ ![ example of work of runnig script] ( https://github.com/Dushistov/qt_monkey/blob/master/docs/script_run_demo.gif )]
18
+
19
+ ## Requirements
21
20
22
- * Requirements
23
21
Qt Monkey requires compiler with C++11 support and Qt 4.x or Qt 5.x.
24
22
25
- * How to use
23
+ ## How to use
24
+
26
25
First, download and build Qt Monkey:
27
- #+BEGIN_SRC sh
26
+ ``` sh
28
27
git clone --recursive https://github.com/Dushistov/qt_monkey.git
29
28
cd qt_monkey
30
29
cmake -DQT_VARIANT=" qt5" .
31
30
cmake --build .
32
- #+END_SRC
31
+ ```
33
32
34
33
Also you can use -DQT_VARIANT="qt4" for building with Qt 4.x.
35
34
Then, integrate Qt Monkey agent into your application:
36
35
1 . Make sure that you link your application with qtmonkey_agent library
37
-
38
36
2 . Create object of class ` qt_monkey_agent::Agent ` in the main thread of your application:
39
- #+BEGIN_SRC c ++
37
+ ``` C ++
40
38
qt_monkey_agent::Agent agent;
41
- #+END_SRC
39
+ ```
42
40
43
41
That's all. Now you can run qtmonkey_gui application
44
42
and record or run your own scripts. See https://github.com/Dushistov/qt_monkey/blob/master/tests/test_app/main.cpp
45
43
for the more complex usage example.
46
44
47
- * Internals
45
+ ## Internals
48
46
49
47
Qt Monkey consists of three parts: Qt Monkey's agent library (qtmonkey_agent),
50
48
qtmonkey_app (tool that run test application and cooperates with agent) and qtmonkey_gui.
0 commit comments