Skip to content

Feature Attribute

Averrunci edited this page Jun 7, 2022 · 4 revisions

This attribute specifies a class as a feature fixture.

Carna searches a class specified by this attribute and fixtures that it contains as a fixture to be run. But a nested class specified by this attribute is excluded.

The available properties are as follows.

Property Description
Description Specifies a description of a fixture.
Fixtures Specifies types of fixtures that are contained by a fixture.
Tag Specifies a tag to filter a fixture.
Benefit Specifies a benefit about a fixture.
Role Specifies a role about a fixture.
Feature Specifies a feature about a fixture.
CanRunParallel Specifies a value that indicates whether child fixtures can be run in parallel. The default value is false.
IsRootFixture Specifies a value that indicates whether this fixture is searched as a fixture to be run. The default value is true.
RequiresSta Specifies a value that indicates whether to run this fixture in a single thread apartment. The default value is false.

For examlple:

[Feature(
    "Online membership renewal",
    Benefit = "to reduce lost sales from lapsing memberships",
    Role = "Flying High sales manager",
    Feature = "members to be able to renew their membership online"
)]
class OnlineMembershipRenewalFeature
{
    ...
}
Clone this wiki locally