BUG: cannot launch test from mapped drive

Bug reports.
telesto
Posts: 4
Joined: Mon Jul 09, 2018 10:43 am

BUG: cannot launch test from mapped drive

Post by telesto » Mon Jul 09, 2018 10:55 am

Hello,

We have updated Ranorex to 8.2.0 version on 2 Windows 10 computers.
Since that, launching tests from a mapped drive (where our files are stored) just won't work, even after aving dowgraded to 8.1.2 version.
This does not depend on a file, we are facing this issue with all the files that are placed on mapped drive.

After digging around, I found that opening the file file with the UNC path (\\server\foler) will work and launch the tests correctly.
Launching the test by the mapped drive will crash with this error in the logs :

Code: Select all

11:00:58.642|FATAL|Ranorex.Tools.Program|Failed to execute assembly 'V:\Commun\Test&Validation\Automatisation\PIH\CasTest8.1.2\CasTest8.1.2\bin\Debug\CasTest8.1.2.exe'. System.IO.FileLoadException: Impossible de charger le fichier ou l'assembly 'file:///V:\Commun\Test&Validation\Automatisation\PIH\CasTest8.1.2\CasTest8.1.2\bin\Debug\CasTest8.1.2.exe' ou une de ses dépendances. L'opération n'est pas prise en charge. (Exception de HRESULT : 0x80131515)
Nom de fichier: 'file:///V:\Commun\TestValidation\Automatisation\PIH\CasTest8.1.2\CasTest8.1.2\bin\Debug\CasTest8.1.2.exe' --- System.NotSupportedException: Tentative de chargement d'un assembly à partir d'un emplacement réseau qui aurait entraîné l'utilisation de l'assembly en mode Bac à sable (sandbox) dans les versions antérieures du .NET Framework. Cette version du .NET Framework n'activant pas la stratégie CAS par défaut, ce chargement peut être dangereux. Si ce chargement n'est pas destiné à utiliser l'assembly en mode Bac à sable (sandbox), activez le commutateur loadFromRemoteSources. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkId=155569.

   à System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   à System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   à System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityCheck
The error is partly in French and roughly says that loading an assembly from the network path would launch it in sandbox mode in previous .NET versions, which is not activated in this version of .NET.

We also tested launching test from a non upgraded 8.0.1 Ranorex version (Windows 7 PC) from the same location and there is no problem.

How can I proceed to make it work again ?

If you need more info, don't hesitate to ask

Best regards

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

Re: BUG: cannot launch test from mapped drive

Post by odklizec » Tue Jul 10, 2018 7:48 am

Hi,

I'm afraid, it's not a bug. Ranorex tests are not supposed to be run from network/shared drives! I'm sure it's mentioned also in the user guide. The only proper way, how to run tests on remote system, is running them from local drive. If you want to share tests with other people, you should either use a version control system (TFS, SVN, GIT,...) or compress them and unpack manually on target system, from which you should run them. The problems you are experiencing are caused just because of network/shared drive and eventually company's group policies/restrictions.
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

telesto
Posts: 4
Joined: Mon Jul 09, 2018 10:43 am

Re: BUG: cannot launch test from mapped drive

Post by telesto » Tue Jul 10, 2018 9:32 am

Thank you for your answer, I'm taking note of that.
It used to work with the previous versions (prior to 8.2.0) though

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

Re: BUG: cannot launch test from mapped drive

Post by odklizec » Tue Jul 10, 2018 9:33 am

I think it was just a pure luck ;) You should really not run the tests from network/mapped/shared drives.
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