vstest

Pass argument or option to Unit Tests from VSTest.Console.exe

邮差的信 提交于 2021-02-07 08:28:01
问题 I can successfully run the VS unit tests from the command line (and hence from the build on the build machine). VSTest.Console.EXE "MyTest.dll" /logger:trx /platform:x64 /inIsolation I can also filter out any required tests that I don't want to execute on a certain environment with /TestCaseFilter option: VSTest.Console.EXE "MyTest.dll" /TestCaseFilter:Name!=Verify_DigitallySigned This is needed to not to run "check if digitally signed" test(s). This way I can filter out the required set of

Pass argument or option to Unit Tests from VSTest.Console.exe

て烟熏妆下的殇ゞ 提交于 2021-02-07 08:27:49
问题 I can successfully run the VS unit tests from the command line (and hence from the build on the build machine). VSTest.Console.EXE "MyTest.dll" /logger:trx /platform:x64 /inIsolation I can also filter out any required tests that I don't want to execute on a certain environment with /TestCaseFilter option: VSTest.Console.EXE "MyTest.dll" /TestCaseFilter:Name!=Verify_DigitallySigned This is needed to not to run "check if digitally signed" test(s). This way I can filter out the required set of

vstest.console.exe ListTests with FullyQualifiedName

空扰寡人 提交于 2021-01-28 05:17:32
问题 /ListTests option of vstest is returning a list of test method names inside a dll. Is there a way to return a list of FullyQualifiedNames ? So instead of getting TestMethodName I would like to receive NamespaceName . ClassName . TestMethodName . 回答1: You can use following command: vstest.console a.dll /ListFullyQualifiedTests /ListTestsTargetPath:Tests.txt 来源: https://stackoverflow.com/questions/44569883/vstest-console-exe-listtests-with-fullyqualifiedname

How to run a list of tests with VsTest.Console

你离开我真会死。 提交于 2021-01-21 07:46:24
问题 How can I run a list of tests using vstest.console.exe? The .vsmdi format offered a way to specify test lists, but that format is deprecated(?). I can run an explicit list of tests on the command line, which essentially does exactly what I want, but if the number if tests is large (say a few hundred) then I will run out of command line space! vstest.console MyTests.dll /Tests:Test1,Test2 Is there no way that I can trick vstest.console.exe into running a list of tests defined in any other way?

How to run a list of tests with VsTest.Console

£可爱£侵袭症+ 提交于 2021-01-21 07:46:14
问题 How can I run a list of tests using vstest.console.exe? The .vsmdi format offered a way to specify test lists, but that format is deprecated(?). I can run an explicit list of tests on the command line, which essentially does exactly what I want, but if the number if tests is large (say a few hundred) then I will run out of command line space! vstest.console MyTests.dll /Tests:Test1,Test2 Is there no way that I can trick vstest.console.exe into running a list of tests defined in any other way?

TFS Tests do not match framework settings

喜欢而已 提交于 2020-12-28 09:56:15
问题 I am attempting to move a solution from TFS 2012 to TFS 2018 SP2RC2 but I can't get the unit tests to run correctly. All projects have been re-targeted to 4.7.1 and are built as x86 platform. We have a testsettings file that supplies nothing but deployment items. I am using the new VSTest Platform Installer task (as directed by MS) and the VS Test Task. At the start of the test run I get the following message: Test run will use DLL(s) built for framework .NETFramework,Version=v4.5 and

Console output missing in Azure DevOps release when enabling “Specify a batch size”

橙三吉。 提交于 2020-01-23 07:23:24
问题 We have a large test set running (based on NUnit) within Azure DevOps. Recently we enabled the "Rerun failed tests" option within the Visual Studio Test task. At first, this didn't work due to a bug in VSTest with handling custom test display names (which are required for our tests). Tests would still only run once. However, by setting a batch size, this issue is fixed and tests are finally retried correctly. It works wonderful, except for one strange effect... for no apparent reason, the

Console output missing in Azure DevOps release when enabling “Specify a batch size”

只愿长相守 提交于 2020-01-23 07:23:10
问题 We have a large test set running (based on NUnit) within Azure DevOps. Recently we enabled the "Rerun failed tests" option within the Visual Studio Test task. At first, this didn't work due to a bug in VSTest with handling custom test display names (which are required for our tests). Tests would still only run once. However, by setting a batch size, this issue is fixed and tests are finally retried correctly. It works wonderful, except for one strange effect... for no apparent reason, the

Dotnet test on .NET Core 1.1 in VSTS: No Test Discoverer is Registered

♀尐吖头ヾ 提交于 2020-01-23 07:21:11
问题 I'm using VS 2017 with the new csproj in a .NET Standard class library, trying to test the library with a .NET Core 1.1 test project using MSTest testing framework with the dotnet test command. Running locally works perfectly fine; when I send the build to continuous integration, I get the error: No test discoverer is registered to perform discovery of test cases. How do I get this discoverer registered, and my tests running, in VSTS? 回答1: This is my build process on VSTS (detailed on my blog

VSTest: A testsettings file or a runsettings with a ForcedLegacyMode set to true is not supported with the MSTest V2 Adapter. No test is available

泪湿孤枕 提交于 2020-01-22 12:22:25
问题 How to use .testsettings file running unit tests via vstest.console.exe ? I created empty visual studio solution, created empty unit test project, added Local.testsettings file as a solution item. [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { } } <?xml version="1.0" encoding="UTF-8"?> <TestSettings name="Local" id="1109524d-9809-4423-b7fa-fad429ebfd8d" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010"> <Description>These are default test settings