Building and running tests with the latest pre-release packages
I would like to enable the scenario for developers to build the tests against the latest packages to be restored from myget. At the moment the current test projects utilize the project.json which are static and have project references to the product being built with the tests. This new scenario would allow for the test project.json to have a reference to the latest version of the product dependency it is testing and the latest versions of their sub dependencies.
Your thoughts on this scenario? @weshaggard @ericstj CC: @joshfree @ianhays
@weshaggard is already looking into this scenario; Wes?
CC: @ellismg @stephentoub
@karajas What kind of strategy where you thinking about doing for this? We must remember that we have to support testing in multiple scenarios with the two obvious ones being the minimal version of dependencies and the latest live versions. So whatever we do we need to ensure we can cover both of those.
In Helix for the ToF tests it uses all of the latest live versions for testing so we would want something similar here. I think it that case it would useful to be able to provide a version number to test against.
the minimal version of dependencies
Isn't this what we're doing currently? I think this should remain the default but running against a specific set should be toggle-able similar to the RunWithLocalLibraries property (I think is the name) e.g. msbuild /:BuildAndTest /p:RunWithLibraryVersion=prerelease-rc3-23808
the minimal version of dependencies Isn't this what we're doing currently?
Yes that is what we are currently doing. I just wanted to be sure whatever we switch to doesn't lose that characteristic.
/p:TestWithLocalLibraries=true is what we currently have but I think having something like /p:RunWithLibraryVersion=prerelease-rc3-23808 is also an interesting idea which we should consider.
Actually we aren't testing with minimal versions since the test-runtime blasts over the existing minimal declared dependencies.
@ericstj fair enough but that is our intent and we would like to get to a place where we can actually test against the minimal. Using a managed test host like xunit however we will likely always have a baseline set of minimal packages.
xunit already targets net4.5 so we should be able to have a minimal set of the earliest contracts.
@ericstj This would be building say the test of System.Linq against the prerelease version of System.Linq as opposed to the local version being built with the test. @weshaggard I think the current strategy here is to include a conditional in the project reference of each test's csproj. Then when a restore occurs, the test will be built against the latest prerelease package.
@karajas I think @chcosta's recent PR https://github.com/dotnet/corefx/pull/7604 enabled the scenario you are looking for so closing this issue.