coded-ui-tests

Can't determine if a certain UITestControl exists in my web app

拟墨画扇 提交于 2019-12-18 04:46:09
问题 I'm currently trying to help automate some coded UI tests using C# for a web application. A frequent problem I'm encountering is that it can be extremely difficult to determine if a UITestControl object exists on the page or not. Unfortunately, Microsoft's documentation on their MSDN website for anything regarding coded UI tests is practically non-existant (see here their page for UITestControl). Basically what I'm asking is: What is the best way to determine if a UITestControl exists on the

How to run a test many times with data read from .csv file (data driving)

给你一囗甜甜゛ 提交于 2019-12-17 02:32:15
问题 I am trying to automate some testing for one of our web applications and I need to know how I can make my Coded UI project read data from a CSV file. Lets say I want to test a log in screen. My CSV file will contain a few user names and passwords. I want my Coded UI test to read these log in details and loop through them to run the test on each set of data. 回答1: The web has many tutorials on data driving Coded UI tests. The basic steps for data driving with a CSV file are as follows. Create

CodedUI Test- Mouse.Click() on control dose not give expected outcome

喜你入骨 提交于 2019-12-14 03:14:00
问题 I am using Visual studio 2010 to create CodedUI Scripts.The application under Test is a web based Loan origination application . I am automating a part where user enter's zip code and clicks on search. when I enter zip code manually and click on search the response is received instantly. But when the same is done with code,Zip code is successfully sent and search button is clicked but application dose not respond. Mouse.Click(ContactInformation.ContactInformationForm.PropertyAddress

What is the difference between using System.Windows.Automation and Microsoft.VisualStudio.TestTools.UITesting for WPF UI Test automation?

Deadly 提交于 2019-12-14 00:18:56
问题 What is the difference between using System.Windows.Automation (commonly known as UIA) API and Microsoft.VisualStudio.TestTools.UITesting (one that is used in Coded UI Test behind the scene) for implementing UI Test automation of a WPF application programatically? Is there any specific scenarios, restrictions or advantages/disadvantages? 回答1: In fact, the answer is in your question. UIA is used for automation, while UITesting is used for... testing. An excerpt from MSDN: UI Automation

Unit tests with view models or coded ui test

☆樱花仙子☆ 提交于 2019-12-13 22:29:35
问题 Currently i want to improve out test cases. Since we had switched to WPF with MVVM i'm thinking about writing unit tests to work with view models (test view models) or better use coded ui tests. What is the choice to take, or is testing both things the way to go? Currently i could not find any practical answer, maybe some one has a straight forward answer. Thank you! 回答1: Unit tests and UI/system tests are very different things with very different purposes. Unit tests should test the proper

How can I run the same Coded UI test with multiple input files

删除回忆录丶 提交于 2019-12-13 21:33:55
问题 I am looking for a way to be able to run the same coded ui test class with different input files, e.g. I have a test with end to end flow in the app, I want to be able to run this test with two different users doing different workflows once inside the app. I do not want to run both the tests each time (This is possible with having two rows in the data input csv). I wasn't able to find a way of doing this so far. Any help/guidance is appreciated. 回答1: I can think of three possibilities. 1. You

Is it possible to create a CodedUI test project if you don't have Visual Studio Enterprise?

自闭症网瘾萝莉.ら 提交于 2019-12-13 18:52:46
问题 I would like to automate my winforms testing using CodedUI but it seems that it is only available on Visual Studio Enterprise. Is it possible to create a CodedUI test project if you don't have Visual Studio Enterprise? If not, what are the alternatives to CodedUI? 回答1: The answer as far I know is no. You need Enterprise license to use that feature. This post seems to have some more information enter link description here 回答2: The answer is yes if you are on VS 2012-2013. There you need just

How to handle testing an HTML control that lacks sufficiently unique attributes?

a 夏天 提交于 2019-12-13 18:09:41
问题 I'm using Coded UI Test to test a web application. I have a class Locator that I use to stash the specifics needed for CUIT to find a control. To operate on a control, a page object specifies the locator, not the control, and lower-level functions find the control and perform the operation. Right now, my class has: Locator name. One or more attrName/attrValue pairs that can locate the HTML element for the control. An operator (Contains or EqualTo) that specifies the matching needed. The

Publishing test assemblies with artifacts in order to use them during functional tests on VSTS

笑着哭i 提交于 2019-12-13 16:13:42
问题 I am having a really hard time trying to figure out how to properly configure functional tests on my realease pipeline. I have a solution that contains some web projects being built using the default build configuration in VSTS. The artifact is ok and I can publish them using a release pipeline. So far so good, now I want to implement functional tests using CodedUI and have them integrated on my releases. We have a development server with a vsagent that was installed when I configured the

AccessibleObject implementation for custom controls

本小妞迷上赌 提交于 2019-12-13 12:05:36
问题 I have a very simple controls library for Windows Forms and I am getting problems to implement accessibility. I have a very simple Form with a member that contains a list of controls of my library, and I have overriden the CreateAccessibilityInstance: public partial class Form1 : Form { protected override AccessibleObject CreateAccessibilityInstance() { return new AccessibleForm(this); } public MyContainer MyContainer; public Form1() { InitializeComponent(); MyContainer = new MyContainer();