Custom attributes
As a part of Unity Test Framework's public API we provide the following attributes:
Attributes
Attribute | Description |
---|---|
ParameterizedIgnore |
A custom alternative to NUnit Ignore that allows ignoring tests based on parameters passed to the test method. See Parameterized |
PostBuildCleanup |
Make changes to Unity or the file system after building. See Setup and cleanup at build time. |
PrebuildSetup |
Make changes to Unity or the file system before building. See Setup and cleanup at build time. |
PreservedValues |
Like NUnit Values this is used to provide literal arguments for an individual test parameter. See Preserved |
RequirePlatformSupport |
Require Player build support for the specified platforms in order to run tests. See Require |
RequiresPlayMode |
Can be applied to an assembly, fixture, or individual test to indicate that tests under its scope should (or should not) run in the Editor's Play Mode. See Requires |
TestMustExpectAllLogs |
Enforces that every log entry must be expected for a test to pass. See Test |
TestPlayerBuildModifier |
Modify Player build options or split build and run. See Test |
TestRunCallback |
Assembly level attribute used to subscribe a given type to updates on the test progress. See Test |
UnityPlatform |
Define which platforms tests should run on. See Unity |
UnitySetUp |
Unity extension of NUnit SetUp to allow Unity yield instructions. See Actions outside tests. |
UnityTearDown |
Unity extension of NUnit TearDown to allow Unity yield instructions. Actions outside tests. |
UnityTest |
Unity extension of NUnit Test to allow skipping frames and Unity yield instructions. See Unity |