Skip to content

TUG -- GUI Unit Testing ("Testing Unitario GUI", in Spanish). A framework for easily creating batteries of tests for Qt-based applications in Linux, Windows and OS systems.

License

Notifications You must be signed in to change notification settings

pedromateo/tug_qt_unit_testing_fw

Repository files navigation

TUG means GUI Unit Testing (Testing Unitario GUI in Spanish). It is a framework to create test batteries for Qt applications in Linux, Windows and OS systems.

The TUG framework is based on the Qt Test framework, and is composed of two elements:

  • TUGLib: a C++ library to support GUI unit testing (requires Qt 4.8 or higher).
  • TUG Wizard: wizard application to create test projects (requires Java RE).

what does TUG provide?

A video better than a thausand words: https://www.youtube.com/watch?v=tUis6JrycrA

TUG VIDEO

After 7 steps, 3-5 minutes and no code, you get:

  • 1000+ lines of code generated
  • test projects ready to compile and run
  • only test actions remain to be coded
  • all tests and testsuites arranged into a standalone project: 1 test suite = 1 subproject = 1 binary
  • high-level, interactive reports on the web browser
  • profiling and coverage analysis

what does a TUG package/release contain?

A new release can be created by executing "scripts/create_release.sh". This script receives the version number as a single argument.

Generated releases can be found at "releases/" folder. Each one includes:

  • doc/............. usage quick guide
  • libTUG_project/.. C++ project of GUI unit testing library.
  • TUG_wizard/...... wizard application to create test projects (requires Java RE).
  • install.sh....... libTUG installer. Type "./install.sh --help" for further info.

Please, go to "doc/" folder and open TUG_doc.pdf to find a quick usage guide and further information about this testing framework.

compile, (modify) and run TUG

The projects composing TUG can be easily imported and compiled from Eclipse (https://eclipse.org/downloads/). Just follow these steps:

  1. Download this repository and install Eclipse. Open Eclipse.
  2. File > Import > Existing Projects into Workspace. (Next)
  3. Select root directory of the project.
  4. Repeat 2 and 3 for the three projects: qt48_model, tug_generation_wizard, tug_testapi_codegen.

Maven will download all dependencies and everything should run fine.

Please, notice that if you are running TUG directly from Eclipse (i.e., by running the main file of the project tug_generation_wizard), you will need to set the working directory manually:

  1. Right click on the tug_generation_wizard project > Run as > Java application
  2. Select WizardWindow`. Close app.
  3. Right click again on the tug_generation_wizard project > Run as > Run configurations
  4. Select WizardWindow in the left menu > Arguments tab > Working directory > Select Other > click Workspace... and select, within the compilation folder, the directory including the config folder.

Any problem? Please, contact me at pedrolmn@gmail.com

contents of this repository

  • doc/.................... Sources of TUG documentation. TUG_doc.pdf includes the docs of this project.
  • examples/............... Some full examples showing TUG usage with Qt projects
  • qt48_model.............. Model of Qt GUIs for code generation (supports Qwt as well)
  • releases/............... Includes TUG releases. Read above
  • tug_base_lib/........... TUG GUI unit testing library sources organized into a QT Creator project (need to be installed to use TUG).
  • tug_generation_wizard/.. Sources for the wizard application (Eclipse Java project).
  • tug_mde_dependencies/... MDE dependencies organized as an Eclipse Java project.
  • tug_testapi_codegen/.... Sources for the testing Qt panel generator (Eclipse Acceleo project).
  • LICENSE................. License file.
  • README.md............... This file.

about

TUG project was born with the main purpose of providing a unit testing framework for graphical user interfaces. The main goal was providing developers with a method to easily create a battery of tests for Qt-based applications. The tests had to simulate, as far as possible, users interaction with the interface.

With this purpose, the TUG project is divided into two main components:

  • TUG Wizard: a wizard-like application that helps developers to create and configure, step by step, a test project aimed at testing a Qt based panel as well as the underlying model and communication classes (if they exists). It generates a new panel inheriting the original one. This new panel includes customized methods to simulate users interaction with the widgets composing the panel. It can also generate a full, standalone test project including testsuites and empty test methods ready for being filled with testing code.

  • TUG Base Library: a library aimed at supporting the tests generated by TUG Wizard, as well as test projects created manually by developers. It provides a way to structure test suites, as well as a set of methods to support the definition of GUI tests, all around the Qt Test framework.

credits

The TUG Project is an initiative of Cátedra SAES (http://www.catedrasaes.org) funded by the SAES company (http://www.electronica-submarina.com). This project and all its components have been designed and developed at University of Murcia (Spain).

About

TUG -- GUI Unit Testing ("Testing Unitario GUI", in Spanish). A framework for easily creating batteries of tests for Qt-based applications in Linux, Windows and OS systems.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages