Class IgnoreGraphicsTestAttribute
Attribute to mark a test case as ignored for specific nodes or configurations.
Implements
Inherited Members
Namespace: UnityEngine.TestTools.Graphics
Assembly: UnityEngine.TestTools.Graphics.dll
Syntax
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = true)]
public class IgnoreGraphicsTestAttribute : Attribute, ITestAction
Remarks
This attribute can be used to ignore a test case based on the provided pattern. The pattern is matched against the test's full name and the current platform, as well as the global context values. The test case will be ignored if the pattern matches and the platform is included in the specified nodes (or is a subset of the specified nodes).
Constructors
IgnoreGraphicsTestAttribute(string)
Ignore a graphics test case based on the provided data source.
Declaration
public IgnoreGraphicsTestAttribute(string ignoreDataSource)
Parameters
| Type | Name | Description |
|---|---|---|
| string | ignoreDataSource | The assembly-qualified type name of a class that implements IList<T>. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | The type could not be resolved. |
IgnoreGraphicsTestAttribute(string, string, bool, bool, IgnoreGraphicsTestMode, params object[])
Ignore a graphics test case based on the provided pattern.
Declaration
public IgnoreGraphicsTestAttribute(string pattern, string reason, bool isInclusive, bool allowOverrideIgnore, IgnoreGraphicsTestMode matchMode, params object[] platforms)
Parameters
| Type | Name | Description |
|---|---|---|
| string | pattern | The pattern to match against the test case name. |
| string | reason | The reason for ignoring the test case. |
| bool | isInclusive | Whether to include or exclude the test case based on the pattern. |
| bool | allowOverrideIgnore | Whether to allow overriding the ignore attribute through the command line. Set to false the test could never succeed if not ignored (for example, if the platform is incompatible). |
| IgnoreGraphicsTestMode | matchMode | The mode to use for matching the pattern against the test case name. |
| object[] | platforms | The platform enums to match against. These must be enums and each declared as a DataType |
IgnoreGraphicsTestAttribute(string, string, bool, params object[])
Ignore a graphics test case based on the provided pattern, with an option to specify whether the ignore can be overridden.
Declaration
public IgnoreGraphicsTestAttribute(string pattern, string reason, bool isInclusive, params object[] platforms)
Parameters
| Type | Name | Description |
|---|---|---|
| string | pattern | The pattern to match against the test case name. |
| string | reason | The reason for ignoring the test case. |
| bool | isInclusive | Whether to include or exclude the test case based on the pattern. |
| object[] | platforms | The platform enums to match against. These must be enums and each declared as a DataType |
IgnoreGraphicsTestAttribute(string, string, params object[])
Ignore a graphics test case based on the provided pattern.
Declaration
public IgnoreGraphicsTestAttribute(string pattern, string reason, params object[] platforms)
Parameters
| Type | Name | Description |
|---|---|---|
| string | pattern | The pattern to match against the test case name. |
| string | reason | The reason for ignoring the test case. |
| object[] | platforms | The platform enums to match against. These must be enums and each declared as a DataType |
IgnoreGraphicsTestAttribute(Type)
Ignore a graphics test case based on the provided data source.
Declaration
public IgnoreGraphicsTestAttribute(Type ignoreDataSource)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | ignoreDataSource | A type that implements IList<T> and has a public parameterless constructor. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentException | The type does not implement IList<T>, or it cannot be instantiated. |
Properties
Targets
Declaration
public ActionTargets Targets { get; }
Property Value
| Type | Description |
|---|---|
| ActionTargets |
Methods
AfterTest(ITest)
Declaration
public void AfterTest(ITest test)
Parameters
| Type | Name | Description |
|---|---|---|
| ITest | test |
BeforeTest(ITest)
Declaration
public void BeforeTest(ITest test)
Parameters
| Type | Name | Description |
|---|---|---|
| ITest | test |