Gallio.PowerShellCommands Abstract base class for PowerShell commands. Provides some useful runtime support. Posts an action to perform later within the message loop. The action to perform. Starts a message pump running on the current thread and performs the specified action in another thread. The action can asynchronously communicate back to the cmdlet using on the current thread. The action to perform. Aborts the processing of the command. The event dispatches when the command is asynchronously being stopped via . Gets the logger for the cmdlet. Sets whether progress information is shown during the execution. If this option is specified, the execution is silent and no progress information is displayed. This parameter takes the value true if present and false if not. No value has to be specified. # Shows progress information Run-Gallio SomeAssembly.dll # Hides progress information Run-Gallio SomeAssembly.dll -np Gets the progress monitor provider for the cmdlet. The Gallio.PowerShellCommands namespace contains Powershell cmdlets for Gallio. A PowerShell Cmdlet for running Gallio. Only the parameter is required. There are severals ways to run this cmdlet: Default constructor. Provided so that the unit tests can override test execution behavior. The list of relative or absolute paths of test files, projects and assemblies to execute. Wildcards may be used. This is required. There are severals ways to pass the test files to the cmdlet: Run-Gallio cmdlet Run-Gallio at command pipeline position Supply values for the following parameters: Files[0]: ]]> The list of directories used for loading referenced assemblies and other dependent resources. The following example shows how to specify the hint directories: See the property for more ways of passing list of parameters to the cmdlet. Additional Gallio plugin directories to search recursively. The following example shows how to specify the plugin directories: See the property for more ways of passing list of parameters to the cmdlet. Gets or sets the relative or absolute path of the application base directory, or null to use a default value selected by the consumer. If relative, the path is based on the current working directory, so a value of "" causes the current working directory to be used. The default is null. Gets or sets the relative or absolute path of the working directory or null to use a default value selected by the consumer. If relative, the path is based on the current working directory, so a value of "" causes the current working directory to be used. The default is null. Enables shadow copying when set to true. Shadow copying allows the original assemblies to be modified while the tests are running. However, shadow copying may occasionally cause some tests to fail if they depend on their original location. The default is false. Attaches the debugger to the test process when set to true. The default is false. Gets or sets the version of the .Net runtime to use for running tests. For the CLR, this must be the name of one of the framework directories in %SystemRoot%\Microsoft.Net\Framework. eg. 'v2.0.50727'. The default is null which uses the most recent installed and supported framework. A list of the types of reports to generate, separated by semicolons. The types supported "out of the box" are: Html, Html-Inline, Text, XHtml, XHtml-Inline, Xml, and Xml-Inline, but more types could be available as plugins. The report types are not case sensitives. In the following example reports will be generated in both HTML and XML format: See the property for more ways of passing list of parameters to the cmdlet. Sets the format string to use to generate the reports filenames. Any occurence of {0} will be replaced by the date, and any occurrence of {1} by the time. The default format string is test-report-{0}-{1}. Sets the name of the directory where the reports will be put. The directory will be created if it doesn't exist. Existing files will be overwritten. The default report directory is "Reports". Specifies to enclose the resulting reports into a compressed archive file (zip). Sets the filter set to apply, which consists of a sequence of one or more inclusion or exclusion filter rules prefixed using 'include' (optional) or 'exclude'. A filter rule consists of zero or more filter expressions that may be combined using 'and', 'or', and 'not' and grouped with parentheses. A filter expression consists of a filter key followed by one or more comma-delimited matching values in the form 'key: value, "quoted value", /regular expression/'. The filter grammar is defined as follows: ::= [^:,*()/\"']+ ::= '"' .* '"' # String delimited by double quotation marks | "'" .* "'" # String delimited by single quotation marks ::= | ::= "/" .* "/" # Regular expression | "/" .* "/i" # Case-insensitive regular expression ::= ::= # Value specified by exact string | # Value specified by regular expression ::= (',' )* # One or more comma-separated values ::= "*" # "Any" | ":" matchSeq> | OR filterExpr> # Combine filter expressions with OR | AND filterExpr> # Combine filter expressions with AND | NOT # Negate filter expression | "(" ")" # Grouping filter expression ::= # Inclusion rule (default case) | INCLUDE # Inclusion rule | EXCLUDE # Exclusion rule ::= # Filter set consists of at least one filter rule. | # But may be a sequence of rules. ]]> By default this property takes the value "*", which means the "Any" filter will be applied. The operator precedence is, from highest to lowest: NOT, AND, and OR. All these operators are left-associative. The commas used to separate the values are interpreted as OR operators, so "Type:Fixture1,Fixture2" is equivalent to "Type:Fixture1 or Type:Fixture2". White-space is ignored outside quoted strings, so "Type:Fixture1|Type:Fixture2" is equivalent to "Type : Fixture1 | Type : Fixture2". Commas, colons, slashes, backslashes and quotation marks can be escaped with a backslash. For example, \' will be interpreted as '. Using a single backslash in front of any other character is invalid. Currently the following filter keys are recognized: Id: Filter by id. Name: Filter by name. Assembly: Filter by assembly name. Namespace: Filter by namespace name. Type: Filter by type name, including inherited types. ExactType: Filter by type name, excluding inherited types. Member: Filter by member name. *: All other names are assumed to correspond to metadata keys. See for standard metadata keys. Common keys are: AuthorName, Category, Description, Importance, TestsOn. Assuming the following fixtures have been defined: The following filters could be applied: Type: Fixture1 All the tests within Fixture1 will be run. Member: Test1 Only Fixture1.Test1 and Fixture2.Test1 will be run. Type: Fixture1, Fixture2 All the tests within Fixture1 or Fixture2 will be run. Type:Fixture1 or Type:Fixture2 All the tests within Fixture1 or Fixture2 will be run. Type:Fixture1, Fixture2 and Member:Test2 Only Fixture1.Test2 and Fixture2.Test2 will be run. Type:/Fixture*/ and Member:Test2 Only Fixture1.Test2 and Fixture2.Test2 will be run. AuthorName:AlbertEinstein All the tests within Fixture1 will be run because its author attribute is set to "AlbertEinstein". Category: IntegrationTest All the tests within Fixture2 will be run because its category attribute is set to "IntegrationTest". ("Type": 'Fixture1' and "Member":/Test*/) or (Type : Fixture2 and Member: /Test*/) All the tests will be run. This example also shows that you can enclose key and values with quotation marks, and group expressions with parentheses. exclude AuthorName: AlbertEinstein All the tests within Fixture2 will be run because its author attribute is not set to "AlbertEinstein". exclude Type: Fixture2 include Member: Test2 Only Fixture1.Test2 will be run because Fixture2 was excluded from consideration before the inclusion rule was applied. Sets whether to open the generated reports once execution has finished. This parameter takes the value true if present and false if not. No value has to be specified. The reports are opened in a window using the default system application registered to the report file type. Sets the type of test runner to use. The types supported "out of the box" are: Local, IsolatedAppDomain and IsolatedProcess (default), but more types could be available as plugins. The runner types are not case sensitive. Specifies the type, assembly, and parameters of custom test runner extensions to use during the test run. The value must be in the form '[Namespace.]Type,Assembly[;Parameters]' . The following example runs tests using a custom logger extension: Specifies option property key/value pairs for the test runner. The following example specifies some extra NCover arguments. Specifies option property key/value pairs for the report formatter. The following example changes the default attachment content disposition for the reports. Sets whether to load the tests but not run them. This option may be used to produce a report that contains test metadata for consumption by other tools. Sets whether to ignore annotations when determining the result code. If false (default), then error annotations, usually indicative of broken tests, will cause a failure result to be generated. Sets whether to echo results to the screen as tests finish. If this option is specified only the final summary statistics are displayed. Otherwise test results are echoed to the console in varying detail depending on the current verbosity level. Sets the maximum amount of time (in seconds) the tests can run before they are canceled. The default is an infinite time to run. A PowerShell SnapIn that registers the Gallio Cmdlets. Gets the description of the snap-in. Gets the name of the snap-in. Gets the vendor of the snap-in. Logs messages using a 's logging functions. Initializes a new instance of the class. The instance to channel log messages to. Logs a message. The log message severity. The message to log. The exception to log (it can be null). A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Gallio PowerShell Cmdlet - Version {0}.{1} build {2}. Looks up a localized string similar to test-report-{0}-{1}. Looks up a localized string similar to An unexpected error occurred during execution of the Gallio task..