Using locust to simulate load test from android or iOS phones - user-agent

Is there a way to simulate an android user agent in locust.io load testing? I have a server I need to load test and they check if the call is from an android or iOS phone

Locust's http client for HttpUser is based on the requests module. This should work for you.
Sending "User-agent" using Requests library in Python

Related

Web page beacon

I would like to send a BLE Eddystone beacon from a web page. My application requires to send SSID info to a BLE listener. My thought is to have a user load a URL on a smartphone that would run JS to send periodic BLE Eddystone-UID beacons with SSID info embedded. I need the web page to work on both Android and iOS phones. Is there a simple way to do this using Javascript?
I looked into physical web but it did not seem to provide this capability.
thanks,
Ian
The current version of the Web Bluetooth API specification allows websites, running in the Central role, to connect to remote GATT Servers over a BLE connection. What you're looking for is a way to run in the Server role to advertise your data.
In your case, I'd recommend you have a look at https://www.npmjs.com/package/#abandonware/bleno

I want to understand how Xamarin.UItest actually interacts with app

So I am relatively new to Xamarin apps and Xamarin.UITest. What I want to understand is how it actually works under the hub? For example, for Appium we know that the script communicates with Appium server via JSONWP then Appium server sends response to UIAutomator which translates it and sends to Bootstrap.jar.
I know that communication is done through IApp Interface but I want to understand actually how it happens.

how to intercept xamarin mobile application traffic using burp?

I've set up my Iphone to intercept traffic using burp. Im able to intercept traffic for web browser requests and non xamarin applications. However im not able to intercept xamarin applications traffic. However the application is working fine sending and receiving traffic but burp is not intercepting the request. Can anyone tell me how this is possible. Is it because burp is not able to see the traffic or xamarin application is not connecting via proxy? Also how to intercept traffic for xamarin applications.

Can changing user agent to android in jmeter recorded test send traffic from android devices even if no emulator is installed in my laptop?

For load testing from different browser do we need to have all browser version on host machine or user agent change in existing script will work?
JMeter acts on protocol level, it builds HTTP requests using Java code and Apache HTTPClient libraries by default.
If application you're trying to test logic differs depending on browser you can mimic different browsers by sending the relevant User-Agent header via HTTP Header Manager.
Also consider the following settings:
configure your HTTP Request samplers to:
Retrieve all embedded resources
Use concurrent pool of 4-6 threads for this
This way you will be able to replicate browser behaviour when it comes to working with images, CSS files, JavaScript files, etc.
add HTTP Cache Manager to represent browser cache
add HTTP Cookie Manager to mimic simulate browser cookies, deal with cookie-based authentication, represent sessions, etc.
Check out How To Make JMeter Behave More Like A Real Browser guide for more detailed explanation of the above recommendations.
No.
A web-browser uses User-Agent to tell a server what kind of Browser and Operating System it uses. According to Wikipedia:
This allows the web site to customize content for the capabilities of a particular device
If you recorded your script with Chrome, JMeter would tell the server it was Chrome, and the server would respond to JMeter as if it were Chrome. JMeter, however, does not actually user Chrome in any way. Similarly, if you were to change you User-Agent to Android, the server would just respond to JMeter as if it were an Android device.

Testing network unavailability on Windows Phone 7

I developing an app which connects to my webserver. During development I have the webserver and phone emulator on the same machine.
How can I test how my app behaves when there's no network connectivity? Are there test hooks on the emulator? Should I use Fiddler to fake timeouts? I don't see any test hooks on the GetIsNetworkAvailable() call...
Thanks,
The approach I've used is to wrap the appropriate methods in my own NetworkService class, this lets me switch out the code with a Stub version during unit tests and integration tests on the emulator.
The NetworkInterface.NetworkInterfaceType offers a enumeration that contains the network currently servicing internet requests. It will return 'none' if there isn't a internet connection available. (unfortunately it doesn't provide health information on the nature of the connection available, so if you have poor coverage it will still return MobileBroadbandGSM)
You can find the full information on the NetworkInterfaceType enumeration here

Resources