Katalon Studio 22 - How to do iOS (mobile) testing | 10 STEPS
Vložit
- čas přidán 12. 09. 2024
- Today we will learn :
1. Install Homebrew
2. Install Node.js
3. Install Appium
4. Install and Configure Xcode
5. Configuration of iOS Device/Simulator
6. Run test on mobile
Step 1 : Install Homebrew
brew.sh/
brew -v
which brew
Step 2 : Install Node.js
brew install node
node -v
npm -v
which node
Step 3 : Install appium
npm install -g appium
npm install -g appium@xxx
appium -v
which appium
Step 4 : Open Katalon Studio
Add location of Appium
Step 5 : Get Xcode
Xcode - IDE for mac
Step 6 : Connect your iOS device / simulator
get UDID of your device
npm install -g ios-deploy
ios-deploy -c
instruments -s devices
Xcode - Devices
A9F18306-6B22-442B-99F4-F217A5EE8D38
Step 7 : Initialize WebDriverAgent Project
brew install carthage
cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
mkdir -p Resources/WebDriverAgent.bundle
sh ./Scripts/bootstrap.sh -d
Step 8 : Open webDriverAgent.xcodeproj in Xcode
Build project with targets as shown in demo
Step 9 : Build WebDriverAgent
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=A9F18306-6B22-442B-99F4-F217A5EE8D38' test
Step 10 : Goto Katalon Studio
Connect to iOS device / simulator
Test , Run and Validate
In case of error :
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Try this fix :
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
_________________________________________________________
References:
Url - docs.katalon.c...
appium.io/docs/...
github.com/app...
Demo .ipa file - console.bluemi...
____________________________________________________________
Katalon Studio Beginner Tutorial Playlist
• Katalon Studio
Like on Facebook - / automationstepbystep
Subscribe on:
CZcams - / automationstepbystep
If this helped, you can support my work here - / raghavpal .
.
_______ ONLINE COURSES TO LEARN _______
Visit - automationstepb...
sh: ./Scripts/bootstrap.sh: No such file or directory
I am getting this error, tough i typed by my own
please solve this issue
Hi Hitesh, Try to reinstall carthage with brew
brew uninstall carthage
brew install carthage
@@RaghavPal i have done the same thing, but it is not working.
Hi everyone, I'm facing the same issue here. I've read many articles on how to solve it but still, it is not working. did anyone find a solution to this issue?
Hi Raghav
Can we connect iOS device on Windows machine and do Automation using Katalon Studio.
Or we only require Mac machine to test iOS app using Katalon
Hi Shakeel,
As Katalon works on appium and it requires XCode so it needs mac for iOS.
Also this information will be helpful - blog.testproject.io/2018/06/11/ios-test-windows-without-mac/
Thanks a lot for the video
You're welcome
Hi Raghav i have finally sucess to show my device on pc with Vysor so my question is : can I share other diffrent devices (tablet, phone, ) at the same time and run the same test on these diffrent divices, thanks a lot for the videos.
Hi Zouina, glad to know this. You should be able to use multiple devices and show them with Vysor
@@RaghavPal thanks for the answer, How about testing Iphone I did not find the way to share the screen with my pc using Vysor, how activate developper tools in iphone and ipad.
Hi zouina , not much knowledge on iPhone, will have to check online
@@RaghavPal Thanks a lot
Hi Raghav,
Is there any chance to run ios tests on docker which are written on Katalon Studio? if yes , how? how should I continue?
Do I need an image which should includes xcode , katalon , appium etc.. Thanks for your time.
Hi Tutku, logically speaking, we should be able to do this, but have not tried. It can take some analysis and RnD to get this working.
Is it able to connect wirelessly iOS real devices to Katalon Studio ? I have tried connecting without using a cable by selecting connect via network in xcode, but the iOS device is not detected in Katalon Studio unless using a cable.
Let's break down the problem step by step to troubleshoot the issue.
Step 1: Understand the requirement
You want to connect an iOS real device wirelessly to Katalon Studio without using a cable.
Step 2: Identify the attempted solution
You've tried selecting "Connect via Network" in Xcode, but the iOS device is not detected in Katalon Studio unless you use a cable.
Step 3: Check Katalon Studio's wireless connection support
According to Katalon Studio's documentation, it supports wireless connections for iOS devices using the "Wireless Device" feature. This feature allows you to connect your iOS device to Katalon Studio without a cable.
Step 4: Verify Xcode settings
To connect your iOS device wirelessly, you need to ensure that Xcode is configured correctly. Go to Xcode > Window > Devices and Simulators, and make sure that your iOS device is listed under "Devices". Then, select your device and click on the "Connect via Network" button. Enter the IP address and port number of your device.
Step 5: Check Katalon Studio settings
In Katalon Studio, go to Settings > Mobile > iOS and ensure that the "Wireless Device" feature is enabled. You may need to restart Katalon Studio after enabling this feature.
Step 6: Verify device discovery
After enabling wireless connections in both Xcode and Katalon Studio, try to discover your iOS device in Katalon Studio. Go to Katalon Studio > File > New > Mobile Project, and then select "iOS" as the platform. Click on the "Detect Devices" button to see if your iOS device is listed.
Step 7: Troubleshoot common issues
If your device is still not detected, check the following:
* Ensure that your iOS device and computer are connected to the same network.
* Verify that the IP address and port number entered in Xcode match the ones used in Katalon Studio.
* Restart both Xcode and Katalon Studio to ensure that the changes take effect.
* Check the Katalon Studio logs for any error messages related to device detection.
By following these steps, you should be able to connect your iOS real device wirelessly to Katalon Studio
--
Hi Raghav, first of all - Great job with all the videos. They are easy to understand and to the point. I'm pleased to watch and learn automation using them. One question for you - I've recently started using Katalon Studio and using a mac laptop and iphone X to run mobile automation. After all the set up is done, In katalon when I device, browse the Application File and hit "Start", I get the error - Unable to Start Application (Reason : String Index out of range: -6). Could you please help me understand what this error is and what can I do to resolve it? I'm so bummed and looking for an answer in all forums but nothing has helped. You are my only hope!
Hi Divya, I tried to search on this, could not find any direct resource, you can try reaching to katalon team or discuss in katalon forum
@@RaghavPal Yeah, I have asked on the forum as well. There is an old thread going on but no specific answer yet. I'm still working on resolving it by using your video to set up ios automation on mac. :)
@@Divya-to1ff Were you able to find a fix for this issue? I also getting same issue.
Can you please add more videos on Android testing in Windows environment.
Will add soon,
I can not find a vidoe about using simulator or emulator instead of using real device please help!!! @automation step by step - raghav pal
I will plan on this Manish
Hi Raghav,
Can you please advice is to use Katalon studio for mobile Automation.
Is it matured enough to use at organization level
Hi Shakeel, As Katalon Studio uses appium lib which is most widely used for mobile automation, you should be able to handle your mobile automation, Also it has scripting mode so you can create custom keywords if needed.
One downside will be as of now you might not get a lot of online articles available like we have for appium or selenium.
Suggest you to first do a small pilot project (POC) and then decide.
@@RaghavPal many thanks for your reply.
I have good knowledge on appium.Shall I go ahead and use for Android and iOS platform
Yes Shakeel, Also always do a POC before doing the entire project.
This video works the same if it is going to be automated in the same way on ios mobile but through Windows?
If you are using windows, the best option to use iOS devices will be to use cloud services like Browserstack, Saucelabs etc
@@RaghavPal Thanks bro, I'll do that
Hi, Raghav!
Do you maybe know, is it possible to run somehow mobile tests on iOS 16? Because i have success results on iOS 15 only.
Hi Dmytro
Yes, it is possible to run mobile tests on iOS 16. However, the success of your tests may depend on several factors such as the device used, the version of Xcode and the iOS SDK, and the version of the testing framework you are using.
First, make sure that you have the latest version of Xcode installed on your machine, as this is required to run tests on iOS 16. You can check for updates in the App Store or by going to the "Updates" tab in the App Store.
Next, make sure that your testing framework and any associated libraries or dependencies are up to date and compatible with iOS 16. You may need to update your framework or make changes to your tests to ensure compatibility.
It is also important to note that some features or functionality may be different or unavailable in iOS 16 compared to previous versions, which could impact the success of your tests. Therefore, it is recommended to thoroughly test your application on iOS 16 to ensure compatibility and identify any potential issues.
Overall, it is definitely possible to run mobile tests on iOS 16, but it may require some adjustments to your testing setup and approach to ensure success.
Hi sir. Do you how to use performtouchid? Im starting to explore how to use it on my testing. Thank you
Not exactly Kenneth
ty sir
Most welcome Rey
Hello Everyone, for those of you , who had got an error message when trying to deploy "ios-deploy" using npm command.
Error :
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/ios-deploy
npm ERR! command failed
npm ERR! command sh -c ./src/scripts/check_reqs.js && xcodebuild
npm ERR! stderr: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
npm ERR! xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Please use this command instead "brew install ios-deploy". This is a quick workaround.
Hi Vivek, thanks for adding this
hi.. can u make a tutorial with updated software plssssss :" thankyouuuuuu!!!
cause, i use katalon studio v8.6.5 and ios 16.. please help me
I will plan
Hi Raghav, Thanks for the awesome video. But I am getting an error message: Unable to start an application. I tried using .ipa and .app files but no luck.
Hi Rozmeen, will need to check detailed logs, can try with another app
Your video was very usefull. But, How to achieve automation in iOS using Katalon for iOS real devices
I should have replied to your post, but did not scroll down far enough to see it first. I am struggling with the same issue. See my post/details above.
Hi Resham, once you have done appium setup, you should be able to connect with your real device. Katalon Studio uses appium. I suggest you search for some appium articles to get your device connected and then resume with Katalon Studio
Can you run it on cloud devices such as Browserstack?
yes
can you please help me, i am running katalon on mac and only simulators are appearing while my device is connected and detected by xcode.
Hi Chiraz, what is your OS version. Check this - forum.katalon.com/discussion/4509/real-device-is-not-detected
question. I cant install appium . its says .... permission issue ... try running the command again as root/Administrator Any idea? try to google it but is not successfully. Thanks for answer!
Hi Viktor, have you tried opening cmd as administrator and try again
Yo Bro!! Hw do you run your Tests Using Emulator rather than Physical Device???
You will have to add connection properties to your emulator service. I will try to add a video on that
Oh yeah Please do. That would be awesome bro much thanks. As you mentioned it, can you suggest a few emulator for Katalon Studio? That would be Great.
emulators provided by Kobiton can be directly connected to as it has in-built integration
I was planning on trying Kobiton anyway. Thanks again bro.
Hi Raghav, I am facing some issue in this now. I am trying to perform sh ./Scripts/bootstrap.sh -d at the /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent but getting error as below :
Failed to read file or folder at /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Resources/Cartfile: Error Domain=NSCocoaErrorDomain Code=260 "The file “Cartfile” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Resources/Cartfile, NSUnderlyingError=0x7fc04ad18270 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
Can you please let me know what may be the issue. I tried the solutions as to reinstall appium and try but that is also no result.
Hi Deep, will need to check the setup again, Try checking some online resources
Hi, can i automate qr code by using katalon studio
Hi Rafeek,
I have not tried it, will need to check online or with Katalon Team
Hi Raghav, how to see heapdump location?
Hi
To see the heapdump location in Katalon Studio, you can follow these steps:
1. Open the **Preferences** dialog.
2. Click on the **General** tab.
3. In the **Advanced** section, click on the **Heap Dump** button.
4. The **Heap Dump Location** field will show the location of the heapdump file.
The heapdump file is a file that contains a snapshot of the Java heap memory. This file can be used to troubleshoot memory problems in your Katalon Studio tests.
Here are some additional information about the heapdump location in Katalon Studio:
* The default location of the heapdump file is `%USERPROFILE%\Katalon Studio\heapdump.hprof`.
* You can change the location of the heapdump file by entering a new path in the **Heap Dump Location** field.
* The heapdump file is created when a memory error occurs in your Katalon Studio tests.
* You can also manually create a heapdump file by clicking on the **Create Heap Dump** button in the **Heap Dump** dialog.
Can you please make a tutorial for how to handle popup and online form filling in katalon studio
Will plan to do it soon Venkat.
Hey Raghav, I followed all the steps and build was succeeded. But Katalon isn't showing my real device under list of available devices. Currently running Katalon 7, iOS 12.4, Appium 1.10, Xcode 11. Any solution for this ?
Hi Shreyas, is your device shown when you run the command adb devices. You can take help from a relevant video here - czcams.com/play/PLhW3qG5bs-L8npSSZD6aWdYFQ96OEduhk.html
@@RaghavPal I am still facing issue. Does Katalon 7 supports iOS 12.4?. And I got the mail btw.
can we have these installation on windows?
Hi Priti, you may not be able to use real iOS devices directly on windows system, Can check cloud devices platform like Browserstack, Saucelabs etc
Hi sir,
Issue : unable to Open ipa on IOS simulator, installation process success, but when WebDriverAgent-runner try to invoke app. it won't
* Same error coming (e.g in above video timing 33:19 sec), could you please help us to resolve such issue ?
Hi Bharat, not sure, did you try searching online
Hi sir. question im facing an error in step 7 which is initialize webdriveragent
=
Fetching dependencies
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
Traceback (most recent call last):
Hi, pls check if this helps stackoverflow.com/questions/29108172/xcrun-unable-to-find-simctl
@@RaghavPal got it now.. question im getting an error in building webdriveragent.. it says webdriveragent does not contain a schemed webdriveragentrunner
will need to check your setup. Just try to do it again from scratch with the video
Hi Raghav,
I have a problem when run record in simulator. app was installed successfully but can't open. Log:
[WD Proxy] Got an unexpected response: {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
pls help me!
Hi, Pls check this - forum.katalon.com/t/ios-test-shows-error-2/20469/4
How do we launch already installed app using bundleId on iOS and also how do we setup capabilities
Hi Komireddy, I will try to cover this in a video
Can we reuse scripts created for Android in iOS
No, scripts created for Android cannot be reused for iOS as they require different automation frameworks and methods of interaction with the application. Android automation typically uses the Appium framework with Android-specific commands and methods, while iOS automation requires the use of the XCUITest framework with iOS-specific commands and methods. Therefore, separate scripts need to be created for Android and iOS automation. However, the same testing scenarios can be used for both platforms.
Hi Raghav, Do you know a way to automate Touch id ?
Hi Lakmal, not sure if there is any built-in keyword for this, but you can always create a custom keyword using groovy scripting
Does it work for Android mobile app as well? I've an android app for testing.
Yes Punit, pls check the video for android automation with Katalon Studio
@@RaghavPal is it possible to test using several android versions ( I.e connecting using simulator for Android OS as well)
Is there any other method to install homebrew as github is blocked on my mac?
Hi Vandana, not sure Pls check docs.brew.sh/Installation
Hi Sir ! does Iphone testing work on windows?
You cannot do iOS testing directly on windows
Raghav: Each time I try to start and run my local iOS device from Record Mobile, I do get error as "Unable to start application on this device: An unknown server-side error occurred while processing the command. Original error: Could not install app: ‘Command ‘iOS-deploy --id -bundle /’ exited with code null’ (WARNING: The server did not provide any stackrace information)". Please help me on this to fix this. Thanks
Hi Rakesh does this work fine on simulator. Not sure about this. Check - github.com/appium/appium/issues/8663
Hi Raghav, it does not work fine on simulator too. Whenever I try to run on simulator, WebDriverAgent gets installed and even app too but is stucked on progress information dialog of Mobile Recorder on log '[XCUITest] Launching WebDriverAgent on the device'. And nothing after that.
@@rakeshshrestha1599 Hi Rakesh, were you able to find the solution?
hi sir,
Mac version: 10.11.6
Xcode version: 8.2.1
Katalon version: 6.1.4
Appium version: 1.8.1
i have build and run my webdriveragent in xcode 8.2.1 with no error. My deploy target was ios simulator 10.2. It works fine with integration app.
However, i am keep facing issue on codebuild error 65 with signal null in katalon studio.
Hi Liang, is this a followup on some earlier question, Sorry, but i could not refer. Pls add this as a reply to earlier comment.
hi sir....at 24:51 ....when clicked on build button....m getting build failed.....how to solve.please help
Hi Ashraf, will need to see the setup and logs for troubleshooting.
@@RaghavPal that has been resolved..... I would like to give a path for already installed app in my real device connected via usb to appium inspector... How can i give that, kindly guide.
Hello. Can you please share mobile object spy on katalon studio video tutorial with methods and captures? Because there are no documents or videos about on it. Thanks
Hi, I believe I have covered some basics on this. Check this playlist - czcams.com/play/PLhW3qG5bs-L_D4ZePNNjvmIULuu6mBHbu.html
Hi :) please can you give me a configuration that can detect ios devices ?
I mean a version of macOS, of Xcode, of appium, of Katalon Studio, ...
Thanks a lot
Hi Chiraz, this depends on your OS, ver of appium, katalons studio etc. So will be difficult to suggest a fix configuration
@@RaghavPal Hi Raghav, not a fix configuration, but if it is possible a used and experimented configuration that you use please
I did it on a diff system, will try to check
@@RaghavPal ok thanks a lot, I am wwaiting for your response :)
bookmarked
Demo .ipa file not available, can u upload it again?
I will check Sertac, you can also use any sample ipa file from internet