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

VsTestConsoleWrapper does not support vstest.console.dll #1887

Closed
rouke-broersma opened this issue Jan 14, 2019 · 3 comments · Fixed by #1893
Closed

VsTestConsoleWrapper does not support vstest.console.dll #1887

rouke-broersma opened this issue Jan 14, 2019 · 3 comments · Fixed by #1893

Comments

@rouke-broersma
Copy link

Description

We are building a mutation testing framework for dotnet framework and dotnet core. We are trying to integrate vstest using the Microsoft.TestPlatform.TranslationLayer and Microsoft.TestPlatform.Portable nuget packages. This works on windows by providing the vstest.console.exe path from the nuget package to VsTestConsoleWrapper which provides the path to the VsTestConsoleProcessManager, however this does not seem to work for vstest.console.dll because the wrapper does not detect that the dll should be run using using dotnet with vstest.console.dll as the argument instead of trying to start a process for the dll directly. The IntegrationTestBase in the Microsoft.TestPlatform.TestUtilities project contains logic to differentiate between starting a vstest.console.exe process and starting a dotnet vstest.console.dll process. We need this logic in the TranslationLayer to be able to add vstest integration in our mutation test framework.

Steps to reproduce

  1. Create a dotnet console app using packages Microsoft.TestPlatform, Microsoft.TestPlatform.Portable and Microsoft.TestPlatform.TranslationLayer.
  2. Provide vstest.console.dll from Portable package, and a logfile location to VsTestConsoleWrapper
  3. Call StartSession
  4. Call InitializeExtensions with TestAdapters from Extensions folder in Portable package
  5. Call DiscoverTests on a test project

I also have a proof of concept of our vstest integration on this branch here: https://github.com/stryker-mutator/stryker-net/tree/183-vstest-integration/src/Stryker.Core/Stryker.Core/TestRunners/vstest

Expected behavior

vstest.console.dll starts up, discovers tests in test project and returns discovered tests to TranslationLayer. Logging is available to see what vstest.console.dll executed.

Actual behavior

vstest.console.dll tries to start up, immediately fails because OS does not know how to run a dll, no logging is available because vstest.console.dll never actually started

Diagnostic logs

No logs are available because vstest.console.dll never actually started.

Environment

OS: Windows 10 Enterprise
Packages and versions:

  • Dotnet Core 2.1.0
  • Microsoft.TestPlatform: 16.0.0-preview-20181205-02
  • Microsoft.TestPlatform.Portable: 16.0.0-preview-20181205-02
  • Microsoft.TestPlatform.TranslationLayer: 16.0.0-preview-20181205-02
@rouke-broersma
Copy link
Author

See also integration test for VsTestConsoleWrapper which has test logic to say that the dotnet core vstest runner is not supported by VsTestConsoleWrapper: https://github.com/Microsoft/vstest/blob/master/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/DiscoverTests.cs#L21
Which actually uses the TestUtilities IntegrationTestBase to test that the dotnet core runner is not supported. The integration testbase that includes logic to start up the dotnet core vstest runner..

@mayankbansal018
Copy link
Contributor

@Mobrockers since you already have a POC, is it possible for you to pick this issue, we will be happy to help you.

@rouke-broersma
Copy link
Author

@mayankbansal018 I can probably pick this up.

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

Successfully merging a pull request may close this issue.

2 participants