How can I test with different versions of Internet Explorer?

Ranorex Spy, Recorder, and Studio.
zero
Posts: 22
Joined: Thu Jan 16, 2014 3:43 pm

How can I test with different versions of Internet Explorer?

Post by zero » Thu Feb 20, 2014 6:07 pm

I want to test my website with different versions of IE. How can I achieve that? Do I have to switch the IE browser mode in IE developers tool every time I launch the test?

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How can I test with different versions of Internet Explorer?

Post by krstcs » Thu Feb 20, 2014 6:45 pm

It is possible to switch the IE emulation mode, but that isn't a very reliable way to test the different versions because the IE10 emulation ("Compatibility") mode for IE8 (for example) may not behave exactly the way IE8 would.

In order to do it "correctly", you will need to set up separate Windows systems (I use virtual machines) that each have the version of IE you want to test. Then, you should turn off automatic updates for that system so it doesn't update to the next version without you telling it to.

I use IE 8/9/10/11 on Windows 7 and have 4 VMs (plus Win8 with IE10 and Win8.1 with IE11, but those aren't in testing yet), one for each version of IE.


This is the only way to truly make sure that the browser reacts the way you expect. If your company can't afford to test each version, you could get by with IE8 and IE10/11 on 2 VMs, since 9/10/11 use essentially the same engines (there are some very slight differences though, but nothing major, from my understanding).
Shortcuts usually aren't...

zero
Posts: 22
Joined: Thu Jan 16, 2014 3:43 pm

Re: How can I test with different versions of Internet Explorer?

Post by zero » Mon Feb 24, 2014 12:58 pm

Thanks for the detailed answer! So if I would set up the VMs according to your suggestion, how can I run the tests there? Do I have to install Ranorex on every single VM?

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

Re: How can I test with different versions of Internet Explorer?

Post by odklizec » Mon Feb 24, 2014 1:44 pm

You don't have to install entire RX Studio on the VMs, but then you need to manually copy some files from Studio to the Vms. See this post:
http://www.ranorex.com/forum/feature-re ... html#p7455

Additionally, you need to take care about available Ranorex licenses. For example, if you run the same exe on two VMs, each exe will require one Runtime license (either Floating or Node Locked). In case you have one Studio and one Runtime license, the exe can use Studio license, but only in case the Studio is not already running on another computer!

In case you don't have enough RX Runtime Licenses to run all exes on multiple VMs at the same time, it's good to implement WaitForValidLicense in Program.cs. See for example this post:
http://www.ranorex.com/forum/playback-a ... tml#p20824
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

zero
Posts: 22
Joined: Thu Jan 16, 2014 3:43 pm

Re: How can I test with different versions of Internet Explorer?

Post by zero » Mon Feb 24, 2014 2:42 pm

So if I don't run the tests at the same time, it should be sufficient to have one Runtime Floating License for e.g. 4 VMs implementing the waitForValidLicense pattern, right?

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

Re: How can I test with different versions of Internet Explorer?

Post by odklizec » Mon Feb 24, 2014 2:54 pm

If you don't run your tests at the same time, one runtime floating should be just enough. You can't go wrong by implementing WaitForValidLicense in your solution.

BTW, I would also recommend you to consider using a continuous integration solution (like Jenkins, Bamboo, etc.) to plan and run your tests on multiple VMs. I found it invaluable in our dev. workflow. Setup may take some time, but once done, it makes the automation testing much easier ;)
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

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How can I test with different versions of Internet Explorer?

Post by krstcs » Mon Feb 24, 2014 2:58 pm

That is correct. Ranorex will use the lowest license needed for whatever you are doing, so if you are just running the test, it will only lock the run-time license on the license server. If you are opening Studio and debugging/coding, it will use the higher license.

We use node-locked run-time licenses on our test execution VMs, and have several floating Premium licenses for the test developers to use. I actually link the VMs to both so I can debug on the VMs in Ranorex Studio if needed. VMs sometimes behave a little differently than hard-iron.


