tracera library

The customer surface of the Tracera Autotest adapters for Dart: bind, steps, comments, errors, attachments and context pinning.

Import it with a prefix so the calls read the same as in every other language:

import 'package:tracera/tracera.dart' as tracera;

tracera.step('open the cart', () {
  tracera.comment('sandbox gateway');
});

Runner wiring (session lifecycle, phases, payload shaping) lives in package:tracera/plugin.dart and is used by the runner packages — not by test authors.

Customer how-to: https://tracera.dev/docs/adapters

Classes

AttachmentMeta
References an uploaded blob on a step or on the result.
TestContext
Opaque customer pin for getContext / runWithContext.

Functions

attachment(AttachmentMeta meta) → void
Attaches a blob that is already uploaded (you hold its Tracera attachment id) to the open step, or to the result when no step is open.
attachmentBytes(String fileName, List<int> data, {String? mimeType}) → void
Attaches in-memory bytes to the open step, or to the result when no step is open.
attachmentFile(String path, {String? mimeType}) → void
Attaches a file from disk to the open step, or to the result when no step is open.
comment(String text) → void
Adds text to the open step, or to the result when no step is open.
error(String text) → void
Adds error text to the open step, or to the result when no step is open.
getContext() → TestContext?
Returns the pin for the current async context, or null outside a reported test.
runWithContext<T>(TestContext? ctx, T body()) → T
Pins ctx for the duration of body by forking a zone.
step<T>(String title, T body()) → T
Records body as a reported step.
testCase(int testCaseId, [String? name]) → void
Binds the running test to a Tracera test case id, with an optional result name.