optimism

op-e2e

Issues: monorepo

Pull requests: monorepo

Design docs:

test infra draft design-doc

op-e2e is a collection of Go integration tests. It is named e2e after end-to-end testing, for those tests where we integration-test the full system, rather than only specific services.

Quickstart

just test-actions
just test-ws

Overview

op-e2e can be categorized as following:

Generating Binding

Bindings for a contract can be generated (or updated) using

just gen-binding OPContractsManager

action-tests

Action tests are set up in a compositional way: each service is instantiated as actor, and tests can choose to run just the relevant set of actors. E.g. a test about data-availability can instantiate the batcher, but omit the proposer.

One action, across all services, runs at a time. No live background processing or system clock affects the actors: this enables individual actions to be deterministic and reproducible.

With this synchronous processing, action-test can reliably navigate towards these otherwise hard-to-reach edge-cases, and ensure the state-transition of service, and the interactions between this state, are covered.

Action-tests do not cover background processes or peripherals. E.g. P2P, CLI usage, and dynamic block building are not covered.

system-tests

[!IMPORTANT] System tests are deprecated. While existing tests should continue to be maintained, any net-new tests should be added in op-acceptance-tests instead.

System tests are more complete than action tests, but also require a live system. This trade-off enables coverage of most of each Go service, at the cost of making navigation to cover the known edge-cases less reliable and reproducible. This test-type is thus used primarily for testing of the offchain service aspects.

By running a more full system, test-runners also run into resource-limits more quickly. This may result in lag or even stalled services. Improvements, as described in the test infra draft design-doc, are in active development, to make test execution more reliable.

op-e2e/opgeth

Integration-testing with op-geth, to cover engine behavior, without setting up a full test environment. These tests are limited in scope, and may be changed at a later stage, to support alternative EL implementations.

Product

Optimization target

Historically op-e2e has been optimized for test-coverage of the Go OP-Stack. This is changing with the advance of alternative OP-Stack client implementations.

New test framework improvements should optimize for multi-client testing.

Vision

Generally, design-discussion and feedback from active test users converges on:

Design principles