Skip to content

Instantly share code, notes, and snippets.

@codito
Created October 3, 2017 04:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codito/e979eb04544fa5034ebda916c112549a to your computer and use it in GitHub Desktop.
Save codito/e979eb04544fa5034ebda916c112549a to your computer and use it in GitHub Desktop.
Running tests from published project
> mkdir g:\tmp\trial
> cd g:\tmp\trial
> dotnet --info
.NET Command Line Tools (2.0.2-vspre-006949)

Product Information:
 Version:            2.0.2-vspre-006949
 Commit SHA-1 hash:  23fc6ec23d

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.0.2-vspre-006949\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d

> dotnet new mstest
Getting ready...
The template "Unit Test Project" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on G:\tmp\trial\trial.csproj...
  Restoring packages for G:\tmp\trial\trial.csproj...
  Generating MSBuild file G:\tmp\trial\obj\trial.csproj.nuget.g.props.
  Generating MSBuild file G:\tmp\trial\obj\trial.csproj.nuget.g.targets.
  Restore completed in 2.85 sec for G:\tmp\trial\trial.csproj.


Restore succeeded.

> dotnet publish
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  trial -> G:\tmp\trial\bin\Debug\netcoreapp2.0\trial.dll
  trial -> G:\tmp\trial\bin\Debug\netcoreapp2.0\publish\

> dotnet vstest G:\tmp\trial\bin\Debug\netcoreapp2.0\publish\trial.dll
Microsoft (R) Test Execution Command Line Tool Version 15.3.0-preview-20170628-02
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...

Total tests: 1. Passed: 1. Failed: 0. Skipped: 0.
Test Run Successful.
Test execution time: 0.9586 Seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment