Implemented vstest verb which will run the test from given container. (#4115)

* Implemented vstest verb which will run the test from given container.

* Fixed Nitpick.

* 1) Addressed PR comment
2) Added tests for vstest verb

* Using specific version of Microsoft.TestPlatform.

* Address PR comments.

Modified help text for the vstest command.
Removed unused function.

* Fixed package related issue.
--Taking reference of microsoft.testplatform.cli nuget package which has contentFolder in it so that sub folder of this nuget can also be added in cli package.
-- Removing vstest.console, vshost and datacollector from Bundletools as we dont want *.deps.json to be override

* Nitpick

* Making vstest.console arguments compatible for non windows platform

* Fix tests to run on linux machine

* Updated the microsoft.testplatform.cli nuget package version. This version has fix related to non windows machine.

* changed dapter path from bin/debug to bin/Debug

* updated nuget version of package Microsoft.TestPlatform.CLI.

* Revert "updated nuget version of package Microsoft.TestPlatform.CLI."

This reverts commit bcc26c21d11c2bd2e5259a74f9890b0fd75962c7.

* Updated version of nuget package Microsoft.TestPlatform.CLI
Added Test project in solution file

* Addressed PR comment.

* Removed unnecessary --platform argument from test
This commit is contained in:
Faizan2304 2016-09-19 23:29:26 +05:30 committed by Livar
parent 5b48f22145
commit 0ce597a147
13 changed files with 259 additions and 2 deletions

View file

@ -0,0 +1,19 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace TestNamespace
{
[TestClass]
public class VSTestTests
{
[TestMethod]
public void VSTestPassTest()
{
}
[TestMethod]
public void VSTestFailTest()
{
Assert.Fail();
}
}
}

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
<OutputPath>bin\$(Configuration)\netcoreapp1.0</OutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<None Include="project.json" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft.CSharp.targets" />
<Target Name="AfterBuild">
<Copy SourceFiles="$(NuGetPackageRoot)\mstest.testadapter\1.0.3-preview\build\_common\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true"/>
<Copy SourceFiles="$(NuGetPackageRoot)\mstest.testadapter\1.0.3-preview\build\dotnet\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true"/>
<Copy SourceFiles="$(NuGetPackageRoot)\mstest.testadapter\1.0.3-preview\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true"/>
<Copy SourceFiles="$(NuGetPackageRoot)\mstest.testframework\1.0.1-preview\lib\dotnet\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true"/>
<Copy SourceFiles="$(NuGetPackageRoot)\mstest.testframework\1.0.1-preview\lib\dotnet\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true"/>
</Target>
</Project>

View file

@ -0,0 +1,21 @@
{
"dependencies": {
"MSTest.TestAdapter": "1.0.3-preview",
"MSTest.TestFramework": "1.0.1-preview"
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.Sdk": "1.0.0-alpha-20160914-1",
"Microsoft.NETCore.App": {
"version": "1.0.1",
"type": "platform"
}
},
"imports": [
"dnxcore50",
"portable-net45+win8"
]
}
}
}