diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/dotnetcli.host.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/dotnetcli.host.json index 22ed44fb96c4..dd7d1528bb3b 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/dotnetcli.host.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/dotnetcli.host.json @@ -9,6 +9,10 @@ "longName": "roll-forward", "shortName": "" }, + "TestRunner": { + "longName": "test-runner", + "shortName": "" + }, "dotnet-cli-version": { "isHidden": "true" } diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.cs.json index c17e2a59dcf8..78c8287035f0 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.cs.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.cs.json @@ -25,5 +25,11 @@ "symbols/RollForward/choices/latestMajor/displayName": "Nejnovější hlavní verze", "symbols/RollForward/choices/disable/description": "Nedá se posunout vpřed. Vyžaduje se přesná shoda.", "symbols/RollForward/choices/disable/displayName": "Zakázat posunutí vpřed", + "symbols/TestRunner/description": "The test runner to use.", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner", + "symbols/TestRunner/choices/VSTest/displayName": "VSTest", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform", "postActions/open-file/description": "Otevře global.json v editoru." } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.de.json index 8523d66e558e..3b9e4c415693 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.de.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.de.json @@ -25,5 +25,11 @@ "symbols/RollForward/choices/latestMajor/displayName": "Neueste Haupt-", "symbols/RollForward/choices/disable/description": "Kein Rollforward. Exakte Übereinstimmung erforderlich.", "symbols/RollForward/choices/disable/displayName": "Rollforward deaktivieren", + "symbols/TestRunner/description": "The test runner to use.", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner", + "symbols/TestRunner/choices/VSTest/displayName": "VSTest", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform", "postActions/open-file/description": "Öffnet „global.json“ im Editor." } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.en.json index eda42be5c35d..3049eb02e445 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.en.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.en.json @@ -25,5 +25,11 @@ "symbols/RollForward/choices/latestMajor/displayName": "Latest major", "symbols/RollForward/choices/disable/description": "Doesn't roll forward. Exact match required.", "symbols/RollForward/choices/disable/displayName": "Disable roll-forward", + "symbols/TestRunner/description": "The test runner to use.", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner", + "symbols/TestRunner/choices/VSTest/displayName": "VSTest", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform", "postActions/open-file/description": "Opens global.json in the editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.es.json index 3695d9387faf..91b84990cc56 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.es.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.es.json @@ -25,5 +25,11 @@ "symbols/RollForward/choices/latestMajor/displayName": "Última versión principal", "symbols/RollForward/choices/disable/description": "No se hace un reenvío. Se requiere una coincidencia exacta.", "symbols/RollForward/choices/disable/displayName": "Deshabilitar el reenvío", + "symbols/TestRunner/description": "The test runner to use.", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner", + "symbols/TestRunner/choices/VSTest/displayName": "VSTest", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform", "postActions/open-file/description": "Abre global.json el editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.fr.json index 44eb3008d8d3..6a0d8074ddec 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.fr.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.fr.json @@ -25,5 +25,11 @@ "symbols/RollForward/choices/latestMajor/displayName": "Dernière version majeure", "symbols/RollForward/choices/disable/description": "Ne pas restaurer par progression vers l’avant. Correspondance exacte requise.", "symbols/RollForward/choices/disable/displayName": "Désactiver la restauration par progression", + "symbols/TestRunner/description": "The test runner to use.", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner", + "symbols/TestRunner/choices/VSTest/displayName": "VSTest", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform", "postActions/open-file/description": "Ouvre global.json dans l’éditeur" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.it.json index 7d3a22b78e38..1955f5986f6b 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.it.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.it.json @@ -25,5 +25,11 @@ "symbols/RollForward/choices/latestMajor/displayName": "Valore principale più recente", "symbols/RollForward/choices/disable/description": "Non esegue il roll-forward. Corrispondenza esatta richiesta.", "symbols/RollForward/choices/disable/displayName": "Disabilita roll-forward", + "symbols/TestRunner/description": "The test runner to use.", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner", + "symbols/TestRunner/choices/VSTest/displayName": "VSTest", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform", "postActions/open-file/description": "Apre global.json nell'editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ja.json index 0d6cc3e58513..dd3c5bfae900 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ja.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ja.json @@ -25,5 +25,11 @@ "symbols/RollForward/choices/latestMajor/displayName": "最新のメジャー", "symbols/RollForward/choices/disable/description": "ロールフォワードしません。完全に一致する必要があります。", "symbols/RollForward/choices/disable/displayName": "ロールフォワードの無効化", + "symbols/TestRunner/description": "The test runner to use.", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner", + "symbols/TestRunner/choices/VSTest/displayName": "VSTest", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform", "postActions/open-file/description": "エディターで global.json を開く" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ko.json index 253e652b9754..63603d9e76c0 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ko.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ko.json @@ -25,5 +25,11 @@ "symbols/RollForward/choices/latestMajor/displayName": "최신 주", "symbols/RollForward/choices/disable/description": "롤포워드하지 않습니다. 정확히 일치해야 합니다.", "symbols/RollForward/choices/disable/displayName": "롤포워드 비활성화", + "symbols/TestRunner/description": "The test runner to use.", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner", + "symbols/TestRunner/choices/VSTest/displayName": "VSTest", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform", "postActions/open-file/description": "편집기에서 global.json을 엽니다" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.pl.json index 5c4cf77e8c11..52731300fa71 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.pl.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.pl.json @@ -25,5 +25,11 @@ "symbols/RollForward/choices/latestMajor/displayName": "Najnowszy przedział główny", "symbols/RollForward/choices/disable/description": "Nie przechodzi. Wymagane jest dokładne dopasowanie.", "symbols/RollForward/choices/disable/displayName": "Wyłącz przechodzenie", + "symbols/TestRunner/description": "The test runner to use.", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner", + "symbols/TestRunner/choices/VSTest/displayName": "VSTest", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform", "postActions/open-file/description": "Otwiera plik global.json w edytorze" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.pt-BR.json index 3ede77decdb7..5ac94d837da2 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.pt-BR.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.pt-BR.json @@ -25,5 +25,11 @@ "symbols/RollForward/choices/latestMajor/displayName": "Principal mais recente", "symbols/RollForward/choices/disable/description": "Não rola para frente. Correspondência exata necessária.", "symbols/RollForward/choices/disable/displayName": "Desabilitar rolar para frente", + "symbols/TestRunner/description": "The test runner to use.", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner", + "symbols/TestRunner/choices/VSTest/displayName": "VSTest", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform", "postActions/open-file/description": "Abrir global.json no editor" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ru.json index 438e9d733b29..fea09bc51165 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ru.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.ru.json @@ -25,5 +25,11 @@ "symbols/RollForward/choices/latestMajor/displayName": "Последняя основная версия", "symbols/RollForward/choices/disable/description": "Накат не выполняется. Требуется точное совпадение.", "symbols/RollForward/choices/disable/displayName": "Отключить накат", + "symbols/TestRunner/description": "The test runner to use.", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner", + "symbols/TestRunner/choices/VSTest/displayName": "VSTest", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform", "postActions/open-file/description": "Открывает файл global.json в редакторе" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.tr.json index 83799eb377fb..4ccff9c7d878 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.tr.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.tr.json @@ -25,5 +25,11 @@ "symbols/RollForward/choices/latestMajor/displayName": "Son birincil sürüm", "symbols/RollForward/choices/disable/description": "İleri sarılmıyor. Tam eşleşme gerekiyor.", "symbols/RollForward/choices/disable/displayName": "İleri sarma devre dışı bırakıldı", + "symbols/TestRunner/description": "The test runner to use.", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner", + "symbols/TestRunner/choices/VSTest/displayName": "VSTest", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform", "postActions/open-file/description": "Düzenleyicide global.json dosyasını açar" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.zh-Hans.json index df6b667a8fe2..cd4c9cb8e84f 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.zh-Hans.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.zh-Hans.json @@ -25,5 +25,11 @@ "symbols/RollForward/choices/latestMajor/displayName": "最新主要版本", "symbols/RollForward/choices/disable/description": "不要前滚。需要完全匹配。", "symbols/RollForward/choices/disable/displayName": "禁用前滚", + "symbols/TestRunner/description": "The test runner to use.", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner", + "symbols/TestRunner/choices/VSTest/displayName": "VSTest", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform", "postActions/open-file/description": "在编辑器中打开 global.json" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.zh-Hant.json index 4cbe84a5e91b..169fa5fd8f29 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.zh-Hant.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/localize/templatestrings.zh-Hant.json @@ -25,5 +25,11 @@ "symbols/RollForward/choices/latestMajor/displayName": "最新主要", "symbols/RollForward/choices/disable/description": "不向前復原。需要完全相符。", "symbols/RollForward/choices/disable/displayName": "停用向前復原", + "symbols/TestRunner/description": "The test runner to use.", + "symbols/TestRunner/displayName": "Test runner", + "symbols/TestRunner/choices/VSTest/description": "Use VSTest as test runner", + "symbols/TestRunner/choices/VSTest/displayName": "VSTest", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/description": "Use Microsoft.Testing.Platform as test runner", + "symbols/TestRunner/choices/Microsoft.Testing.Platform/displayName": "Microsoft.Testing.Platform", "postActions/open-file/description": "在編輯器中開啟 global.json" } \ No newline at end of file diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/template.json index ce8bea43c8fb..e17f4d97c7a9 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/template.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/.template.config/template.json @@ -100,6 +100,26 @@ "displayName": "Disable roll-forward" } ] + }, + "TestRunner": { + "type": "parameter", + "description": "The test runner to use.", + "displayName": "Test runner", + "replaces": "TEST_RUNNER_VALUE", + "defaultValue": "", + "datatype": "choice", + "choices": [ + { + "choice": "VSTest", + "description": "Use VSTest as test runner", + "displayName": "VSTest" + }, + { + "choice": "Microsoft.Testing.Platform", + "description": "Use Microsoft.Testing.Platform as test runner", + "displayName": "Microsoft.Testing.Platform" + } + ] } }, "postActions": [ diff --git a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/global.json b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/global.json index 217558135c95..23baa04ff4aa 100644 --- a/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/global.json +++ b/template_feed/Microsoft.DotNet.Common.ItemTemplates/content/GlobalJson/global.json @@ -4,5 +4,12 @@ "rollForward": "ROLL_FORWARD_VALUE", //#endif "version": "SDK_VERSION" + //#if (TestRunner=="") } -} \ No newline at end of file + //#else + }, + "test": { + "runner": "TEST_RUNNER_VALUE" + } + //#endif +} diff --git a/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--roll-forward#major#--test-runner#Microsoft.Testing.Platform.verified/global-json-file/global.json b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--roll-forward#major#--test-runner#Microsoft.Testing.Platform.verified/global-json-file/global.json new file mode 100644 index 000000000000..d1f0ac883f01 --- /dev/null +++ b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--roll-forward#major#--test-runner#Microsoft.Testing.Platform.verified/global-json-file/global.json @@ -0,0 +1,9 @@ +{ + "sdk": { + "rollForward": "major", + "version": "%CURRENT-VER%" + }, + "test": { + "runner": "Microsoft.Testing.Platform" + } +} diff --git a/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--roll-forward#major#--test-runner#Microsoft.Testing.Platform.verified/std-streams/stdout.txt b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--roll-forward#major#--test-runner#Microsoft.Testing.Platform.verified/std-streams/stdout.txt new file mode 100644 index 000000000000..70cab17a4b13 --- /dev/null +++ b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--roll-forward#major#--test-runner#Microsoft.Testing.Platform.verified/std-streams/stdout.txt @@ -0,0 +1 @@ +The template "%TEMPLATE_NAME%" was created successfully. \ No newline at end of file diff --git a/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--sdk-version#6.0.200#--test-runner#VSTest.verified/global-json-file/global.json b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--sdk-version#6.0.200#--test-runner#VSTest.verified/global-json-file/global.json new file mode 100644 index 000000000000..48b6615a8a10 --- /dev/null +++ b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--sdk-version#6.0.200#--test-runner#VSTest.verified/global-json-file/global.json @@ -0,0 +1,8 @@ +{ + "sdk": { + "version": "6.0.200" + }, + "test": { + "runner": "VSTest" + } +} diff --git a/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--sdk-version#6.0.200#--test-runner#VSTest.verified/std-streams/stdout.txt b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--sdk-version#6.0.200#--test-runner#VSTest.verified/std-streams/stdout.txt new file mode 100644 index 000000000000..70cab17a4b13 --- /dev/null +++ b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--sdk-version#6.0.200#--test-runner#VSTest.verified/std-streams/stdout.txt @@ -0,0 +1 @@ +The template "%TEMPLATE_NAME%" was created successfully. \ No newline at end of file diff --git a/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--test-runner#Microsoft.Testing.Platform.verified/global-json-file/global.json b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--test-runner#Microsoft.Testing.Platform.verified/global-json-file/global.json new file mode 100644 index 000000000000..94edcbba188a --- /dev/null +++ b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--test-runner#Microsoft.Testing.Platform.verified/global-json-file/global.json @@ -0,0 +1,8 @@ +{ + "sdk": { + "version": "%CURRENT-VER%" + }, + "test": { + "runner": "Microsoft.Testing.Platform" + } +} diff --git a/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--test-runner#Microsoft.Testing.Platform.verified/std-streams/stdout.txt b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--test-runner#Microsoft.Testing.Platform.verified/std-streams/stdout.txt new file mode 100644 index 000000000000..70cab17a4b13 --- /dev/null +++ b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--test-runner#Microsoft.Testing.Platform.verified/std-streams/stdout.txt @@ -0,0 +1 @@ +The template "%TEMPLATE_NAME%" was created successfully. \ No newline at end of file diff --git a/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--test-runner#VSTest.verified/global-json-file/global.json b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--test-runner#VSTest.verified/global-json-file/global.json new file mode 100644 index 000000000000..1e73097a7dce --- /dev/null +++ b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--test-runner#VSTest.verified/global-json-file/global.json @@ -0,0 +1,8 @@ +{ + "sdk": { + "version": "%CURRENT-VER%" + }, + "test": { + "runner": "VSTest" + } +} diff --git a/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--test-runner#VSTest.verified/std-streams/stdout.txt b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--test-runner#VSTest.verified/std-streams/stdout.txt new file mode 100644 index 000000000000..70cab17a4b13 --- /dev/null +++ b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item#--test-runner#VSTest.verified/std-streams/stdout.txt @@ -0,0 +1 @@ +The template "%TEMPLATE_NAME%" was created successfully. \ No newline at end of file diff --git a/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item.verified/global-json-file/global.json b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item.verified/global-json-file/global.json index f14d06d447ca..b4a4d8e88737 100644 --- a/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item.verified/global-json-file/global.json +++ b/test/dotnet-new.IntegrationTests/Approvals/AllCommonItemsCreate.-o#global-json-file#-n#item.verified/global-json-file/global.json @@ -2,4 +2,4 @@ "sdk": { "version": "%CURRENT-VER%" } -} \ No newline at end of file +} diff --git a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_globaljson.verified.txt b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_globaljson.verified.txt index a23bbb9092c3..e2eabff978f0 100644 --- a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_globaljson.verified.txt +++ b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_globaljson.verified.txt @@ -28,4 +28,8 @@ Template options: latestFeature Uses the highest installed feature band and patch level that matches the requested major and minor with a feature band and patch level that is greater or equal than the specified value. If not found, fails. latestMinor Uses the highest installed minor, feature band, and patch level that matches the requested major with a minor, feature band, and patch level that is greater or equal than the specified value. If not found, fails. latestMajor Uses the highest installed .NET SDK with a version that is greater or equal than the specified value. If not found, fail. - disable Doesn't roll forward. Exact match required. \ No newline at end of file + disable Doesn't roll forward. Exact match required. + --test-runner The test runner to use. + Type: choice + VSTest Use VSTest as test runner + Microsoft.Testing.Platform Use Microsoft.Testing.Platform as test runner \ No newline at end of file diff --git a/test/dotnet-new.IntegrationTests/CommonTemplatesTests.cs b/test/dotnet-new.IntegrationTests/CommonTemplatesTests.cs index 3a373345ff59..ad2d5e54b48c 100644 --- a/test/dotnet-new.IntegrationTests/CommonTemplatesTests.cs +++ b/test/dotnet-new.IntegrationTests/CommonTemplatesTests.cs @@ -29,9 +29,15 @@ public CommonTemplatesTests(SharedHomeDirectory fixture, ITestOutputHelper log) [InlineData("global.json file", "globaljson", null)] [InlineData("global.json file", "globaljson", new[] { "--sdk-version", "6.0.200" })] [InlineData("global.json file", "globaljson", new[] { "--sdk-version", "6.0.200", "--roll-forward", "major" })] + [InlineData("global.json file", "globaljson", new[] { "--test-runner", "VSTest" })] + [InlineData("global.json file", "globaljson", new[] { "--test-runner", "Microsoft.Testing.Platform" })] + [InlineData("global.json file", "globaljson", new[] { "--sdk-version", "6.0.200", "--test-runner", "VSTest" })] + [InlineData("global.json file", "globaljson", new[] { "--roll-forward", "major", "--test-runner", "Microsoft.Testing.Platform" })] [InlineData("global.json file", "global.json", null)] [InlineData("global.json file", "global.json", new[] { "--sdk-version", "6.0.200" })] [InlineData("global.json file", "global.json", new[] { "--sdk-version", "6.0.200", "--roll-forward", "major" })] + [InlineData("global.json file", "global.json", new[] { "--test-runner", "VSTest" })] + [InlineData("global.json file", "global.json", new[] { "--test-runner", "Microsoft.Testing.Platform" })] [InlineData("NuGet Config", "nugetconfig", null)] [InlineData("NuGet Config", "nuget.config", null)] [InlineData("dotnet gitignore file", "gitignore", null)] @@ -82,7 +88,8 @@ public async Task AllCommonItemsCreate(string expectedTemplateName, string templ // globaljson is appending current sdk version. Due to the 'base' dotnet used to run test this version differs // on dev and CI runs and possibly from the version within test host. Easiest is just to scrub it away - if (expectedTemplateName.Equals("global.json file") && args == null) + if (expectedTemplateName.Equals("global.json file") && + (args == null || !args.Contains("--sdk-version"))) { string sdkVersionUnderTest = await new SdkInfoProvider().GetCurrentVersionAsync(default); options.CustomScrubbers?.AddScrubber(sb => sb.Replace(sdkVersionUnderTest, "%CURRENT-VER%"), "json");