Issues in Visual Studio Coded ui Automation Testing

I received a mail from one of my colleagues in the automation testing arena who is using Coded Ui test project of the Visual Studio to automate some features. Below is the mail I recieved, and I shall be replying to the issues specified here itslef, so that the more audience can acquaint themselves with this issues in Coded Ui automation.


Mail :
Hi Viplav,
I am using VSTS2010 for automating a search functionality in my application. I recorded three coded UI test for-

a) Login- CodedUItest
b) Policy Search using some search criteria & then editing a policy selecting from search results- CodedUItest
c) Logout- CodedUItest


Thereafter I called login & logout functions from Search codedUITest.cs

I also have parameterized search criteria values (PolicyNumber, Policystatus etc) from  excel sheet (Used AppConfig for excel data connection).
I have 4 data rows in my input data sheet (to parameterize search criteria at the rum time).
Issue 1- Now what is Currently happening is- That my coded UITest runs , it does login, perform policy search and edit policy & then gets logout for each and every interation i.e for each data row, causing Opening of multiple browser instances.

My expectation :
            What I want to implement is just one login & one logout. So that- 
            a)users logins
            b)Perform search for all iterations, edit policy
            c)Go back to main page, Repeat steps a-c for all iterations
            d) then log out

Comments : A very geniuinely valid point raised by you Mahesh. Would definitely provide resolution to the same.


Issue2-  The second issue happening with all the iterations is that even after my script has executed for all data rows,It keeps on running and opening browser instances taking parametrized values as blank.
My expectation :
            Ideally it should stops once test is executed for all data rows, When it found no search criteria that is empty cells it should stop running.
            Here i need help, If we can implement some End of Row (EOR) in scripts, As soon as scripts finds EOR it should stop execution.
Comments : Would definitely provide its resolution.

Issue 3-
This issue is related to issue 3, as multiple browser instances are opening. I need some way to close them as soon as test completes for all iterations, better if they get closed after every iteration. I know we can use KILL IE function but I have to give control back to the interface where from I have invoked the scripts that is opened in IE browser. If I apply Kill IE function after all iterations are done, Interface brwoser gets closed as well.

Need you support in all this issues. Please guide.
I really appreciate any help in this regard.

Regards,
Mahendra.

Hi Mahendra,

I would be giving resolution to these three issues in the below comment chain one at a time. Do stay posted.

- Viplav Anand

The better approach is available here to address the business scenario handling :http://www.articlesontesting.com/2011/07/multiple-iteration-data-driven-code-ui.html

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.