Top | ![]() |
![]() |
![]() |
![]() |
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.
IdeTestManager *
ide_test_manager_from_context (IdeContext *context
);
Since: 3.32
VtePty *
ide_test_manager_get_pty (IdeTestManager *self
);
Gets the VtePty to use for running unit tests.
Since: 3.32
gint
ide_test_manager_open_pty (IdeTestManager *self
);
Gets a FD that maps to the child side of the PTY device.
Since: 3.34
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.
self |
||
test |
An IdeTest |
|
cancellable |
a GCancellable, or |
[nullable] |
callback |
a callback to execute upon completion |
|
user_data |
user data for |
Since: 3.32
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.
Since: 3.32
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.
self |
||
cancellable |
a GCancellable or |
[nullable] |
callback |
a callback to execute upon completion |
|
user_data |
user data for |
Since: 3.32
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.
Since: 3.32
GPtrArray * ide_test_manager_get_tests (IdeTestManager *self
,const gchar *path
);
Locates and returns any IdeTest that is found as a direct child
of path
.
Since: 3.32
gchar ** ide_test_manager_get_folders (IdeTestManager *self
,const gchar *path
);
Gets the sub-paths of path
that are not individual tests.
an array of strings
describing available sub-paths to path
.
[transfer full][array zero-terminated=1]
Since: 3.32
GCancellable *
ide_test_manager_get_cancellable (IdeTestManager *self
);
Gets the cancellable for the test manager which will be cancelled when the cancel action is called.
Since: 3.34
void ide_test_manager_ensure_loaded_async (IdeTestManager *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Calls callback
after the test manager has loaded tests.
If the test manager has already loaded tests, then callback
will
be called after returning to the main loop.
Since: 3.32
gboolean ide_test_manager_ensure_loaded_finish (IdeTestManager *self
,GAsyncResult *result
,GError **error
);
“loading”
property“loading” gboolean
The "loading" property denotes if a test provider is busy loading tests in the background.
Owner: IdeTestManager
Flags: Read
Default value: FALSE
Since: 3.32