SeeTestAutomation- Initializing A VUGen Client
Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .
A VUGen-client handler, i.e., an image_client object, must be initialized prior you access its fields or call commands over it.
This should be done using command ic_init:
const char *ic_init(image_client *client, const char *host, int port, void (*exception_callback)(struct image_client_t *))
Description
This command initializes the given handler of a VUGen client (image_client *client) and associates it with a SeeTestAutomation’s execution agent. The handler must be a pointer to structure image_client located in a valid memory area, i.e., ic_init does not allocate memory for the handler. Parameters host and port identify the executive agent. The fourth parameter is a pointer to a callback function which will be invoked once a test step fails. The function is expected to be a void function having a single parameter, which is a pointer to structure image_client. Value NULL passed into the parameter means you do not wish to register a callback.
When there no commands left for the client, it should be released (see command ic_release_client).
Parameters
- client: the handler to be initialized;
- host: the host name or the IP-address of the associated execution agent;
- port: the port listened by the associated executive agent;
- exception_callback: a pointer to a failure-callback function.
This command, as well as other VUGen-client commands, is declared in header ic_api.h, which can be found in <SeeTestAutomation_installation_directory>/clients/dist/vugen/ic_api.h.
An example of calling ic_init can be found here.
Initialization without using Session IDs
The command ic_init initializes a client which uses Session IDs. This is the default mode of working with SeeTestAutomation clients. However, it is possible to initialize a handler of a VUGen-client which will not apply Session IDs using command
const char *ic_init_without_session_ids(image_client *client, const char *host, int port, void (*exception_callback)(struct image_client_t *))
We strongly discourage you from calling this initializer! It is deprecated and exists only for backward compatibility with previous versions of SeeTestAutomation.