Skip to main content

SeeTestAutomation - SetNetworkConditions

info

Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .

SetNetworkConditions(Profile,Duration)

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

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

Java Example

client.setNetworkConditions("LowLatency", 30000);

C# Example Expand source

client.SetNetworkConditions("LowLatency",30000);

VBScript Example Expand source

client.SetNetworkConditions "LowLatency",30000

Python Example Expand source

self.client.setNetworkConditions("LowLatency",30000)

Perl Example Expand source

$client->setNetworkConditions("LowLatency",30000);