netcorecli-fsc/test
Enrico Sada 3fcf0055f6 use env var `TEST_SUITE_MSBUILD_HOST_TYPES` to choose msbuild host to test 2017-04-25 20:48:50 +02:00
..
.vscode Merge branch 'rel/1.0.0-preview2.1' 2017-02-02 14:11:16 +01:00
Microsoft.DotNet.Cli.Utils Merge branch 'rel/1.0.0-preview2.1' 2017-02-02 14:11:16 +01:00
Microsoft.DotNet.Tools.Tests.Utilities skip net4.5.1 tests on non win 2017-02-15 15:58:10 +01:00
dotnet-new.Tests use env var `TEST_SUITE_MSBUILD_HOST_TYPES` to choose msbuild host to test 2017-04-25 20:48:50 +02:00
testAssets more Fsc task args (#88) 2017-03-17 18:57:05 +01:00
README.md use env var `TEST_SUITE_MSBUILD_HOST_TYPES` to choose msbuild host to test 2017-04-25 20:48:50 +02:00

README.md

How to run tests suite

The test suite will:

  • test the current dotnet new templates with new packages (to avoid regression)
  • test some scenarios, using new packages

All tests will copy templates from dotnet new or test/testAssets in a temp directory for each test (so each test is isolated)

The test suiteuse a local package cache (not the global one) in test/packages. The package cache is shared by tests, but is cleaned up from this repo packages if the build script is used (so same package version can be reused for multiple runs).

Using build script:

From repo root, build will compile, package and run test.

This will cleanup also package cache, and move newly generated nupkg into test/packageToTest

Running test suite only:

After build

  • cd test/dotnet-new.Tests
  • dotnet test

How preserve generated test artifacts

Use env var DOTNET_TEST_PRESERVE_TEMP to preserve temporary test directories.

Tests are built in temporary directories under %TEMP%\NetcoreCliFscTests directory

From test/dotnet-new.Tests :

  • dotnet test to run all tests
  • dotnet test -t to show all tests (without run)
  • dotnet test --filter "FullyQualifiedName=NetcoreCliFsc.Tests.CommonScenario.TestAppWithArgs451" to run a specific test (see -t for list)

Feeds used

For projects generated by test suite, the following feed are used

  • all feeds in Nuget.config
  • test/packageToTest if exists, recreated by Test target, contains packages to test
  • test/externalPackages if exists

What package to test

To specify what package version to test, use env var:

  • TEST_SUITE_FSHARP_NET_SDK_PKG_VERSION => FSharp.NET.Sdk pkg version
  • TEST_SUITE_FSHARP_CORE_PKG_VERSION => FSharp.Core pkg version

If not set, default versions are specified in test/testAssets/TestSuiteProps/TestSuiteProps.props

Choose MSBuild host types

Use env var TEST_SUITE_MSBUILD_HOST_TYPES to run other test for different msbuild host types

Msbuild Core test always run

  • MSBUILD to run also MSBuild (.NET Full), require msbuild.exe in PATH
  • MONO to run also Mono, require mono in PATH

to specify multiple, use ; separator, so MSBUILD;MONO for example