Comments (11)
@AbhitejJohn @sbaid @pvlakshm @saikrishnav thoughts?
from vstest.
User will be able to run tests in testproject.dll only after a dotnet publish, so that all dependencies are copied to output directory. dotnet build doesn't copy all dependencies to output folder.
CI build would require dotnet publish on test project so that all dependencies are bundled; since there isn't a nuget package directory
AFAIK, dotnet publish doesn't work until specific runtime is specified. Do we want to force the users to always specify runtime in their test projects?
from vstest.
@harshjain2 without a RID specified, dotnet publish
publishes to netcoreapp1.0
directory for netcore target and net46\win7-x64 (or x86)
directory for net46 target.
I've updated original comment. CI build (or strictly speaking CDP) requires publish only if the build
step has already run on another machine, and test
is running in a separate machine with the build artifacts
.
from vstest.
@codito
I'm a bit concerned about dependencies of Test Adapter.
Test Adapter can have dependencies on MSTest.ObjectModel and other nuget packages.
Those dependencies are taken care of if test project adds Test Adapter nuget as relevant dependencies will be added in the test dll's .deps.json file.
I am not sure what will happen if user forgets to add Test Adapter. It might work if, just by luck, test dll has all the dependencies required for test adapter. Otherwise it will bomb.
As Test Platform owner, we should have a strict guideline that Test Adapter nuget packages should always be added to the test project just to ensure the .deps.json of test dll has the required dependencies needed for Test Adapter as well.
from vstest.
- Test host is a dependency of each test project
- Test host is not a dependency, bundled with vstest.console package
On this, in order to ensure the dependencies of testhost is taken care of, option 1 is recommended. That way, dependencies of testhost will be present in test dll's .deps.json which we are passing when starting testhost.
from vstest.
@codito @AbhitejJohn Do we know the requirements for asp.net tests?
from vstest.
In Solution #2, packaging would bloat up the vstest.console bundle since it might end up having a testhost and its dependencies built for a lot of netstandard versions. #1 gives the ability to fragment this with the ability to plug in which ever version is appropriate as long as it understands the protocol. This can also be a nice host extensibility entry point where someone can specify their host via a nuget package and vstest.console can communicate with that host.
One thing thats biting me with solution #1 however is the pain of the user to add 3 nuget dependencies -> Framework, Adapter and the test host. Just a thought, can we somehow tie the adapter to have a dependency on test host? That could possibly work @codito .
@harshjain2 : What requirements are we talking about? Currently ASP.NET Core targets the same core CLR. I do not see any plan for post RTM here though: https://github.com/aspnet/Home/wiki/Roadmap .
@codito : Does the new csproj based project system allow users to add references directly to assemblies as well?
from vstest.
@harshjain2 re the dependencies of test adapter, they will cleanly resolve with testproject.deps.json
. dotnet build
will ensure this. Dependencies of testhost will always be in the current folder of testhost (a dotnet publish
has already been run on testhost before packaging).
I think we should take a staged approach (since this is a architectural change): start with approach 2, then move to approach 1.
@AbhitejJohn @harshjain2 probably meant the assembly loading in asp.net. We will do a small spike for this.
Updated notes on adapter discovery based on deps.json above.
from vstest.
Will a runsettings ever be supported? I ask because that has an AssemblyResolution entry where you can specify locations where dependencies may be found.
from vstest.
@pvlakshm I think we need to support runsettings since it also has platform, test logger, data collector and adapter settings. AssemblyResolution entries may not be applicable to netcore
framework (they are also not applicable to C++, Nodejs and other languages the runner supports).
Updated notes with two relevant specifications from dotnet-cli around runtime configuration and corehost.
from vstest.
Resolved with 4f34968.
from vstest.
Related Issues (20)
- TestCategory no longer works for VsTest HOT 7
- Staircase in logger seems not to be properly fixed HOT 1
- Official builds are failing HOT 3
- Don't combine PackageLicenseExpression and PackageLicenseFile (only use PackageLicenseExpression for MIT licensed packages) HOT 6
- Could not load file or assembly 'Microsoft.VisualStudio.CodeCoverage.Shim' HOT 4
- Test Host randomly crashing with message "##[error]The active test run was aborted. Reason: Test host process crashed" HOT 28
- StandardOutput/StandardError of launched process is not shown HOT 2
- https://aka.ms/vstest-report redirects to archived vstest-docs repository HOT 3
- Consider reading sources even when some types cannot load
- Support RISC-V64 architecture HOT 1
- Test adapter not found for >= .net5.0 test containers HOT 7
- Terminal logger integration HOT 5
- Regression with console logger in .NET 9 HOT 3
- EqtTrace fails with TypeInitializationException on browser-wasm HOT 1
- Remove depenedency on Newtonsoft.Json - any plans ? HOT 1
- Microsoft (R) Test Execution CLI, Copyright (C) Microsoft Corporation. All rights reserved. HOT 4
- EventLogContainer Index is out of bounds HOT 1
- Running without test.sdk is broken
- [Support] Grouping Tests by Class Name HOT 10
- Update maxversiontested to Xaml Islands can be used in a VSTest project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vstest.