Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vstest.console.exe fails with "No test source files were specified." when passing TestRunParameters #5

Closed
daniel-stark opened this issue Jun 17, 2020 · 4 comments
Assignees

Comments

@daniel-stark
Copy link

I am specifying vsTest arguments of /EnableCodeCoverage /Settings:C:\azagent\A1_work\r1\a_TeamIntegration-Pipeline\tests\CompleteRunsettings1.runsettings -- TestRunParameters.Parameter(name="MCPServer",value="server")
When I do so, the AzureDevopsTask fails with -
2020-06-17T11:25:31.8885577Z ##[error]Command failed: "C:\Program Files (x86)\Microsoft Visual Studio\2019\TestAgent\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" /EnableCodeCoverage /Settings:C:\azagent\A1_work\r1\a_TeamIntegration-Pipeline\tests\CompleteRunsettings1.runsettings -- TestRunParameters.Parameter(name="MCPServer",value="server") "C:\azagent\A1_work\r1\a_TeamIntegration-Pipeline\tests\sample.Test.dll"
No test source files were specified.

The problem is the order in which the task is sending the arguments to vstest.console.exe. It expects the order to be: vstest.console.exe dllName [options]
I have tested this on the command line and it works:
"C:\Program Files (x86)\Microsoft Visual Studio\2019\TestAgent\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" "C:\azagent\A1_work\r1\a_TeamIntegration-Pipeline\tests\sample.Test.dll" /EnableCodeCoverage /Settings:C:\azagent\A1_work\r1\a_TeamIntegration-Pipeline\tests\CompleteRunsettings1.runsettings -- TestRunParameters.Parameter(name="MCPServer",value="server")

vstest.console.exe seems to only care about the order when providing the TestRunParameters.Parameter option

@Rogeriohsjr
Copy link
Owner

Hey @daniel-stark , thanks for the bug report and for suggest the fix, I saw you created a PR for it, do you mind send only the file that you changed, so I can accept your PR and merge and I can generate a new version.

@Rogeriohsjr Rogeriohsjr self-assigned this Jun 17, 2020
@petercannon
Copy link

Hi @Rogeriohsjr did this PR get merged and the version updated?

@Rogeriohsjr
Copy link
Owner

Hey @petercannon, not yet, I was waiting for a PR, since I didn't get the PR, tomorrow I will fix it and create a new version with this fix. I will post here when I release it.

@Rogeriohsjr
Copy link
Owner

Hi @petercannon and @daniel-stark , I have fixed the issue on version 0.1.23, if you guys can take a look. I will close this issue for now, if you guys find any issue please don't hesitate on open this thread again or open a new issue. I will be happy to help or fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants