+

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 without Java, 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 Java code to add a timer.

import com.neotys.rest.dataexchange.model.TimerBuilder;

// Start timer
final 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:


import com.neotys.rest.dataexchange.model.Status.State;
import com.neotys.rest.dataexchange.model.TimerBuilder;
import com.neotys.rest.dataexchange.model.Status;
import com.neotys.rest.dataexchange.model.Status.State;
import com.neotys.rest.dataexchange.model.StatusBuilder;

// Start timer
final 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
final Status status = (new StatusBuilder()).code("code").message("message").state(State.PASS).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