Data-driven testing in NUnit?

前端 未结 5 1759
情歌与酒
情歌与酒 2020-12-14 03:40

In MSTest you can do something like:

[TestMethod]
[DataSource(\"Microsoft.VisualStudio.TestTools.DataSource.CSV\", 
            \"testdata.csv\", \"testdata#         


        
5条回答
  •  暖寄归人
    2020-12-14 03:58

    I think the Nunit equivilent is to mark a method as a setup method and then load the data into a field to be used in subsequent tests.

    You have to code it yourself, more or less.

提交回复
热议问题