Click here to Skip to main content
15,889,909 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have an application wherein, while doing the Coded UI Automation testing, I want to run it on multiple instances of IE 11 browser with 2 different users logged in to 2 instances of the browser. Additionally, there are different user roles in my application which do different operations. (i.e. User in Role 1 does Operation 1, User in Role 2 does Operation 2 on the same contract etc. ) How can I handle this scenario using Coded UI with Visual Studio ? (Browser- IE 11) Is there any method available which switches between the browser instances?

Thanks in advance.
Posted

1 solution

I believe you are over complicating this. Remember that a good test case is isolated and does not depend on another test case. Your test plan should reflect the execution order of your test cases so that data and events are processed in the desired sequence.

In the case of your Coded UI test, I would suggest not over complicating it by needing to run two tabs. Instead, write the Coded UI so that User in Role 1 does Operation 1, then logs out. User in Role 2 logs in, does Operation 2, then logs out. This will allow your Coded UI to run on several browsers with very little to no changes needed. In addition, if Microsoft ever changes the way their tabs work, your Coded UI test would not require any changes as well.

One last final thought, don't try to solve all of your testing needs with Coded UI test. Test automation is great and allows us to capture errors due to changes we as developers make to the system, but it should not be a replacement to manual and exploratory testing.

Hope this helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900