0

I have list of test dll's and those are should be run sequentially. Here I'm using task: VSTest@2 and given list of dll's as input to testassemblyver2. Like

task: VSTest@2
.......
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
$(ArtifcatsDir)\Tests\TestA.dll
$(ArtifcatsDir)\Tests\TestE.dll
$(ArtifcatsDir)\Tests\TestB.dll
.........................
runInParallel: false

Here I'm expecting to execute dll's as given order TestA.dll,TestE.dll,TestB.dll but it was executing alphabetical order TestA.dll,TestB.dll,TestE.dll.

Please suggest how can we execute dll's as given order in testAssemblyVer2.

Bushan
  • 1
  • 1
  • Unit Tests should be atomic. Sometimes its convenient to use Setup and Teardown methods though they shouldn't be dependent on each other and if you're doing sequential stuff you might prefer Moq `ISetupSequentialResult`. You can order Unit Tests in a single assembly https://learn.microsoft.com/en-us/dotnet/core/testing/order-unit-tests and for multiple assemblies FYI I think this question is a duplicate https://stackoverflow.com/q/62262206/495455 – Jeremy Thompson Jul 08 '22 at 04:32
  • Yes, Unit test are automatic and shouldn't be dependent on each other. In my case those assemblies are Automated Tests and dependent on some of assemblies. As I observed VSTest@2 is ordering and executing assemblies as ascending order by default. Do we have any option to execute assemblies as given order in VSTest@2. Thank you. – Bushan Jul 08 '22 at 05:34
  • Just Prefix the Assembly names with a number 001_ – Jeremy Thompson Jul 08 '22 at 05:37

0 Answers0