+

Search Tips   |   Advanced Search


Create manual timers

If the tested application is not compatible with the navigation timing library, you can still create your own timers manually by using the DataExchange client library.

In order to send external data to NeoLoad, you can create custom timers manually, either from scratch or with the help of our utility TimerBuilder.

To create manual timers, you need first to create the Data Exchange API Client as described below.

The NeoLoad Data Exchange API Client provides the utility TimerBuilder in order to time a transaction (a set of business actions).

Below is an example of code to add a timer.

using Neotys.DataExchangeAPI.Model;
// Start timer
TimerBuilder timer = TimerBuilder.Start("scriptName", "timerName");
// Do some transactions
vpba16.avw_backboneCellarAndro.avw_.mo_cHATEAU_LE_DOYENNE.Click();
// Stop timer
dataExchangeAPIClient.AddEntry(timer.Stop());

It is possible to enhance the timer’s information with specific data, for example a URL, a status, etc. as shown below:

using Neotys.DataExchangeAPI.Model;
// Start timer
TimerBuilder timer = TimerBuilder.Start("scriptName", "timerName");
// Do some transactions
vpba16.avw_backboneCellarAndro.avw_.mo_cHATEAU_LE_DOYENNE.Click();
// Specify URL
timer.Url = "myURL";
// Specify Status
StatusBuilder builder = new StatusBuilder();
builder.Code = "code";
builder.Message = "message";
builder.State = Status.State.Pass;

Status status = builder.Build();
timer.Status = status;
// Stop timer
dataExchangeAPIClient.AddEntry(timer.Stop());

The transactions’ timers are then accessible in the Runtime and Results views of NeoLoad:

Timers-Results


Home