mardi 18 octobre 2016

Is it possible to execute a test that takes its data from TFS without any table parameters?

I am using Visual Studio 2015 update 3 and TFS 2015 update 3. Below is an example of a test case (psuedocode).

[TestMethod]
[DataSource(PROJECTNAME, TFSURL, TESTCASENUMBER, DataAccessMethod.Sequential)]
public void Test()
{
   OpenUrl("someurl");
   Assert.IsTrue(Url is displayed);
}

The TESTCASENUMBER is linked to a test case on TFS and does not contain any parameters, so the table is empty. Since the table is empty the test will skip with the message 'Table TESTCASENUMBER is empty'.

Currently the workaround I have been using is to add a dummy parameter to the test case so the test will run. Is there a better workaround than this?

Aucun commentaire:

Enregistrer un commentaire