UI Automation using API or Recorder

Class library usage, coding and language questions.
vnet
Posts: 29
Joined: Tue Jul 24, 2012 8:13 pm

UI Automation using API or Recorder

Post by vnet » Thu Aug 30, 2012 8:16 am

Hi,

I wil be soon automating my .NET based standalone app. I have tried both recorder and AutomationAPIs (though most of recorder). Personally Recorder was easy to use but since most of the code generated by Ranorex n in case of any change (let's say code fix in my tool) I had to rerecord the recording (don't know if there is any other way).

so question is what is a general approach for UI automation here? Also I am getting the feeling that since I am not using recorder(which is very well written) why am I paying for Ranorex tool (since there is free UI automation from Microsoft available and free spy tool too).

In case of Automation API, how do you guys maintain the tests (what would be the structure, is it all the tests related to a feature in one class?) and how is the validation done (Is it using nUnit or something similar)?

In case of using recorder do I have to record each and every action for certain values to be existing?

Not sure if I am missing something here. Appreciate the help in advance...

-A newbee in UI Automation

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: UI Automation using API or Recorder

Post by Ciege » Thu Aug 30, 2012 5:40 pm

Let me give it a shot to answer some of your questions......
Personally Recorder was easy to use but since most of the code generated by Ranorex n in case of any change (let's say code fix in my tool) I had to rerecord the recording (don't know if there is any other way).
Welcome to one of the inherent issues with record & playback... Anyone who has been in test automation for some amount of time has learned this hard fact as well... Record and playback is OK for what it is... You need to begin to write your own code and/or use to learn the variables etc... in the built in test suite.
so question is what is a general approach for UI automation here?
Personally, I rarely even think about the record tool. I think I've opened it a handful of times since I started using Ranorex. That is not to say anything bad about, as it serves it's purpose, but the real power of test automation is being able to code, organize, parameterize, etc... you own tests so that they are perfectly tailored to your AUT.
Also I am getting the feeling that since I am not using recorder(which is very well written) why am I paying for Ranorex tool (since there is free UI automation from Microsoft available and free spy tool too).
Have you tried Microsoft's CodedUI automation? Yes, it's available... And free if you are an MSDN subscriber... But easy? No. Powerful? Sort of. Able to interact with all the different controls that Ranorex can interact with? Absolutely not!
Also, that personal support that the Ranorex team gives it's users is light years beyond what Microsoft does or is even able to hope to do. Ranorex provides constant updates, fixes, new features, you name it...
In case of Automation API, how do you guys maintain the tests (what would be the structure, is it all the tests related to a feature in one class?) and how is the validation done (Is it using nUnit or something similar)?
I do all of my automation code in Visual Studio... It's just another C# project for me. So however your company handles code design, validation, check-ins, etc... would be handled the same way.
A newbee in UI Automation
Good luck! It takes time and experience to make automation fruitful and able to fit your expected ROI. I suggest reading as much as you can about the topic and, if at all possible, bring in an experienced person to help with your training and design of the project. Test automation IS development and should be treated as such.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

vnet
Posts: 29
Joined: Tue Jul 24, 2012 8:13 pm

Re: UI Automation using API or Recorder

Post by vnet » Thu Aug 30, 2012 11:50 pm

Thanks a lot Ciege for the prompt reply. It was very helpful. 8)

vnet
Posts: 29
Joined: Tue Jul 24, 2012 8:13 pm

Re: UI Automation using API or Recorder

Post by vnet » Fri Sep 07, 2012 10:03 pm

Hi Ciege,

Have a question on this. Do you use some kind of tool for the test validation (like xunit, nUnit) or validate the results using some C# function like File.Exists etc.

Thanks,
vnet

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: UI Automation using API or Recorder

Post by Ciege » Fri Sep 07, 2012 10:47 pm

Do you mean the results of each complete test?
If so, I use a homebuilt dashboard utility that displays all of my results with a red/yellow/green light method...
http://www.ranorex.com/forum/anyone-wan ... t1453.html
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

vnet
Posts: 29
Joined: Tue Jul 24, 2012 8:13 pm

Re: UI Automation using API or Recorder

Post by vnet » Fri Sep 14, 2012 10:22 pm

This is great(though not what I was looking for), I may use it for my project. Thanks Ciege.