IdeTestManager

IdeTestManager — Unit test discover and execution manager

Functions

Properties

gboolean loading Read

Types and Values

Object Hierarchy

    GObject
    ╰── IdeObject
        ╰── IdeTestManager

Implemented Interfaces

IdeTestManager implements GInitable and GActionGroup.

Description

The IdeTestManager is responsible for loading unit test provider plugins (via the IdeTestProvider interface) and running those unit tests on behalf of the user.

You can access the test manager using ide_context_get_text_manager() using the IdeContext for the loaded project.

Functions

ide_test_manager_get_loading ()

gboolean
ide_test_manager_get_loading (IdeTestManager *self);

ide_test_manager_run_async ()

void
ide_test_manager_run_async (IdeTestManager *self,
                            IdeTest *test,
                            GCancellable *cancellable,
                            GAsyncReadyCallback callback,
                            gpointer user_data);

Executes a single unit test, asynchronously.

The caller can access the result of the operation from callback by calling ide_test_manager_run_finish() with the provided result.

Parameters

self

An IdeTestManager

 

test

An IdeTest

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

a callback to execute upon completion

 

user_data

user data for callback

 

Since: 3.28


ide_test_manager_run_finish ()

gboolean
ide_test_manager_run_finish (IdeTestManager *self,
                             GAsyncResult *result,
                             GError **error);

Completes a request to ide_test_manager_run_finish().

When this function returns TRUE, it does not indicate that the test succeeded; only that the test was executed. Thest IdeTest instance itself will contain information about the success of the test.

Parameters

self

An IdeTestManager

 

result

The GAsyncResult provided to callback

 

error

A location for a GError, or NULL

 

Returns

TRUE if the test was executed; otherwise FALSE and error is set.

Since: 3.28


ide_test_manager_run_all_async ()

void
ide_test_manager_run_all_async (IdeTestManager *self,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Executes all tests in an undefined order.

Upon completion, callback will be executed which must call ide_test_manager_run_all_finish() to get the result.

Note that the individual test result information will be attached to the specific IdeTest instances.

Parameters

self

An IdeTestManager

 

cancellable

a GCancellable or NULL.

[nullable]

callback

a callback to execute upon completion

 

user_data

user data for callback

 

Since: 3.28


ide_test_manager_run_all_finish ()

gboolean
ide_test_manager_run_all_finish (IdeTestManager *self,
                                 GAsyncResult *result,
                                 GError **error);

Completes an asynchronous request to execute all unit tests.

A return value of TRUE does not indicate that all tests succeeded, only that all tests were executed. Individual test failures will be attached to the IdeTest instances.

Parameters

self

An IdeTestManager

 

result

a GAsyncResult

 

error

a location for a GError, or NULL

 

Returns

TRUE if successful; otherwise FALSE and error is set.

Since: 3.28

Types and Values

IDE_TYPE_TEST_MANAGER

#define IDE_TYPE_TEST_MANAGER (ide_test_manager_get_type())

IdeTestManager

typedef struct _IdeTestManager IdeTestManager;

Property Details

The “loading” property

  “loading”                  gboolean

The "loading" property denotes if a test provider is busy loading tests in the background.

Flags: Read

Default value: FALSE

Since: 3.28