I've been building a large regression test using White and NUnit over the past several months, but would like to migrate to MS Test to take advantage of the new features in VS 2010 and avoid needing to open NUnit while building on an external server.
Has anyone attempted this? I would love for my "using WhiteCore = Core" to just work with the change, but like everything in life, it's not that simple.
Any suggestions are appreciated.
I've been using white with MSTest for acceptance testing on rather large modular WPF application. Can you give me some more details about the problems you've encountered?
Thanks for the reply. I'm mostly just unsure as to which using directives I'm missing to make the change. Right now they look like this:
using WhiteCore = Core;
The problem is at that 2nd to last line.
An example of a TestMethod I have is:
public void NewProjectWithOk()
if (Directory.Exists(ExePath + "\\" + ProjectLocation + "\\NewProject"))
Directory.Delete(ExePath + "\\" + ProjectLocation + "\\NewProject", true);
//Open New Project Button
Button btn = _window.Get<Button>(NewProjectButton);
Window childWindow = _window.ModalWindow("New Project");
//Choose "Create New Data" and enter file path and name
SearchCriteria searchCriteria = SearchCriteria.ByAutomationId("createNewData");
RadioButton newDataButton = childWindow.Get<RadioButton>(searchCriteria);
searchCriteria = SearchCriteria.ByAutomationId("tbProjectName");
TextBox projectNameBox = childWindow.Get<TextBox>(searchCriteria);
projectNameBox.Text = "NewProject.yetiproj";
searchCriteria = SearchCriteria.ByAutomationId("_PathTextBox");
TextBox projectLocationBox = childWindow.Get<TextBox>(searchCriteria);
string projectLocation = Path.Combine(ExePath, ProjectLocation);
projectLocationBox.Text = projectLocation;
Button okButton = childWindow.Get<Button>("btnOk");
with errors at declarations at "Button", "Window", "SearchCriteria", "RadioButton", etc.
I guess you’ve added reference to white.dll from your test project. In that case make sure you have
using White.Core.UIItems in file header
Ivan Pavlović |
email@example.com | Hive Studios d.o.o. |
Software Craftsman | MVP For C# MCAD MCSD MCDBA MCT Certified Scrum Master
Mike Alasa 54, 11000 Belgrade, Serbia | tel: +381 11 2928 716 | fax: + 381 11 2928 716
MSN ID: firstname.lastname@example.org
Excellent! Everything is working smoothly. Thanks for the help. I'm not sure where my head has been this morning.