unit-testing - 如何使用 MSTest 进行 RowTest?

标签 unit-testing mstest data-driven-tests rowtest

我知道 MSTest 不支持 RowTest和类似的测试。

做什么MSTests用户做什么?没有RowTest怎么活?支持?

我见过DataDriven测试功能,但听起来开销太大,是否有任何第 3 方补丁或工具可以让我这样做 RowTest MSTest中的类似测试?

最佳答案

[TestMethod]
Test1Row1
{
    Test1(1,4,5);
}

[TestMethod]
Test1Row2
{
    Test1(1,7,8);
}

private Test1(int i, int j, int k)
{
   //all code and assertions in here
}

关于unit-testing - 如何使用 MSTest 进行 RowTest?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/347535/

相关文章:

java - TestNg 数据绑定(bind) : setting the location of properties on test start up

robotframework - 机器人框架如何在数据驱动测试中为报告输出的每个测试用例设置自己的名称

python - 有人有使用 Python Zeep 和 Mock 对 SOAP API 进行单元测试的示例吗?

node.js - Jest 模拟和测试 require.resolve 调用

c# - 无法从 C++ 包装器在 MS 测试中加载文件或程序集 'log4net'

c# - 在 C# 中使用 Moq 引发复杂事件

mstest - 在数据驱动的测试中,如何从 TestContext 获取迭代/行号?

c# - C#中单元测试的生命周期是什么

c# - 最小起订量测试方法 1 是否在同一类中调用第二个方法 2

teamcity - 如何使用 dotCover 从 TeamCity 覆盖范围中通过掩码 *.Tests.dll 排除程序集?