Support & information center

How to use machine profile variables in test scripts via the API

testRTC allows you to set your own machine profile variables when running test scripts via the APIs.

You can use machine profiles via the API to set the following parameters:

  1. Browser: Choose the executed agents’ browser type and version.
  2. Location: Choose the probes’ geographical location.
  3. Media: Choose media (video and audio) that will be used in a test. You can choose based on the media resolution and bandwidth.
  4. Network Profile: Choose the probes’ network profile. The network profile is composed of different criteria, such as the agents’ bandwidth, latency and drop packets percentage.
  5. Firewall Profile: You can select the networking ports for both open and closed probes, as well as define packet filtering rules. The firewall profile allows you to simulate various networking setups, including different firewall and NAT rules.


Example values for a machine profile:

{
 "browser": "linux-chrome-stable",
  "location": "East-US",
  "media": "VOA-VGA.mp4",
  "network": "No throttling",
 "firewall": "FW_NO_FW",
}

Browser options

Choose one of the following values from the ‘Browser’ column and add it to your script as can be seen in the example above – “browser”: “linux-chrome-stable”

Browser
linux-chrome-stable
linux-chrome-beta
linux-chrome-unstable
linux-firefox-stable

Location options

Choose one of the following values from the ‘Location’ column and add it to your script as can be seen in the example above – “location”: “East-US”

Location
East-US
West-US
Europe
Asia
Japan
Australia
Brazil
Canada
India
London

Media options

Choose one of the following values from the ‘Media’ column and add it to your script as can be seen in the example above – “media”: “VOA-VGA.mp4”

MediaVideoAudio
VOA-VGA.mp4640×480 @ 30 fps121 Kbps
KrankyGeek-2-1080p.mp41920×1080 30 fps173 Kbps
Salsa-720p.mp41280×720 30 fps192 Kbps
Tame_Impala-320x240p320×240128 Kbps
VOA-VGA04640×480 30 fps121 Kbps
VOA-VGA10640×480 30 fps121 Kbps
VOA-audio-only.mp4N/A98 Kbps
WebRTC-Tutorial-Audio10N/A98 Kbps
WebRTC-Tutorial-Audio20N/A98 Kbps
WebRTC-Tutorial-Audio40N/A98 Kbps
Birds192×96N/A Kbps

Note:

Please note that all video files used are uncompressed Y4M files. What testRTC will do over the network with these video sources is up to your application logic, network conditions and the machine performance, as these media sources get encoded by WebRTC in realtime.


Network Profile options

Choose one of the following values from the ‘Profile’ column and add it to your script as can be seen in the example above – “network”: “No throttling”

ProfileBandwidthLatencyPacket loss
No throttlingNo limitation00%
Call Drop50 Kbps500ms20%
DSL8 Mbps40ms0.5%
Very Bad Network1 Mbps500ms10%
Wifi30 Mbps40ms0.2%
Wifi High packet loss30 Mbps40ms5%
Regular 2.5G150 Kbps200ms3%
Regular 3G750 Kbps250ms1.5%
Poor 3G400 Kbps350ms5%
Regular 4G4 Mbps02%
Poor 4G4 Mbps350ms5%
Unstable 4G4 Mbps500ms10%
High Latency 4G4 Mbps600ms0.2%
High Packet Loss 4G4 Mbps5ms20%
50% Packet Loss40 Mbps10ms50%

Firewall Profile

Choose one of the following values from the ‘Firewall Profile’ column and add it to your script as can be seen in the example above – “firewall”: “FW_NO_FW”

Firewall ProfileDescription
No FirewallAll ports are open
FW – HTTP and HTTPS AllowedOnly HTTP & HTTPS allowed
FW – HTTPS AllowedOnly HTTPS allowed
FW – BaselineOnly ports that are required for the agent operation are open.

For a detailed list of available firewall configurations, please refer to What are the test profile configurations?

Was this article helpful?

Related Articles