Skip to content

Latest commit

 

History

History
66 lines (49 loc) · 1.52 KB

File metadata and controls

66 lines (49 loc) · 1.52 KB

Traits

Add traits to tests to annotate them or customize their behavior.

Overview

Pass built-in traits to test functions or suite types to comment, categorize, classify, and modify runtime behaviors. You can also use the Trait, TestTrait, and SuiteTrait protocols to create your own types that customize the behavior of test functions.

Topics

Customizing runtime behaviors

  • doc:EnablingAndDisabling
  • doc:LimitingExecutionTime
  • Trait/enabled(if:_:sourceLocation:)
  • Trait/enabled(_:sourceLocation:_:)
  • Trait/disabled(_:sourceLocation:)
  • Trait/disabled(if:_:sourceLocation:)
  • Trait/disabled(_:sourceLocation:_:)
  • Trait/timeLimit(_:)

Running tests serially or in parallel

  • doc:Parallelization
  • Trait/serialized

Annotating tests

  • doc:AddingTags
  • doc:AddingComments
  • doc:AssociatingBugs
  • doc:BugIdentifiers
  • Tag()
  • Trait/bug(_:_:)
  • Trait/bug(_:id:_:)-10yf5
  • Trait/bug(_:id:_:)-3vtpl

Creating custom traits

  • Trait
  • TestTrait
  • SuiteTrait
  • TestScoping

Supporting types

  • Bug
  • Comment
  • ConditionTrait
  • ParallelizationTrait
  • Tag
  • Tag/List
  • TimeLimitTrait