GithubHelp home page GithubHelp logo

dushistov / qt_monkey Goto Github PK

View Code? Open in Web Editor NEW
46.0 14.0 16.0 553 KB

Tool for testing Qt based applications

License: BSD 3-Clause "New" or "Revised" License

CMake 2.91% C++ 93.02% Python 2.42% JavaScript 1.65%
test-automation testing-tools testing qt qt4 qt5

qt_monkey's Introduction

Qt Monkey Travis build status Appveyor build status License

Introduction

Qt Monkey is a tool to automate testing of Qt-based applications (widgets only). It automates creation/modification and running of the tests. Tests are written in Javascript (Qt supported dialect).

To write your tests, simply run your application (instrumented by Qt Monkey) and click on widget, input text, etc. As a result, a script in Javascript will be generated (see https://github.com/Dushistov/qt_monkey/blob/master/tests/test1.js for example).

[example of script]

After that you can add suitable asserts and run this script via command line or GUI tool.

[example of work of runnig script]

Requirements

Qt Monkey requires compiler with C++11 support and Qt 4.x or Qt 5.x.

How to use

First, download and build Qt Monkey:

git clone --recursive https://github.com/Dushistov/qt_monkey.git
cd qt_monkey
cmake -DQT_VARIANT="qt5" .
cmake --build .

Also you can use -DQT_VARIANT="qt4" for building with Qt 4.x. Then, integrate Qt Monkey agent into your application:

  1. Make sure that you link your application with qtmonkey_agent library
  2. Create object of class qt_monkey_agent::Agent in the main thread of your application:
qt_monkey_agent::Agent agent;

That's all. Now you can run qtmonkey_gui application and record or run your own scripts. See https://github.com/Dushistov/qt_monkey/blob/master/tests/test_app/main.cpp for the more complex usage example.

Internals

Qt Monkey consists of three parts: Qt Monkey's agent library (qtmonkey_agent), qtmonkey_app (tool that run test application and cooperates with agent) and qtmonkey_gui. qtmonkey_app and qtmonkey_gui use json as their preferred data marshalling language and communicate via stdin/stdout streams. Therefore you can easily replace qtmonkey_gui with a plugin for your favorite IDE.

qt_monkey's People

Contributors

drons avatar dushistov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qt_monkey's Issues

PySide2 integration ?

Hi,

Is it possible to use qt_monkey to automate PySide2 based application ?

If so, what is the approach ?

Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.