Skip to content

Attributes

Per-section execution modifiers using #[name(value)] syntax.

When to use

  • Skip a section during execution (#[skip])
  • Set per-section timeout (#[timeout(10)])
  • Retry a section on failure (#[retry(3)])
  • Override display name in reports (#[name(Login flow)])

Syntax

Attributes are placed on a separate line immediately before a section header:

php
#[skip]
--- REQUEST ---
{
  "user_id": "123"
}

Multiple attributes can be applied to one section:

php
#[timeout(10)]
#[retry(2)]
--- REQUEST ---
{
  "query": "slow search"
}

Supported attributes

AttributeValueDescription
#[skip]flag (or #[skip(true)])Skip this section during execution
#[timeout(N)]secondsPer-section timeout for gRPC request
#[retry(N)]countRetry section on failure with 100ms × attempt delay
#[retry_delay(N)]seconds (non-negative)Delay between retry attempts (overrides the default 100ms × attempt backoff)
#[no_retry]flag (or #[no_retry(true)])Disable retries for this section, even if #[retry(N)]/OPTIONS.retry would otherwise apply
#[repeat(N)]positive integerRe-execute this section N times in a row (e.g. re-send a REQUEST, or re-check a RESPONSE/ASSERTS, repeatedly within the same test)
#[compression(none|gzip)]none or gzipPer-section compression override, same values as OPTIONS.compression
#[name(...)]stringDisplay name for this section in reports
#[tag(...)]comma-separated stringTest tags for --tags/--skip-tags filtering — used only when the file has no META.tags
#[owner(...)]stringTest owner — used only when the file has no META.owner
#[summary(...)]stringHuman-readable test summary — used only when the file has no META.summary

Inheritance

Attributes inherit between sections. A child section can override a parent's attribute:

php
#[timeout(30)]
--- REQUEST ---
{
  "user_id": "1"
}

--- RESPONSE ---
{
  "id": "1"
}

#[timeout(5)]
--- REQUEST ---
{
  "user_id": "2"
}

In this example:

  • First REQUEST inherits timeout(30)
  • Second REQUEST overrides with timeout(5)

Skip behavior

#[skip] is a boolean flag. Both forms are equivalent:

php
#[skip]
--- REQUEST ---
{}
php
#[skip(true)]
--- REQUEST ---
{}

A skipped section is ignored during execution. The test continues with subsequent sections.

Examples

Retry flaky assertions

php
--- ENDPOINT ---
user.UserService/GetUser

#[retry(3)]
--- REQUEST ---
{
  "user_id": "123"
}

--- ASSERTS ---
.status == "active"

Timeout for slow endpoints

php
--- ENDPOINT ---
search.SearchService/Search

#[timeout(60)]
--- REQUEST ---
{
  "query": "complex aggregation"
}

Rules

  • One attribute per line
  • Attribute must appear on the line immediately before --- SECTION ---
  • Attributes apply to the section that follows them
  • Values are strings by default; numbers are parsed from the value
  • Quoted strings are supported: #[name("My Test")]
  • Runtime attribute naming follows snake_case (#[retry_delay], #[no_retry])
  • META — file-level metadata (tags, owner, summary)
  • OPTIONS — global execution options
  • Runtime precedence quick map:
    • run: section attributes > OPTIONS > CLI runtime baseline/defaults
    • bench: CLI bench flags > BENCH section > bench defaults
  • Report Formats

Released under the MIT License.