NUnit Console Command Line
https://github.com/nunit/docs/wiki/Console-Command-Line
The console interface runner is invoked by a command in the form
NUNIT3-CONSOLE [inputfiles] [options]
where inputfiles is one or more assemblies or test projects of a type that NUnit can process and options is zero or more options.
Input files and options may be mixed in any order.
--where=EXPRESSION
An expression indicating which tests to run.
It may specify test names, classes, methods, categories or properties comparing them to actual values with the operators ==, !=, =~ and !~.
See Test Selection Language for a full description of the syntax.
https://github.com/nunit/docs/wiki/Test-Selection-Language
cat - A category assigned to the test, e.g. SmokeTests
Filtering Based on Properties
Although the syntax will accept any property name - including names that don't actually exist - filtering will only work on existing, string-valued properties. The following properties are created by NUnit and have string values:
- Author
- Category
- Description
- SetCulture
- SetUICulture
- TestOf
- IgnoreUntilDate
In general, these properties were not created with filtering in mind, but you can use them if it suits your needs. Using the Category property currently accomplishes the same thing as the cat keyword. You should be aware that the use of these properties by NUnit is considered an implementation detail and they may change in the future.
We envision that most filtering by property will be based on user-defined properties, created for this purpose by inheriting from Property Attribute. When defining a property, you should keep the limitation to string values in mind. For example, a PriorityAttribute taking values of "High", "Medium" and "Low" could be used for filtering, while one that took the integers 1, 2 and 3 could not.
https://github.com/nunit/docs/wiki/Property-Attribute
Usage Note
The PropertyAttribute is not currently used for any purpose by NUnit itself, other than to display them in the XML output file and in the Test Properties dialog of the gui. You may also use use properties with the --where option on the command-line in order to select tests to run. See Test Selection Language. Note that his filtering will only work for properties where the values have type string.
namespace NUnit.Tests
{
using System;
using NUnit.Framework; [TestFixture, Property("Location", )]
public class MathTests
{
[Test, Property("Severity", "Critical")]
public void AdditionTest()
{ /* ... */ }
}
}
后台所对应的函数
//
// Summary:
// Construct a PropertyAttribute with a name and string value
//
// Parameters:
// propertyName:
// The name of the property
//
// propertyValue:
// The property value
public PropertyAttribute(string propertyName, string propertyValue);
//
// Summary:
// Construct a PropertyAttribute with a name and int value
//
// Parameters:
// propertyName:
// The name of the property
//
// propertyValue:
// The property value
public PropertyAttribute(string propertyName, int propertyValue);
//
// Summary:
// Construct a PropertyAttribute with a name and double value
//
// Parameters:
// propertyName:
// The name of the property
//
// propertyValue:
// The property value
public PropertyAttribute(string propertyName, double propertyValue);
另外还可以继承PropertyAttribute,实现自定义的property attribute
NUnit Console Command Line的更多相关文章
- Chrome console & Command Line API
Chrome console & Command Line API $ && $$ querySelector querySelectorAll Command Line AP ...
- linux & command line & console & logs
linux & command line & console & logs how to get the logs form linux command console htt ...
- Chrome-Console( Command Line API Reference)
来源于:https://developers.google.com/web/tools/chrome-devtools/console/command-line-reference The Comma ...
- logoff remote desktop sessions via command line tools
This trick I learned from my one of ex-college. In Windows servers, only two remote desktop session ...
- MySQL 5.7 Command Line Client输入密码后闪退和windows下mysql忘记root密码的解决办法
MySQL 5.7 Command Line Client输入密码后闪退的问题: 问题分析: 1.查看mysql command line client默认执行的一些参数.方法:开始->所有程序 ...
- Linux Command Line Basics
Most of this note comes from the Beginning the Linux Command Line, Second Edition by Sander van Vugt ...
- Linux Command Line 解析
Linux Command Line 解析 0 处理模型 Linux kernel的启动包括很多组件的初始化和相关配置,这些配置参数一般是通过command line进行配置的.在进行后续分析之前,先 ...
- Xcode 8.X Command Line Tools
Summary Step 1. Upgrade Your System to macOS Sierra Step 2. Open the Terminal Application Step 3. Is ...
- Creating Node.js Command Line Utilities to Improve Your Workflow
转自:https://developer.telerik.com/featured/creating-node-js-command-line-utilities-improve-workflow/ ...
随机推荐
- akka框架——异步非阻塞高并发处理框架
akka actor, akka cluster akka是一系列框架,包括akka-actor, akka-remote, akka-cluster, akka-stream等,分别具有高并发处理模 ...
- java ---书写自己的名字
public class hello { public static void main(String[] args) { // TODO 自动生成的方法存根 System.out.println(& ...
- Mongo连接远程数据库
mongo IP+Port CrabyterV5 首先这么操作是基于配置了环境变量的,可以参照http://www.cnblogs.com/daiyonghui/p/5209076.html mong ...
- spring IOC 装配一个bean
1.0属性注入 新建一个people类 package com.java.test3; /** * @author nidegui * @create 2019-06-22 14:45 */ publ ...
- 卸载hyper-v后 仍然提示 vmware 与 hyper-v 不兼容
已经卸载了hyper-v 仍然提示 vmware 与 hyper-v 不兼容:天天模拟器,提示VT模式没有开启,BIOS里面已经设置过了 环境win10,vm的失败和模拟器的失败都是hyper-v冲突 ...
- Linux之浅谈VIM常见用法及原理图
本次归纳以强大的VIM文本处理工具常见用法去展开论述. 文本编辑种类: 行编辑器:sed 全屏编辑器:nano,vi vim - Vi改进 其他编辑器: ...
- Linux思维导图之用户、组和权限
安全3A: Authenticanion认证:验证用户身份; 授权授权;依据身份进行不同权利的分配.Acouting | 劲舞团审计:监督工作. user:id -u 令牌:(护符)ID号 .Linu ...
- 24.基于groovy脚本进行partial update
主要知识点 在es中其实是有内置的脚本支持的,可以基于groovy脚本实现各种各样的复杂操作 基于groovy脚本,如何执行partial update es scripting module,我们会 ...
- C#学习笔记_03_运算符
03_运算符 算数运算符 + - * / % ++ -- 赋值运算符 = += -= *= /= %= 关系运算符 > < >= <= == != 逻辑运算符 &:逻辑 ...
- poj 2763(LCA + dfs序 +树状数组)
算是模板题了 可以用dfs序维护点到根的距离 注意些LCA的时候遇到MAXM,要-1 #include<cstdio> #include<algorithm> #include ...