Network Virtualization Capabilities
If you are running an automated tests on your mobile application or website and you want to know how they behave under certain network conditions, you can set the network conditions before the test starts.
Setting network profile is done in Appium's capabilities settings.
This capability allows setting a predefined network virtualization profile on the device of the test.
The chosen profile will be used during the entire test run.
Name | Description |
---|---|
nvProfile | Defines a network virtualization profile on the device which is set for the test |
Java
DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability("nvProfile", "profile1");
driver = new IOSDriver<>(new URL("<server>", dc);
Python
self.dc['nvProfile'] = 'profile1'
C Sharp
DesiredCapabilities dc = new DesiredCapabilities();
dc.SetCapability("nvProfile", "profile1");
driver = new IOSDriver<>(new URL("<server>"), dc);
Ruby
desired_caps = {
caps: {
...
...
nvProfile: 'profile1'
...
...
},
appium_lib: {
server_url: '<server>',
}
}