To make writing test scripts easier, Loadero offers variety of constants which can be accessed via loaderoConstants
object nested objects using dot notation. There are 2 objects of loaderoConstants
:
loaderoConstants.network
loaderoConstants.sampleFiles
Network mode | Constant | String value |
Default |
|
|
4G |
|
|
3.5G/HSPDA |
|
|
3G |
|
|
GPRS |
|
|
Edge |
|
|
High jitter |
|
|
High latency |
|
|
Asymmetric |
|
|
Satellite phone |
|
|
5% packetloss |
|
|
10% packetloss |
|
|
20% packetloss |
|
|
50% packetloss |
|
|
100% packetloss |
|
|
Custom |
|
|
// Example of updating network conditions using constantsloaderoConstants.network.mobile_4g;
Sample file | Constant | String value |
100 KB (PNG) |
|
|
1 MB (PNG) |
|
|
5 MB (PNG) |
|
|
30 MB (PNG) |
|
|
100 MB (TXT) |
|
|
// Example of setting a sample file using constantssetFile("input#file-upload", loaderoConstants.sampleFiles.png100KB;