From 420a5df0e79eadd2be5c7808704dae9da2e75c2f Mon Sep 17 00:00:00 2001 From: "J.D. Cain" Date: Tue, 31 Jul 2018 14:44:39 -0400 Subject: [PATCH] Create 009-break-data-driven-test-into-multiple-tests-objects.md --- ...driven-test-into-multiple-tests-objects.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 RFCs/009-break-data-driven-test-into-multiple-tests-objects.md diff --git a/RFCs/009-break-data-driven-test-into-multiple-tests-objects.md b/RFCs/009-break-data-driven-test-into-multiple-tests-objects.md new file mode 100644 index 0000000..fceab16 --- /dev/null +++ b/RFCs/009-break-data-driven-test-into-multiple-tests-objects.md @@ -0,0 +1,25 @@ +#Break data driven test into multiple test objects + +##Summary +Allow data-driven tests to start and stop recording between each execution. + +##Motivation +When recording videos of tests using Microsoft.VisualStudio.TestTools.DataCollection.VideoRecorder data-driven tests are treated as a single block causing every execution of the test to be within the same video. See Issue [450](https://github.com/Microsoft/testfx/issues/450). + +##Detailed Design + +### Requirements +1. DataTestMethod Attribute should allow the option to treat it's tests as separate test objects. +2. Should not alter current behavior for existing users. + +### Proposed solution +Allow a switch when using DynamicDataAttribute to allow for the optional breaking up of test videos + +```csharp +[DynamicData(nameof(Data), DynamicDataSourceType.Property, separate: true )] +... +public DynamicDataAttribute(string dynamicDataSourceName, DynamicDataSourceType dynamicDataSourceType = DynamicDataSourceType.Property, bool separate = false ) +{ +... +} +```