Qt Test Reference Documentation

CMake/Testing With CTest

Chapter 1: Writing a Unit Test

Writing a Test

Executing a Test

Chapter 2: Data Driven Testing

Writing the Data Function

Rewriting the Test Function

Chapter 3: Simulating GUI Events

Writing a GUI Test

Chapter 4: Replaying GUI Events

Writing the Data Function

Rewriting the Test Function

Chapter 5: Writing a Benchmark

Writing a Benchmark

Data Functions

External Tools

Chapter 6: Skipping Tests with QSKIP

Using QSKIP(description) in a test function

Using QSKIP in a _data function

Using QSKIP from initTestCase() or initTestCase_data()

Coco

Cycle

Googletest Mocking (gMock) Framework

Linux Performance Events, version 3.7

Usage

Verifying Signal Emissions

Qt Test

Getting Started

Articles and Guides

Licenses and Attributions

Reference

Qt Test Best Practices

General Principles

Verify Tests

Give Test Functions Descriptive Names

Write Self-contained Test Functions

Test the Full Stack

Make Tests Complete Quickly

Use Data-driven Testing

Use Coverage Tools

Select Appropriate Mechanisms to Exclude Tests

Avoid Q_ASSERT

Writing Reliable Tests

Avoid Side-effects in Verification Steps

Avoid Fixed Timeouts

Beware of Timing-dependent Behavior

Avoid Bitmap Capture and Comparison

Improving Test Output

Explicitly Ignore Expected Warnings

Avoid Printing Debug Messages from Autotests

Write Well-structured Diagnostic Code

Writing Testable Code

Break Dependencies

Compile All Classes into Libraries

Setting up Test Machines

Screen Savers

System Dialogs

Display Usage

Window Managers

Qt Test Overview

Creating a Test

Increasing Test Function Timeout

Building a Test

Building with CMake and CTest

Building with qmake

Building with Other Tools

Qt Test Command Line Arguments

Syntax

Options

Logging Options

Test Log Detail Options

Testing Options

Benchmarking Options

Miscellaneous Options

Creating a Benchmark

Selecting the Measurement Back-end

Using Global Test Data

Qt Test Tutorial

Valgrind, version 3.14.0

gcov

qtestlib-tools Announcement

Qt Test Tutorial

Valgrind, version 3.14.0

Qt Test C++ Classes

QtTest