Loading testing of iPad application via jmeter - ipad

I'm trying to do load testing with the help of JMeter with below steps, but I'm getting no internet connection whenever I apply proxy.
JMeter proxy configuration:
Open JMeter and right-click the TestPlan → Add → Threads (Users) → Thread Group.
Right-click the Thread group → Add → Logic Controller → Recording Controller.
Right-click the Threads → Add → Listener → View Results Tree.
Add test script recorder by selecting Add → Non-Test Elements → HTTP(S) Test Script Recorder option.
Add '8080' as Port value and click the Start button. This will start the JMeter proxy on localhost.
These were the configurations we need to make in JMeter in order to record the scripts. Now, we need to set up the JMeter proxy in mobile devices so that all mobile requests will be recorded in JMeter. Follow the steps mentioned below to set up proxy in android and iOS platforms.
Android proxy configuration
Go to Settings → Wi-Fi option.
Long tap the connected network and click the 'Modify Network' option.
From the opened dialog box, check the 'Advanced options' check box.
This will open advanced settings from which we can modify proxy manually. For this, set ‘Proxy’ option to ‘Manual’.
Now, set ‘Proxy hostname’ as your computer’s IP address and ‘Proxy port’ to 8080 as we have set up in JMeter configuration. Refer the below image to get an idea about this setup.
Click ‘Save’ option. You can now start running the application on your mobile device and its requests will be recorded in JMeter.
iOS proxy configuration
Go to Settings → Wi-Fi option.
Click on the connected network.
Select the ‘Manual’ option from HTTP Proxy section.
Set the ‘Server’ value as your computer’s IP address and ‘Port’ value to 8080 as JMeter configuration. Refer to the image given below to get an idea about this set up.
You can now start running the application on your mobile device and its requests will be recorded in JMeter.
But, before running any application, make sure that you click the "Start" button on HTTP(S) Test Script Recorder screen in JMeter.
On clicking the “START” button you may get some Root CA Certificate message dialogue. Just click the “OK” button to get rid of it.
Once you start running your application, the steps of the script will be recorded under “Recording Controller”. See the screenshot below:
Once you are done with the recording of all steps of the test case, stop the script by clicking the “Stop “button at “HTTP(S) Test Script Recorder screen in JMeter.
Expand ‘Recording Controller’ and see all the recorded steps are displayed.
Now click the “Play” button displayed in green.
Click the “View Result Tree”.
Here you will see the execution result of your script.

Related

How to turn off Internet access of my app in iOS + Swift

I have been writing Unit Test and UI Test in my app. I have completed the most part of it. The pending thing is the Network Retry view. This page will be called when there is no internet. Is there any way we can turn off internet access (WiFi) in runtime so that i can execute UI test cases to test this page? In other words, this page will be called in the dashboard if there is no internet. So for going to the dashboard, the app needs internet access(to login, etc). Once it goes to the dashboard, i should be able to turn of internet access from within my test case and then check the Network retry page.
Use Network Link Conditioner to control the internet connection

How to remote desktop to an iOS device, a.k.a. how do Mobile Device Farms work?

I have been trying to understand how Mobile Device Farms like DeviceConnect, AWS Device Farm, SauceLabs, etc. get to remote control iOS devices, but I can't find anything on the subject. They get to do it without jailbreaking, which baffles me even more.
I love these kind of projects, because at the moment it seems undoable, but I know that it is possible ('they' are doing it).
With remote control I mean: seeing the screen of the iOS device on your computer screen and able to touch and swipe with your mouse.
Can someone please point me in the right direction as to how these technically work?
If you're using an iPad (in particular) or an iPhone (if you think you'll be able to make our any detail on the smaller screen) then using remote access to view and control what's on your friend's Mac is a good option. And the best way to remote-access a Mac from an iPad is to use Google's free Chrome Remote Access service, which lets you remotely use Mac programs from an iOS device.
It's quite an involved process to set it up the first time, but easy if you want to do it again in future. You'll need the Google Chrome web browser for Mac, and a Google account.
Here is link for Chrome Remote access
https://chrome.google.com/webstore/detail/chrome-remote-desktop/gbchcmhmhahfdphkhkmpfmihenigjmpp?hl=en
Open Chrome and go to Chrome Remote Desktop on the Chrome Webstore. Click Add to Chrome, then Add App. Click Allow, then Continue.
I will give you one approach and small explanation .
You will need to create application with all possible permissions at first also implementation handlers functions .
For example :
Works with files
Real native Socket connections (not http protocol) + need to have some main server signalling (domain or static ip).
Handle remote touch trigger (main problem for real remote/iOS)
Background part experience
Your app need to be non-Market app (more likely).
You can make Application with all possible options that apple give us.
What can you do remote with your app : -control camera/ Mic read geo data , work with galleries , delete or create files . Socket will be communication line .
Also app must initially started and make (on user request) always allow all permissions .
Use camera :
Send with socket some command example ( openCamera ) . AFTER receive this string perform action for opening camera .
If you can fix programability triggering touch events you can make remoteIOS.
More data links :
Q/A send remote events
Q about touch events
Q/A about Permisions
Sorry for the first quick answer,
All of these: DeviceConnect, AWS Device Farm, SauceLabs use Appium in order to control devices.
The component that execute the command is the WebDriver.
Appium have different WebDriver implementation in order to execute operations to different device.
The iOS WebDriver can be found here: https://github.com/appium/appium-ios-driver.
The protocol in use is the JsonWireProtocol.
more details can be found here:
http://appium.io/,
http://www.seleniumhq.org/
Regards

