OxL Reference

kw test

Reserved keyword

The list of words: §1.4

Syntax

ebnf
Test        = "test" [ TestKind ] StrLit [ "with" EnvList ] [ "seeds" Expr ] Block ;

Grammar: App. A

Defined in

  • 18.5 A/B tests — In oxl test the experiment is run on recorded traffic and compares the metrics of the variants with statistical significance.
  • 18.1 Test declaration — Form: attributes* test kind?
  • 18.4 Simulation — In sim the scheduler, network, clocks, randomness and disk failures are deterministic; the result depends only on the seed.
  • 0.2 Notation — The grammar is written in EBNF (appendix A)
  • 6.7 Contracts — requires is checked on entry, ensures on exit (result is the return value, old(e) is the value of e on entry), invariant (§4.2) — after cons
  • 18.2 Assertions and fixtures — assert expr is executed in all profiles, including prod (profiles switch off only contracts, §6.7, and the output of dbg, §2.2); on failure
  • 1.4 Keywords — Reserved (cannot be used as names)

Examples

oxl
test ab "search v2" {
  variant a = oldSearch
  variant b = newSearch
  split by .User 50/50
  metric ctr, latency.p95
  guard latency.p95 < SEARCH_P95_LIMIT
  traffic recorded("traffic/search.oxlrec")
}

— 18.5 A/B tests

oxl
@tag(slow, db)
test integ "order flow" with cluster(nodes: 3) { … }

— 18.1 Test declaration

Related diagnostics

ab-test-decl, test-decl, contract, fixture-yield

See also