Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ title: Data-driven testing in MSTest
description: Learn how to use data-driven testing in MSTest with DataRow, DynamicData, and TestDataRow to run the same test with multiple inputs.
author: Evangelink
ms.author: amauryleve
ms.date: 02/05/2026
ai-usage: ai-assisted
ms.date: 03/09/2026
---

# Data-driven testing in MSTest
Expand Down Expand Up @@ -323,12 +324,12 @@ public class IgnoreDynamicDataExample

## TestDataRow

The `TestDataRow<T>` class provides enhanced control over test data in data-driven tests. Use `IEnumerable<TestDataRow<T>>` as your data source return type to specify:
The <xref:Microsoft.VisualStudio.TestTools.UnitTesting.TestDataRow%601> class provides enhanced control over test data in data-driven tests. Use <xref:System.Collections.Generic.IEnumerable%601> of <xref:Microsoft.VisualStudio.TestTools.UnitTesting.TestDataRow%601> as your data source return type to specify:

- **Custom display names**: Set a unique display name per test case
- **Test categories**: Attach metadata to individual test cases
- **Ignore messages**: Skip specific test cases with reasons
- **Type-safe data**: Use generics for strongly-typed test data
- **Custom display names**: Set a unique display name per test case using the <xref:Microsoft.VisualStudio.TestTools.UnitTesting.TestDataRow%601.DisplayName> property.
- **Test categories**: Attach metadata to individual test cases using the <xref:Microsoft.VisualStudio.TestTools.UnitTesting.TestDataRow%601.TestCategories> property.
- **Ignore messages**: Skip specific test cases with reasons using the <xref:Microsoft.VisualStudio.TestTools.UnitTesting.TestDataRow%601.IgnoreMessage> property.
- **Type-safe data**: Use generics for strongly-typed test data.

### Basic usage

Expand Down