OxL Reference

18.1 Test declaration

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

Form: attributes* test kind? "name" (with environment, …)? (seeds range)? { body }.

KindPurpose
(none) / unitan ordinary in-process test
integwith an environment: an in-process cluster, databases, topics
simdeterministic simulation (§18.4)
contractcompatibility of client and server of different schema versions
abA/B experiment (§18.5)
benchmicro-benchmark
fuzzfuzzing by parameter types
  • A test name is unique within the package. The full name is module::name.
  • Tests and declarations with @test_only do not get into a build without oxl test.
  • @tag(…) — arbitrary labels for selection (part III). @skip("reason") — skipping; @flaky(retries: n) — repeat on failure with a mark in the report.
  • A unit test is executed as a node with the implicit role all and an in-memory built-in storage: services are called in-process, sharded actors are created locally.
  • A test body MAY use ?: an error fails the test with the error and trace printed.
  • asUser(id) { … }, asService(name) { … } — execute a block on behalf of a principal.

test-decl

See also

Source: docs/spec/oxl-standard.en.md