Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomzox/gtest_gui
Test runner GUI for Google-Test instrumented test applications
https://github.com/tomzox/gtest_gui
google-test graphical-user-interface gui test-runners testing testing-tool tkinter-python
Last synced: 10 days ago
JSON representation
Test runner GUI for Google-Test instrumented test applications
- Host: GitHub
- URL: https://github.com/tomzox/gtest_gui
- Owner: tomzox
- License: gpl-3.0
- Created: 2023-03-12T12:37:57.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-06T14:28:32.000Z (over 1 year ago)
- Last Synced: 2024-11-06T15:52:55.148Z (about 2 months ago)
- Topics: google-test, graphical-user-interface, gui, test-runners, testing, testing-tool, tkinter-python
- Language: Python
- Homepage:
- Size: 673 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GtestGui
GtestGui is a test-runner with graphical user-interface for test applications
using the [GoogleTest framework](https://google.github.io/googletest/).GtestGui was created mainly for removing the need for fiddling with Gtest
command line options, for tracking the status of long-running test campaigns
and for extracting individual test cases' traces from large trace output
files.The GoogleTest framework is widely known for its C++ Unit-Testing support
via the [GMock](https://google.github.io/googletest/reference/mocking.html)
feature. But one can also use just the
[test framework](https://google.github.io/googletest/reference/testing.html)
for defining test cases, scheduling test executions, and collecting verdicts.
Even using only the framework saves some implementation effort, but more
importantly also has the advantage of presenting a well-known common interface
to developers.GtestGui is designed especially for component tests, integration tests and
other higher-level testing, where the number of tests is smaller compared to
unit-testing, but individual test cases run longer and tests may have to be run
repeatedly (e.g. when test scenarios are not fully reproducible due to timing
between threads.) But it can also be used for unit-tests with "flakiness" (as
the [gtest-parallel](https://github.com/google/gtest-parallel) command line
tool calls it) which show sporadic failures and thus require high repetition
count for proving stability.GtestGui supports this by allowing to schedule test cases concurrently across
multiple CPUs. For very long-running campaigns, the "clean traces of passed
tests" option allows storing only traces of failed tests to disk. Status of
ongoing tests is presented in form of a top-level pass/fail summary and
progress bar, as well as a running log of test case verdicts, which can be
filtered and sorted (e.g. to show only failed test cases.) Traces of individual
test cases are accessible while the test campaign is still running either in a
small preview window below the test log, or via double-click which exports them
to an external trace browser. ([Trowser](https://github.com/tomzox/trowser) is
recommended for this purpose.)GtestGui provides access to Gtest command line options directly from the main
window. Most importantly, test case filters can be entered manually, or via
drop-down menu listing all test cases, or the test case list dialog. Other
supported options are the test repetition count, failure limit, shuffling
execution order, running disabled tests and breaking on failure or exceptions.
The latter will on POSIX systems produce a core dump that can be pre-analyzed
via the result log's context menu by extracting stack traces. Finally, an
option allows running tests under valgrind and automatically detecting issues
that were found for the result log.GtestGui can also be used for analyzing pre-existing trace output files
by adding the trace file names on the command line when starting.GtestGui has a mature feature set that can support C++ development in all
development phases: During initial code construction with test-driven design,
it supports running the same sub-set of test cases over and over again. After
code completion, it supports getting a quick overview of stability across the
complete set of test cases and which kind of failures occur. And it supports
final quality checking in long-running, high-repetition test campaigns,
optionally using valgrind or sanitizer builds.## Installation
GtestGui is available as package "mote-gtest-gui" ("Module tester's Gtest GUI")
on [PyPi](https://pypi.org/project/mote-gtest-gui/). It can be installed using
pip3:
```console
pip3 install mote-gtest-gui
```Make sure that the path where pip3 installs scripts is in your search path
(e.g. on UNIX `$HOME/.local/bin`). Then you can run GtestGui simply by
executing `gtest_gui`.Alternatively, you can run GtestGui without installation by cloning the
repository and then running `gtest_gui.py` in the top-level directory. For
integration with the [Trowser](https://github.com/tomzox/trowser) trace browser
either place `trowser.py` somewhere in the path, or create a symbolic link to
the path where it is located as `gtest_gui/trowser`, or specify the full path
to the executable in configuration.# Usage
You can either specify the path of your test application executable file
directly on the command line, or select one via a file
browser afterward (see the Control menu). Alternatively, or additionally, you
can specify one or more trace output files on the command line, which will be
parsed for test case results and loaded into the result list in the GUI.In summary, most common usage is as follows:
```console
gtest_gui my_test_application.exe
```On the MS-Windows platform, start GtestGui via pythonw.exe to avoid getting a
console window.## Documentation
For a detailed description, please refer to the [manual page](doc/gtest_gui.pod)