zoukankan      html  css  js  c++  java
  • .NET Core 单元测试相关命令

    使用的PowerShell命令

    1.创建项目相关命令

    ls 

    mkdir

    ni (new-item) 创建空文件

    add-content  向文件添加内容

    type 打开文件

    dotnet new sln 创建空解决方案

    dotnet sln add *.csproj 向解决方案添加项目

    dotnet new classlib 创建程序集

    dotnet new mstest (创建MSTest项目)

    dotnet add reference *.csproj (当前程序集添加其他程序及引用)

    2.执行测试相关命令

    dotnet test 执行所有

    测试

    dotnet test --filter Method (执行完整名字包含Method 的测试方法)

    dotnet test --filter Name~TestMethod1 (运行名称中包含TestMethod1的方法)

    dotnet test --filter ClassName=MSTestNamespace.UnitTest1 (运行MSTestNamespace.UnitTest1类中的测试)

    dotnet test --filter FullyQualifiedName!=MSTestNamespace.UnitTest1.TestMethod1 (运行MSTestNamespace.UnitTest1.TestMethod1之外所有测试)

    dotnet test --filter TestCategory=CategoryA (运行含 [TestCategory("CategoryA")] 批注的测试。)

    dotnet test --filter Priority=2  (运行含 [Priority(2)] 批注的测试。)

    dotnet vstest <MyPublishedTests>.dll 对发布过的测试项目运行测试 (如果你的应用以 netcoreapp 之外的框架为目标,则仍然可以通过使用框架标志传入目标框架来运行 dotnet vstest 命令。 如:dotnet vstest <MyPublishedTests>.dll --Framework:".NETFramework,Version=v4.6")

  • 相关阅读:
    5.颜色空间转换
    Linux下的解压命令
    4.图像模糊/图像平滑
    insightface作者提供数据训练解读
    MXNetError: [05:53:50] src/operator/nn/./cudnn/cudnn_convolution-inl.h:287
    python中import cv2遇到的错误及安装方法
    docker 安装 mxnet
    95. Unique Binary Search Trees II
    236. Lowest Common Ancestor of a Binary Tree
    124. Binary Tree Maximum Path Sum
  • 原文地址:https://www.cnblogs.com/fmys/p/10206411.html
Copyright © 2011-2022 走看看