And, as odklizec mentioned, CI solutions like Jenkins (what we use) are invaluable.

Also, put your code in a code repository of some kind as well, if you haven't already.


Also, I would suggest that you go ahead and install the full Ranorex package on the VMs. Even though the post odklizec mentioned is accurate, it leaves room for mistakes in implementation if you aren't careful. The whole Ranorex package is small and will ensure everything is put where it needs to be. Only the parts that are needed/licensed will be actually executed at run-time. It's just easier to do it that way, unless you really need it to be "portable".
Shortcuts usually aren't...

zero
Posts: 22
Joined: Thu Jan 16, 2014 3:43 pm

Re: How can I test with different versions of Internet Explorer?

Post by zero » Mon Feb 24, 2014 2:59 pm

Thanks a lot! Yes, we are planning to use Jenkins, but for now my Ranorex Knowledge is still too limited. Do you have any hints on this topic for me maybe? (other threads, etc.)

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

Re: How can I test with different versions of Internet Explorer?

Post by odklizec » Mon Feb 24, 2014 3:20 pm

Agree with krstcs regarding installing full Ranorex package on the VMs. It not only installs Ranorex files but also all Ranorex pre-requisities. So it;s definitely better to go that way instead of manual copying necessary files.

As for the CI, we use Jenkins too. Ranorex integration with Jenkins is very well described here:
http://www.ranorex.com/blog/integrating ... on-process

As for Jenkins alone, look here:
https://wiki.jenkins-ci.org/display/JEN ... ws+service

I installed and configured Jenkins & Ranorex without previous knowledge of Jenkins and zero experience with CI, so it's definitely doable ;) Just follow the suggested steps and in case of problems use google. There are many topics regarding Jenkins setup and configuration around the Internet. Of course, don't hesitate to ask in case of doubts or problems. It takes some time to configure everything right, but it's definitely worth every hour/day spent with it.
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

zero
Posts: 22
Joined: Thu Jan 16, 2014 3:43 pm

Re: How can I test with different versions of Internet Explorer?

Post by zero » Mon Feb 24, 2014 4:39 pm

I need to bother you one more time: what do you mean with
odklizec wrote: installing full Ranorex package on the VMs
Do you mean, I need to install a Ranorex Premium Floating License instead of a Ranorex Runtime Floating License?

Thanks to both of you!
Last edited by zero on Mon Feb 24, 2014 5:27 pm, edited 2 times in total.

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

Re: How can I test with different versions of Internet Explorer?

Post by odklizec » Mon Feb 24, 2014 4:45 pm

I mean Ranorex Studio package, which contains all necessary dlls to run the Ranorex tests on that VM. 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

zero
Posts: 22
Joined: Thu Jan 16, 2014 3:43 pm

Re: How can I test with different versions of Internet Explorer?

Post by zero » Mon Feb 24, 2014 5:29 pm

Is the Ranorex Studio package part of the runtime license?

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

Re: How can I test with different versions of Internet Explorer?

Post by odklizec » Mon Feb 24, 2014 5:41 pm

I'm not sure I got your question? You will, of course, not be able to run the Studio with runtime license. But Studio setup package (use Download Free Trial link on the main Ranorex page) will install everything required to run your tests on the VM. Once you install the Studio on VM, you need to set the license, using the Ranorex Licensing tool and your runtime floating license. After that, you should be able to run your tests on VM.
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

zero
Posts: 22
Joined: Thu Jan 16, 2014 3:43 pm

Re: How can I test with different versions of Internet Explorer?

Post by zero » Mon Feb 24, 2014 5:57 pm

Thanks, that did answer my question! :D

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

Re: How can I test with different versions of Internet Explorer?

Post by odklizec » Mon Feb 24, 2014 6:02 pm

You are welcome! ;)
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