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/ ...
随机推荐
- CAGradientLayer 颜色渐变实现进度条
#import <UIKit/UIKit.h> @interface TJGradientProgressView : UIView /** * 进度值 */ @property(nona ...
- java Queue中 remove/poll, add/offer, element/peek区别
offer,add区别: 一些队列有大小限制,因此如果想在一个满的队列中加入一个新项,多出的项就会被拒绝. 这时新的 offer 方法就可以起作用了.它不是对调用 add() 方法抛出一个 unche ...
- Android Studio 将module打成jar包
1.新建测试工程,工程里面有两个module,app是Android工程,mylibrary是Android Library库. 2.打开mylibrary目录下的build.gradle文件,加入下 ...
- 【PostgreSQL-9.6.3】表继承
表继承是PostgreSQL特有的,子表可以从父表中继承字段和一些属性.例如: --创建一张表“persons”作为父表: test=# create table persons ( test(# i ...
- Dynamics CRM查询实体共享给哪些人
在mscrm中,如果想查询一条记录共享给了哪些人,需要用到PrincipalObjectAccess 表,sql如下: select u.FullName,a.RC_name,sup.SystemUs ...
- redis 主从复制 redis 探索
http://blog.csdn.net/column/details/12804.html
- 推荐系统:MovivLens20M数据集解析
MovieLens 是历史最悠久的推荐系统.它由美国 Minnesota 大学计算机科学与工程学院的 GroupLens 项目组创办,是一个非商业性质的.以研究为目的的实验性站点.MovieLens ...
- ubuntu 14.04安装x11VNC
环境:Ubuntu 14.04, 1)安装x11vnc: sudo apt-get install x11vnc 2)设置VNC的连接密码: x11vnc -storepasswd Enter VNC ...
- dispatch_sync:As an optimization, this function invokes the block on the current thread when possible
两件事情: 1.是否是一个线程: 2.queue task 的目标线程是否有未完成的task. 模型:一个线程处理当前的task还有通过gc d派发来的待执行task. 猜测: 如果目标thread上 ...
- http 请求头示例
POST /3-0/app/account/item HTTP/1.1 Host 10.100.138.32:8046 Content-Type application/json Accept-E ...