Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



SEO Metadata
titleSeeTest Automation - Set Network Conditions

Command to select the profile configured on the Network Virtualization server to test the device under the different network conditions.


SetNetworkConditions(Profile,Duration)


Supported_os
SupportIOStrue
SupportAndroidtrue

Description

Command to select the profile configured on the Network Virtualization server to test the device under the different network conditions.

Parameters

  • Profile: Select the network conditions profile which was created in the Network Virtualization Tool.
  • Duration: Set the duration in milliseconds for the selected profile (0 = permanent ).
Info
Note: If the 'Profile' parameter is not set (empty), the default profile (no network limitations) will be selected.

Usage

  1. Selecting the Profile:
    Following is the NetworkVirtualization web portal. On the Profiles tab there is the list of profiles that are available on the Server.

    Same profiles should be available on the SeeTestAutomation. User can choose any of the give profiles on the list.
  2. Setting the device. In this case, Android device.

  3. Selecting the profile and the duration using SetNetworkConditions command. In the following example the profile is LowLatency and the duration 30s.

    Info
    Note: Use the Launch command to launch google.com on chrome.

  4. SeeTest Automation supports up to one permanent NV profile and up to one temporary NV profile simultaneously. If the user sets a only a temporary NV profile, the profile will be cleared automatically after the specified duration. If the user sets a permanent profile and after that sets a temporary profile, the profile will be changed to the temporary profile and will be set back to the permanent profile after the duration of the temporary profile has passed. If the users sets a temporary profile and then sets a new temporary profile (no matter if he set a permanent profile before or not), the new temporary profile will replace the previous temporary profile immediately (and will not wait the duration of the previous temporary profile).

Code Examples

Code Block
languagejava
titleJava Example
linenumberstrue
client.setNetworkConditions("LowLatency", 30000);
Code Block
languagec#
titleC# Example
linenumberstrue
collapsetrue
client.SetNetworkConditions("LowLatency",30000);
Code Block
languagevb
titleVBScript Example
linenumberstrue
collapsetrue
client.SetNetworkConditions "LowLatency",30000
Code Block
languagepy
titlePython Example
linenumberstrue
collapsetrue
self.client.setNetworkConditions("LowLatency",30000)
Code Block
languageperl
titlePerl Example
linenumberstrue
collapsetrue
$client->setNetworkConditions("LowLatency",30000);