Skip to content

TestCase with DataRow attribute with null parameter ignored #1028

@daangruijters

Description

@daangruijters

Description

When using MSTest.TestAdapter version 2.2.4 or higher, DataRow testcases with a null parameter are not discovered or executed. When using 2.2.3, all 3 testcases are discovered.

[TestMethod]
[DataRow(null)]
[DataRow("")]
[DataRow(" ")]
public void TestMethod(string parameter)
{

}

image

Steps to reproduce

Create a test project targetting .NET5 or .NET6, and make sure the version of the package MSTest.TestAdapter is 2.2.4 or higher. Add test method as seen above

Expected behavior

3 testcases should have been executed, but only the last two are executed

Actual behavior

Only the testcases with "" and " " as paramter are executed

Environment

MSTest.TestAdapter 2.2.4 or higher

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions