Constants

To make writing test scripts easier, Loadero offers variety of constants which can be accessed via loaderoConstants object getters using dot notation. loaderoConstants has 2 nested objects:

  • loaderoConstants.getNetwork()

  • loaderoConstants.getSamplesFiles()

getNetwork()

Network mode

Getter

String value

Default

getDefault()

"default"

4G

getMobile4G()

"4g"

3.5G/HSPDA

getMobileHSDPA()

"hsdpa"

3G

getMobile3G()

"3g"

GPRS

getMobileGPRS()

"gprs"

Edge

getMobileEdge()

"edge"

High jitter

getJitter()

"jitter"

High latency

getLatency()

"latency"

Asymmetric

getAsymmetric()

"asymmetric"

Satellite phone

getSatellite()

"satellite"

5% packetloss

getPacketLoss5()

"5packet"

10% packetloss

getPacketLoss10()

"10packet"

20% packetloss

getPacketLoss20()

"20packet"

50% packetloss

getPacketLoss50()

"50packet"

100% packetloss

getPacketLoss100()

"100packet"

Custom

getCustom()

"custom"

// Example of updating network conditions using constants
updateNetwork(
loaderoConstants
.getNetwork()
.getMobile4G()
);

getSampleFiles()

Sample file

Getter

String value

100 KB (PNG)

getPNG100KB()

"loaderoSample100KB.png"

1 MB (PNG)

getPNG1MB()

"loaderoSample1MB.png"

5 MB (PNG)

getPNG5MB()

"loaderoSample5MB.png"

30 MB (PNG)

getPNG30MB()

"loaderoSample30MB.png"

100 MB (PNG)

getTXT100MB()

"loaderoSample100MB.txt"

// Example of setting a sample file using constants
setFile(byCssSelector("input[type=FILE]"),
loaderoConstants
.getNetwork()
.getPNG100KB()
);