Send testpoint notification. Works only if testpoint support is enabled (e.g. in components::TestsControl), otherwise does nothing.
Definition in file testpoint.hpp.
Go to the source code of this file.
#include <string>#include <userver/engine/task/task_processor_fwd.hpp>#include <userver/formats/json/serialize.hpp>#include <userver/formats/json/value.hpp>#include <userver/utils/function_ref.hpp>Namespaces | |
| namespace | testsuite |
| Testsuite integration. | |
Macros | |
| #define | TESTPOINT_CALLBACK(name, json, callback) |
| Send testpoint notification and receive data. Works only if testpoint support is enabled (e.g. in components::TestsControl), otherwise does nothing. | |
| #define | TESTPOINT(name, json) |
| Send testpoint notification. Works only if testpoint support is enabled (e.g. in components::TestsControl), otherwise does nothing. | |
| #define | TESTPOINT_CALLBACK_NONCORO(name, json, task_processor, callback) |
Same as TESTPOINT_CALLBACK but must be called outside of coroutine (e.g. from std::thread routine). | |
| #define | TESTPOINT_NONCORO(name, json, task_processor) |
Same as TESTPOINT but must be called outside of coroutine (e.g. from std::thread routine). | |
Typedefs | |
| using | testsuite::TestpointCallback = utils::function_ref<void(const formats::json::Value&)> |
Functions | |
| bool | testsuite::AreTestpointsAvailable () noexcept |
| Returns true if testpoints are available in runtime. | |
| #define TESTPOINT | ( | name, | |
| json ) |
Send testpoint notification. Works only if testpoint support is enabled (e.g. in components::TestsControl), otherwise does nothing.
Example usage:
Throws nothing if server::handlers::TestsControl is not loaded or it is disabled in static config via load-enabled: false.
Definition at line 87 of file testpoint.hpp.
| #define TESTPOINT_CALLBACK | ( | name, | |
| json, | |||
| callback ) |
Send testpoint notification and receive data. Works only if testpoint support is enabled (e.g. in components::TestsControl), otherwise does nothing.
Example usage:
Throws nothing if server::handlers::TestsControl is not loaded or it is disabled in static config via load-enabled: false.
Definition at line 60 of file testpoint.hpp.
| #define TESTPOINT_CALLBACK_NONCORO | ( | name, | |
| json, | |||
| task_processor, | |||
| callback ) |
Same as TESTPOINT_CALLBACK but must be called outside of coroutine (e.g. from std::thread routine).
Throws nothing if server::handlers::TestsControl is not loaded or it is disabled in static config via load-enabled: false.
Definition at line 97 of file testpoint.hpp.
| #define TESTPOINT_NONCORO | ( | name, | |
| json, | |||
| task_processor ) |
Same as TESTPOINT but must be called outside of coroutine (e.g. from std::thread routine).
Throws nothing if server::handlers::TestsControl is not loaded or it is disabled in static config via load-enabled: false.
Definition at line 118 of file testpoint.hpp.