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

Desktop test projects with class fixtures can fail to find tests. #408

Closed
NTaylorMullen opened this issue Jan 30, 2017 · 6 comments
Closed
Assignees

Comments

@NTaylorMullen
Copy link

NTaylorMullen commented Jan 30, 2017

Description

Running semi-complex test projects that utilize advanced class fixtures can result in tests failing to run. I've tried to repro this on smaller projects but to no avail. There's something unique about the MVC functional tests that trigger the issue. I've gone ahead and created a branch for bug investigation.

I was able to create a brand new test project with a single test that had the same csproj as the MVC functional tests and bring in the MvcTestFixture and use it to repro the issue.

Steps to reproduce

  • git clone git@github.com:aspnet/Mvc.git
  • cd Mvc
  • git fetch
  • git checkout nimullen/migration.desktoptestbug
  • cd test/Microsoft.AspNetCore.Mvc.FunctionalTests
  • dotnet restore
  • dotnet test -f net451

Expected behavior

Tests are run

Actual behavior

Microsoft (R) Test Execution Command Line Tool Version 15.0.0.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
Warning: No test is available in C:\Users\nimullen\Documents\GitHub\Mvc\test\Microsoft.AspNetCore.Mvc.FunctionalTests\bin\Debug\net451\Microsoft.AspNetCore.Mvc.FunctionalTests.dll. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.
@codito
Copy link
Contributor

codito commented Feb 1, 2017

@NTaylorMullen, the test discovery is failing because of following issue.

Warning: [xUnit.net 00:00:18.9600000] Skipping: Microsoft.AspNetCore.Mvc.FunctionalTests (could not find dependent assembly 'SecurityWebSite, Version=1.0.0')

Finding these errors is quite hard currently, they are not showing up on stdout because of #300. Working on fixing it.

@NTaylorMullen
Copy link
Author

@codito I see! I'm glad it's a duplicate bit then. Thanks!!

@NTaylorMullen
Copy link
Author

@codito how did you get those logs? Having another issue similar to this and trying to find the underlying cause.

@natemcmaster
Copy link
Contributor

@NTaylorMullen not sure if this is how @codito did it, but dotnet test -d:log.txt usually works for me.

@NTaylorMullen
Copy link
Author

@natemcmaster nah, doesn't provide enough info 😢 . I was able to get the info needed by building source locally and updating my test host. Looks like they fixed this in newer builds

@codito
Copy link
Contributor

codito commented Feb 14, 2017

@NTaylorMullen with #300 fixed, the issues from adapter have started showing up. Please update Test.Sdk reference to https://www.nuget.org/packages/Microsoft.NET.Test.Sdk/15.0.0-preview-20170210-02 to get the fix.

@codito codito closed this as completed Feb 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants