. NETCoreCLI tool documentation dotnet-test

Source: Internet
Author: User
Tags xunit
. NETCoreCLI tool documentation dotnet-test

Name

Dotnet-test-run the unit test with the configured test runner

Summary

'Dotnet test [-- configuration]

[--output] [--build-base-path] [--framework] [--runtime][--no-build][--parentProcessId] [--port]  [
 
  ]`
 

Description

The dotnet test command is used to execute unit tests in a given project. A unit test is a class library project that depends on the unit test framework (such as NUnit or xUnit), and the unit test framework is used for the dotnet test runner.

The test project must use the "testRunner" node in project. json to specify a test runner attribute. This value should contain the name of the unit test framework.

The following example project. json shows the required attributes:

{  "version": "1.0.0-*",  "buildOptions": {    "debugType": "portable"  },  "dependencies": {    "System.Runtime.Serialization.Primitives": "4.1.1",    "xunit": "2.1.0",    "dotnet-test-xunit": "1.0.0-rc2-192208-24"  },  "testRunner": "xunit",  "frameworks": {    "netcoreapp1.0": {      "dependencies": {        "Microsoft.NETCore.App": {          "type": "platform",          "version": "1.0.0"        }      },      "imports": [        "dotnet5.4",        "portable-net451+win8"      ]    }  }}

Dotnet test supports two running modes:

Console: in console mode, dotnet test fully executes any command passed to it and outputs the result. At any time you call dotnet test without passing -- port. it runs in console mode, which in turn leads to running in console mode.

Design phase: used in the context of other tools, such as editors or integrated development environments (IDEs. You can find it in dotnet-test protocol

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.