Network Simulation
Network-related tests for mobile apps need not be such a hassle if the testers are given full control of the network being used. Using a simulated lab network, testers can easily test their mobile apps by simply selecting a network profile and applying it to the device in use. The network profiles carry different parameters like Delay and Upload/Download speed. This feature helps testers to replicate a myriad of network conditions for testing mobile apps.
In order to check how an app performs in slower internet connections, QAs need to simulate slow network speeds and put the app through various user actions. Let's see ways to do this.
Though the steps to Applying a Network Profile to the devices on the platform maybe the same on the New and Old User Interface of the platform. Some options maybe placed elsewhere. If you need instructions for the steps on the Old UI, please scroll down further.
Prerequisites:-
The user should be registered on the pCloudy platform
pCloudy allows users to simulate different network profiles in a manual test or an automated process by using Appium on both iOS and Android. We will dive into this below.
1. Steps to use Network Simulation for manual testing
- Login to the pCloudy platform
- Connect to a device
- Select the Network option on the right pane under "All Actions"
- A dialogue box opens up containing different network profiles
- Select one of the options, and network conditions will be applied to the device. Now the user can run the necessary tests on the app to verify its performance at that particular speed
- Changing network profile
- During the testing session, if a user needs to test the app on other network conditions, the user can Unshape and start the process again.



2. Steps to use Network Simulation for Automation(Appium)
pCloudy provides an easy-to-call method that can be added to user Appium scripts in about 5 to 10 lines of code, depending on what you are trying to do.
Users can use the below-mentioned command in the appium script to shape/unshape the network profile
|
As an example Refer to the below screenshot

pCloudy Network Profiles
Network | Latency(ms) | Bandwidth-Upload/Download(kbps) | Packet loss(%) |
---|---|---|---|
4G-Advanced-Average | 60 | 20000/30000 | 0 |
4G-LTE-Good | 80 | 9000/18000 | 0 |
4G-LTE-Advanced | 100 | 10000/14000 | 0 |
4G-LTE-Poor | 80 | 3000/7000 | 1 |
3G-Poor | 100 | 600/2000 | 1 |
3-5G-HSPA-Good | 100 | 1500/7000 | 0 |
4G-LTE-Average | 100 | 4400/10000 | 0 |
Select one of the options show above, and the network conditions will be applied to the device.
Terms Used
- PacketLoss – Network packet loss.
- latency – Latency applied on packets in the Network. It shows the time that data takes to transfer across the network. Networks with a longer delay or lag have high latency.
- Bandwidth. in/bandwidth.out – Limitation of download and upload network bandwidth from the device.