I have approximately 5-6 reports, they are structured the same, using Watin, I'm testing each one of these reports.
I have a shared test, I call "ReportBaseTests"..
public class ReportBaseTests
{
public string MenuName { get; set; }
public ReportBaseTests(string name)
{ this.MenuName = name; }
[TestMethod]
public void Perform_Invalid_Date_Range()
{
}
}
but in each of my tests, I have...
[TestClass]
public class Report1Tests : ReportBaseTests
{
public Report1Tests()
: base("Report 1")
{ }
}
This works... each report will have a seperate Perform_Invalid_date_range, and it'll goto a different page... I was hoping someone had a better way to do this, as it also produces a seperate "non-runnable" test for the shared test since I didn't include the [TestClass]
Now, I know I could use NUnit and pass in arguments, however, I'm sticking with MSTest for the time being