Instrumentation fail for iOS

Ask general questions here.
Janvi Bhuva
Posts: 6
Joined: Mon Aug 19, 2019 11:52 am

Instrumentation fail for iOS

Post by Janvi Bhuva » Mon Aug 19, 2019 12:02 pm

Hi,

We are trying to instrument iOS APP with Ranorex 9.1.0 and every time when we instrument the APP we get the following error:

Instrumentation failed:

Please make sure that
- The IPA minimum OS version matches the device OS version
- The IPA supports the device architecture
- The IPA is not already instrumented with static Ranorex lib
- You are not using an IPA backup from the app store

With the details:

```System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\<username>\AppData\Local\RanorexStudio9\RxEnv\iOS\temp\instrumentation\Payload\Nlist.app\Frameworks\ZoomAuthenticationHybrid.framework\cache_uyertuazlkxcjrlwkejr\39bb748b334003e3fa\54777795775ba1b354a4317504a1ab10ae8862f30241949aa797c67e29fd9c9b.tmp'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at Ionic.Zip.ZipEntry.InternalExtract(String baseDir, Stream outstream, String password)
at Ranorex.Plugin.Mobile.Tools.Ios.Instrumentation.IpaFileZip.Extract()
at Ranorex.Plugin.Mobile.Tools.Ios.Instrumentation.IosInstrumentation.StartInstrumentation()
at Ranorex.Plugin.Mobile.Tools.Ios.IosToolRunner.Instrument(IIosOptions options, Action`2 progressCallback, String& instrumentedIpaPath)
at Ranorex.Plugin.Mobile.Tools.Ios.IosToolRunner.Instrument(IOptions options, Action`2 progressCallback, Action`1 msgCallback)
at Ranorex.Plugin.Mobile.RxIntegration.Instrumentation.IosWorker.Run()
at Ranorex.Controls.Instrumentation.IosResultPage.bgw_DoWork(Object sender, DoWorkEventArgs e)```

If any help provided would be great.
Thanks!

User avatar
Support Team
Site Admin
Site Admin
Posts: 11963
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Instrumentation fail for iOS

Post by Support Team » Tue Aug 20, 2019 9:32 pm

Hello Janvi,

I am unable to duplicate this exact error, I recommend creating a support query and uploading your IPA so that we may test the instrumentation on our end.

https://www.ranorex.com/support-query/

Regards,
Sean
.
Image

Janvi Bhuva
Posts: 6
Joined: Mon Aug 19, 2019 11:52 am

Re: Instrumentation fail for iOS

Post by Janvi Bhuva » Thu Aug 22, 2019 11:47 am

Hi,

Thanks for the support. :)

Another problem I face while recording my test was, our APP has a feature to upload files through the Dropbox, Camera and from Files. I am not able to record my cases while I am accessing any of this target APP. Please, can you also suggest the method to upload the files through the system APPs?

Thanks.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5071
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Instrumentation fail for iOS

Post by odklizec » Thu Aug 22, 2019 11:54 am

Hi,

I'm afraid, you are out of luck with automating system and 3rd party apps. It's simply not possible due to iOS security restrictions. Ranorex can automate only instrumented apps and there is no way around. This is not a Ranorex fault, but iOS limitation.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Janvi Bhuva
Posts: 6
Joined: Mon Aug 19, 2019 11:52 am

Re: Instrumentation fail for iOS

Post by Janvi Bhuva » Fri Aug 23, 2019 6:56 am

Hi,

Thanks for the prompt reply. :)

Also, our system has the functionality that works both on the WEB and the Mobile parallelly. Our system works like Admin use the WEB and the user is using the Mobile. There is an interactive activity which is performed on both the ends the admin and the user. Is it possible to record and run the mobile test case and WEB test case parallelly?

Example: We have the admin which activates the user then the only user can perform certain activities and once the user performs the activity the admin is prompted for the changes made by the user. So I need the WEB and the mobile interactive actions.

Is there any way around like we record the WEB test cases and Mobile test cases in one recording module and run the recording. :?:

Thanks.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5071
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Instrumentation fail for iOS

Post by odklizec » Fri Aug 23, 2019 7:13 am

Hi,

Sure, it's possible to create a mixed desktop and mobile recording. Just go to Settings >> Current Recording and here set Recorder UI mode to Global.
GlobalRec.png
GlobalRec.png (31.47 KiB) Viewed 125 times
Anyway, if I were you, I would definitely split mobile and web actions into separate recordings! Of course, you can have all actions in one large recording. But large recordings are hard to maintain and only rarely reusable. So it's generally good idea to keep the recordings as small as possible (up to 10 actions or so) and only for single purpose. This would allow you to eventually reuse recordings in other parts of test. Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Janvi Bhuva
Posts: 6
Joined: Mon Aug 19, 2019 11:52 am

Re: Instrumentation fail for iOS

Post by Janvi Bhuva » Fri Aug 23, 2019 8:14 am

Hi odklizec,

Thanks :) . It is very useful.

My mobile app testing needs to interact with WEB. In my test cases, user needs to perform certain actions on the mobile app and some other actions on the WEB. So my question is

Is it possible to switch between two automation roots (i.e. a mobile device and a WEB) within the same automated test case?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5071
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Instrumentation fail for iOS

Post by odklizec » Fri Aug 23, 2019 9:10 am

Hi,

Sure, it's possible to switch automation roots. Check this post:
viewtopic.php?f=23&t=12569&p=50175#p50199

Basically, you must add Host.MakeCurrentHost("Localhost"); (as User Code action or via code module) before calling desktop/web-based actions and then Host.MakeCurrentHost("NameOfMobileEndpoint"); before continuing with mobile steps. Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Janvi Bhuva
Posts: 6
Joined: Mon Aug 19, 2019 11:52 am

Re: Instrumentation fail for iOS

Post by Janvi Bhuva » Mon Aug 26, 2019 1:20 pm

Hi,

Thanks! for your help and it works.

One more blocker I am facing in my application is we have the feature to "Draw Signature" and I am not getting any clues regarding how I can draw the Signature while recording my mobile test-case.

Can you please guide me on this?

Thanks !

User avatar
Support Team
Site Admin
Site Admin
Posts: 11963
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Instrumentation fail for iOS

Post by Support Team » Mon Aug 26, 2019 6:49 pm

Hello All,

Regarding the original issue, This error was being caused by the respective file in the IPA hitting the windows file path character limit. To resolve this it is best to shorten the file names in the IPA or alternatively edit the registry and shorten the %appdata% folder file path where the files get unpacked during instrumentation. Please note that editing the registry is not recommended but if you have to we recommend creating a backup and reverting the changes after instrumenting.

Regards,
Sean
.
Image

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5071
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Instrumentation fail for iOS

Post by odklizec » Mon Aug 26, 2019 7:06 pm

Janvi Bhuva wrote:
Mon Aug 26, 2019 1:20 pm
One more blocker I am facing in my application is we have the feature to "Draw Signature" and I am not getting any clues regarding how I can draw the Signature while recording my mobile test-case.
Hi,

There is no way to record drawing. Nor there is a way to manually add precise drawing action. The closes ‘drawing-like’ action is swipe action, which could be used for creating simple lines. So you can for example draw ‘x’ mark with swipe action. But that’s probably all 😉
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Phoebe11
Posts: 1
Joined: Fri Aug 23, 2019 12:36 pm

Re: Instrumentation fail for iOS

Post by Phoebe11 » Thu Aug 29, 2019 7:23 am

odklizec wrote:
Fri Aug 23, 2019 7:13 am
Hi,

Sure, it's possible to create a mixed desktop and mobile recording. Just go to Settings >> Current Recording and here set Recorder UI mode to Global.
GlobalRec.png
Anyway, if I were you, I would definitely split mobile and web actions into separate recordings! Of course, you can have all actions in one large recording. But large recordings are hard to maintain and only rarely reusable. So it's generally good idea to keep the recordings as small as possible (up to 10 actions or so) and only for single purpose. This would allow you to eventually reuse recordings in other parts of test. Hope this helps?
Exactly what I needed! You just saved me several hours. Thanks!

Janvi Bhuva
Posts: 6
Joined: Mon Aug 19, 2019 11:52 am

Re: Instrumentation fail for iOS

Post by Janvi Bhuva » Fri Aug 30, 2019 7:48 am

Hi!

Thanks. It helps me a lot.

Now all my scripts are ready for the testing server, but I need to run my recorded script for the production server as well.

Example: For the initial level I recorded my script for the "qa.test.com" and now I want to reuse the same script for the domain "dev.test.com". Please, can you brief me on this issue I am facing? Is it possible to reuse my script for different domains?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5071
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Instrumentation fail for iOS

Post by odklizec » Mon Sep 02, 2019 12:41 pm

Hi,

You can use OR operator in domain xpath, like this:

Code: Select all

/dom[@domain='qa.test.com' or @domain='dev.test.com']
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration