Page 1 of 1

With CodedUI in VS2010 where is Ranorex heading?

Posted: Wed Oct 26, 2011 12:33 am
by jtruppia
Now that MSFT is including tools for doing automated UI testing in VS (currently only in VS2010 Premium and Ultimate) is Ranorex considering leaving Ranorex Studio behind and integrating Spy and Recorder into VS as plugins?
Cause of the many available plugins for VS and the huge array of functionality VS provides, going back to using Ranorex studio is sometimes ackward.
I know that Ranorex is used for a lot more than just .Net apps testing, and that many people that have Ranorex licenses might not have VS licenses. But it would be really good if Spy and Recorder could work as plugins in VS just as they do in Ranorex Studio, and even more, if the new codedUI testing technology could be leveraged with Ranorex

any thoughts?

Re: With CodedUI in VS2010 where is Ranorex heading?

Posted: Wed Oct 26, 2011 2:58 pm
by Aracknid
When I was looking for a new replacement automation tool, I evaluated VS 2010 CodedUI, as well as Ranorex, and some others tools. I don't use the "record" method of automation, I go for straight hand coding. In this regard, Ranorex already has an API that can be used with coding in C# or VB.NET within VS2010, and Spy is a tool that runs on its own, so there is no issue with that. I only bought developer licenses from Ranorex, so I don't even use their Studio.

The reason I went with Ranorex was because their automation language was very close to what I was already used to, but the xpath method was much better at finding objects. They supported much more newer technology, specifically Silverlight for me (at the time even Microsoft CodeUI didn't, but that has since changed). Also, to be honest, Microsoft CodeUI way was just plain awful and confusing, and forced you to work in their way of testing. For me, Ranorex was way better. I'm only testing web based client-server apps, but the client side has Silverlight objects in it. I also need to have support for other browsers (specifically IE, FF, and Chrome which is coming...).

That's my 2 cents.

Aracknid.

Re: With CodedUI in VS2010 where is Ranorex heading?

Posted: Tue Jan 31, 2012 8:06 am
by Stian
Hiya Aracknid!

Throwing in two questions for you if you don't mind :)

1) When developing CodedUI just using the Ranorex API through VS, how do you identify and validate elements inside, for example, a Silverlight part of the web page? At the moment I am using the Ranorex recorder and Studio to do that, but I would prefer working only through VS.

2) How do you get your tests running on all the different browsers? Do you create the test for one browser and then somehow specify for it to run on other browsers? I am trying to achieve that.

Thanks :)

Re: With CodedUI in VS2010 where is Ranorex heading?

Posted: Tue Jan 31, 2012 2:42 pm
by sdaly
The way we achieve this is by having a settings file on a shared drive, this contains the test server url to use, the browser exe name to use and some other settings applicable. We then have a static class called TestRun which is populated from the settings file in our global test setup. Then as an example, our StartDashBoard() method which is called in our test setups just opens the browser with the selected settings.... it works well for us :D

Code: Select all

	public static void StartDashBoard()
		{
			LoggerGFI.LogInfo("Starting browser " + TestRun.browserExe + " with url " + TestRun.selectedURL);
			Host.Local.RunApplication(TestRun.browserExe, TestRun.selectedURL + "/dashboard");
		}

Re: With CodedUI in VS2010 where is Ranorex heading?

Posted: Tue Jan 31, 2012 3:15 pm
by Stian
Thanks sdaly, we might do something similar!

May I ask...do you use Microsoft Test Manager at all for these tests?
I was considering tying these automated tests to test cases in MTM, but that is starting to look unnecessary.

Is it even necessary to create these tests as CodedUI tests? Seems they can be handled much the same as regular Unit Tests...

Stian

Re: With CodedUI in VS2010 where is Ranorex heading?

Posted: Tue Jan 31, 2012 3:39 pm
by Aracknid
Stian wrote:1) When developing CodedUI just using the Ranorex API through VS, how do you identify and validate elements inside, for example, a Silverlight part of the web page? At the moment I am using the Ranorex recorder and Studio to do that, but I would prefer working only through VS.
You still must use the Ranorex Spy tool to identify the items you want to interact with, including Silverlight objects.
Stian wrote:2) How do you get your tests running on all the different browsers? Do you create the test for one browser and then somehow specify for it to run on other browsers? I am trying to achieve that.
How I get them running with different browser... There are different ways to do this, I'm sure. What I have done is pass the browser type through from the command line as an argument when I run the script. A script is a compiled EXE by the way. Similiar to sdaly, I have a ScriptInfo class where I define all the parameters of my script that I can control, either by giving default values (common to all sctips), specific script values that override default values, and then also pass in args from the command line to overried those as well. I have a whole framework for handling all this stuff. It has evolved over many years (originally from another tool which I have migrated over to VS2010 and Ranorex). By default I run on IE, but I can specify the other supported browsers. In my framework, most of the code is not browser specific, so there are no issues when running on other browsers. It just works, because that is how they made Ranorex. But for some code that must do slightly different things, I have select statements on the browser type.

As an aside, the term CodedUI is a Microsoft scripting term for their way of doing things. When working with Ranorex, you simply create a "Console Application" from the New Project dialog in VS2010, and compile it into a EXE. There's info on how to do that in this forum or in support. Sorry, no time to find it for you.

Aracknid

Re: With CodedUI in VS2010 where is Ranorex heading?

Posted: Tue Jan 31, 2012 3:41 pm
by sdaly
Stian

We don't use MS Test Manager at all...just SharpDevelop and NUnit :)...along with our own shared library and a few helper classes for dealing with test data and rxpaths.

Re: With CodedUI in VS2010 where is Ranorex heading?

Posted: Tue Jan 31, 2012 8:57 pm
by Stian
Thanks guys! Some very interesting input there.

Seems I need to consider carefully whether or not to tie everything up with TFS and/or Microsoft Test manager.
I am still quite new to automation so I am concerned about losing any benefits with regards to coverage of requirements, tying tests to bugs, tasks and requirement Work Items in TFS - and getting test reports into TFS.

Ranorex provides some really nice flexibility, though. I am really liking it so far.

The big advantage for us is the browser- and Flex support that Ranorex gives.

Some would like us to go the Selenium way, but I think Ranorex fits our requirements perfectly.