-
Notifications
You must be signed in to change notification settings - Fork 158
Sequential Attribute
jnm2 edited this page Jun 14, 2017
·
7 revisions
The SequentialAttribute is used on a test to specify that NUnit should generate test cases by selecting individual data items provided for the parameters of the test, without generating additional combinations.
Note: If parameter data is provided by multiple attributes, the order in which NUnit uses the data items is not guaranteed. However, it can be expected to remain constant for a given runtime and operating system. For best results with SequentialAttribute use only one data attribute on each parameter.
The following test will be executed three times.
[Test, Sequential]
public void MyTest(
[Values(1,2,3)] int x,
[Values("A","B")] string s)
{
...
}
MyTest is called three times, as follows:
MyTest(1, "A")
MyTest(2, "B")
MyTest(3, null)
Copyright (c) 2018 The NUnit Project - Licensed under CC BY-NC-SA 4.0
-
NUnit
-
Release Notes
-
License
- Getting Started
- Writing Tests
- Running Tests
- Extending NUnit
- Technical Notes
-
Release Notes
- NUnit Xamarin Runners
- VS Test Adapter
- VS Test Generator
- NUnit Analyzers