iPhone/ Android will not dismiss wifi landing page implemented with DNS

I am trying to implement a splash page/ wifi landing page on my existing public wifi network, using the DNS method mentioned in Wiki, in which I host a custom DNS server, that will redirect ALL dns lookup to a local address where a web server is hosted, for all user before they click agree.
After the user clicked agree, my custom DNS server starts returning correct ip for the look up, thus, user will be able to get online.
note: We totally understand that this is in no way secure our network, and even putting our network at risk. But the goal here is to just to pop the landing page up in front of our users.
This approach actually works on Windows Phone (Windows 8 I tested) as splash page, and even on a computer when I try to open a random website, it redirects me to my page, and after I hit agree, I can get to the internet.
When I try it on iPhone/ Android, once I connect to the hotspot, the splash page/ wifi landing page appear as expected (because the device is trying to verify internet access by going to the set of pages) However, after I click agree, and allow internet access, both iPhone and Android splash screen will not go away. I have to force iphone to "use this wifi without network" to exit.
I wonder if there is a special (javascript?) method I can call in the page, or some package I need to send to the device? I noticed on iOS, if I click a link to the App Store, the splash page go away without disconnecting from the network, So, I guess I am missing something here.
For example, clicking the link to the iOS StackOverflow App on iOS device can be a workaround.
Had been googling around for a week now, nothing seems to came up.
by the way, I am building my custom dns server on node js, with the module dnsd.
=-=-=
=-=-=-=-= edit =-=-=-=-=-=
I also uploaded a demo of my code on GitHub:
https://github.com/kylelam/dnsd_wifi
To test it, run it in your local network (sudo node demo.js). Then, change your phone's dns to your machine's IP. Disconnect your phone from wifi and connect to it again. (on iOS, you might need to go into detail, and enable auto-login, and auto-join, or if you can't, just reboot.)
*note1: the server will need to run on port 53, and 80, so it need sudo.
*note2: please don't laugh at my code, I'm very new to this. But please do point out.
*note3: you will need to npm install these packages: os, express, dns, dnsd
ttl set to 0 might be the cause of the issue, try a different value like 5.

iOS UI Automation : toggle network settings during test execution time from within the tests

I need to test various alerts that comes when network disconnects at various points of test flows. So I need to disconnect iPad/simulator from network. Is there any way where we can toggle network settings during tests execution time from within the tests ?
I have searched and found it is not possible : Is it possible to disable the network in iOS Simulator?
But, the response here is old , wondering do we have some approach now ?
Using function performTaskWithPathArgumentsTimeout on UIAHost you can run any program on your computer (if you know the absolute path).
If you can write a program or script (e.g. using osascript) which will turn your internet connection off, then it's possible.
I am actually using this function to open a web page in the simulator which redirects to a link handled by my application, thus testing the behavior when the application is opened from the browser.

Communication Handling using Service in Blackberry 4.5

I am developing an app. (like google talk) which at phone boot-up starts a background service which is continuously running. This service interacts with UI (means any request to server is first sent from UI to service & from service to server) & any response is sent to UI through service.
What i know to start background service at boot up is "Create an alternate entry point and use that to start the background service. "
right click the project properties then go to Application tab, then check "Auto run on startup" / "System Module"
is it right?
In Android u can achieve this Service using system-defined Service class. How to achieve this in Blackberry 4.5? I want to do it (UI & Service) in one project.
Any solution?
Thanks for the reply.
I got a link for
"How To - Setup an alternate entry point for my application"
is it the right solution for starting Service?
I want the app. like email app. which will notify u when an incoming mail comes (like even though ur main application is minimized then also ur service is running in background which will continuously check for any incoming mail & will notify the main UI application through any app icon change)
So for this is there any class like Service class which will start at boot-up or "Setup an alternate entry point for my main UI application" is the only solution for this?
Thanks for the reply..
I read this GlobalEveltListener & tried for handling the communication between the 2 apps (Service app. & UI app.) by starting the Service at auto-startup.
I m using the "Persistent Store" & accessing it in both the apps. But the Persistent Store name should be unique otherwise it gives "Linker error: Cannot start the Service app. as Persistent Store is multiply defined." But I have to access the Persistent Store the both the apps to make some database calls.
So now i m trying for handling the Service by putting both apps in one project. So that the Persistent Store will be unique.
How to achieve this communication between Service & UI in one project?
You only need an alternate entry point if you want the program to behave in both the service mode, starting at boot and running in the background; and in application mode, having an icon in the home screen that the user can click to begin interacting with your software. In that case you need to have an entry point that tells the program "you are starting automatically at boot up", and one that tells the program "you are starting in response to user interaction".
There are other ways to handle this. If your application makes itself available to the user through ApplicationMenus, then you make the one and only entry point "Auto Run" and "System Module" so that it starts on boot, registers the menus and does not display an icon.
You can also use one entry point set to "Auto Run" but not a system module so the icon is displayed and detect the start on boot case using the ApplicationManager.inStartup() method.
The method you describe does work well for the type of application you are developing. It simplifies the initialization by allowing you to specify different arguments to the program in each entry point.
Please see the answer I have given earlier to a different question here. This essentially is an IPC mechanism between two running processes.

Resources