The GdUnit Test Inspector

The GdUnit Test Inspector is your entry point for running tests and reviewing their results. This page explains what each part of the inspector shows; for the different ways to trigger a test run, see How to Run Tests.

Overview

The GdUnit inspector provides an overview of the currently executed tests and allows you to navigate them. It allows you to select individual tests and view possible test failures, including the full call stack. The integrated status bar gives you a quick overview of the last test run, including elapsed time and orphan nodes.

GdUnit inspector overview


Button Bar

The button bar contains several buttons that allow you to perform different actions in GdUnit: button-bar

Preview Description
doc button Opens the GdUnit documentation page in your browser
settings button Opens the GdUnit settings window
run overall button Run Overall tests
run button (Re)Run the tests in runtime mode
debug button (Re)Run the tests in debug mode
stop button Stops the current test run
  Displays the version of GdUnit

Note that the keyboard shortcuts for these buttons may vary depending on your specific GdUnit configuration.

The Run Overall Button

The Run Overall button provides a convenient way to execute all the tests in your project at once, instead of running them one by one or selecting a custom set of tests. By clicking the “Run Overall” button, you can initiate the execution of all the tests in your project, saving you time and effort. overall-button To enable the Run Overall button in GdUnit4, you need to adjust the UI settings.
Once you have enabled the Run Overall button, it should be visible in the inspector.


Status Bar

This area gives you information about the current/last test execution, such as the progress, the elapsed time, and errors/failures/orphans found.
With the arrow buttons, you can navigate back and forth over found failures, errors, flaky tests, skipped tests, and orphan nodes.
status-bar

  • Indicators

    Preview Description
    progress indicator Test execution progress (indicator of test run)
    error count Number of errors (parse/runtime errors)
    failure count Number of failures
    flaky count Number of flaky tests
    skipped count Number of skipped tests
    orphan count Number of detected orphan nodes
  • Controls

    Preview Description
    rediscover tests Rediscover tests (rescans the project for testsuites without running them)
    sort mode Change sort tree mode (asc/desc/time)
    tree presentation Change the test tree presentation (tree/flat)
  • Sorting Options

    The sorting option controls how the test results are displayed in the inspector tree. You can sort the results by:

    • Unsorted: The natural order.
    • Name Ascending: Sorts the test cases alphabetically from A to Z.
    • Name Descending: Sorts the test cases alphabetically from Z to A.
    • Test Execution Time: Sorts the test cases based on the time they took to execute, from longest to shortest.
  • Tree Presentation

    The tree presentation setting allows you to switch between two views:

    • Flat View: Displays all test cases in a single, flat list without any hierarchical structure.
    • Tree View: Displays test cases in a hierarchical structure, reflecting the path of your test files and suites.

Test Run Overview Tree

This area provides an overview of all executed/executing tests and their execution status in real-time. Each entry shows its execution time and, when a test was retried (for example a flaky test or a test run with Run Tests Until Fail), the number of retries. Here, you can navigate through the tests and view the report for each individual test by selecting it. You can also run the currently selected test or test suite again by right-clicking to open a context menu. test-overview

Each test is prefixed with an icon showing its outcome:

Icon Meaning
passed icon Passed
failed icon Failed (a used assert reported a mismatch)
error icon Error (an unhandled runtime error or script error)
flaky icon Flaky (failed at least once but passed on retry)
skipped icon Skipped
orphan icon Orphan nodes detected — shown instead of the pass/fail icon, even if the test itself passed
Advice
Whats the difference between errors and failures?
GdUnit distinguishes between errors and failures. An error is a hard failure such as a test abort or timeout, while a failure is a test error caused by a failed assertion.
Advice
Double-clicking on a test in the test run overview jumps directly to the test, or to the failing line if a failure was reported.

Failure Report

This area displays the failure report of the currently selected failed test.
GdUnit generates the failure report based on the used assert, according to the scheme expected vs current value, followed by the full call stack that led to the failure. Every stack frame is clickable and jumps straight to the corresponding source line. report

For tests with detected orphan nodes, this area reports differently — see Orphan Nodes or Leaking Memory for details.