|
1 | | -## Chainlink Testing Framework Harness |
| 1 | +# Framework |
2 | 2 |
|
3 | | -<!-- TOC --> |
4 | | -* [CLI](./cmd/README.md) |
5 | | -* [Components](./COMPONENTS.md) |
6 | | -* [Configuration](./CONFIGURATION.md) |
7 | | -* [Caching](./CACHING.md) |
8 | | -* [Local Observability Stack](./cmd/observability/README.md) |
9 | | -* [Examples](https://github.com/smartcontractkit/chainlink/tree/8e8597aa14c39c48ed4b3261f6080fa43b5d7cd0/e2e/capabilities) |
10 | | -<!-- TOC --> |
| 3 | +Modular and data-driven harness for Chainlink on-chain and off-chain components. |
11 | 4 |
|
12 | | -This module includes the CTFv2 harness, a lightweight, modular, and data-driven framework designed for combining off-chain and on-chain components while implementing best practices for end-to-end system-level testing: |
13 | | - |
14 | | -- **Non-nil configuration**: All test variables must have defaults, automatic validation. |
15 | | -- **Component isolation**: Components are decoupled via input/output structs, without exposing internal details. |
16 | | -- **Modular configuration**: No arcane knowledge of framework settings is required; the config is simply a reflection of the components being used in the test. Components declare their own configuration—'what you see is what you get.' |
17 | | -- **Replaceability and extensibility**: Since components are decoupled via outputs, any deployment component can be swapped with a real service without altering the test code. |
18 | | -- **Caching**: any component can use cached configs to skip environment setup for faster test development |
19 | | -- **Integrated observability stack**: use `ctf obs up` to spin up a local observability stack. |
20 | | - |
21 | | - |
22 | | -### Environment variables (Tests, when using in Go code) |
23 | | -| Name | Description | Possible values | Default | Required? | |
24 | | -|:----------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------:|-------------------------:|:-------:|:------------------------:| |
25 | | -| CTF_CONFIGS | Path(s) to test config files. <br/>Can be more than one, ex.: smoke.toml,smoke_1.toml,smoke_2.toml.<br/>First filepath will hold all the merged values | Any valid TOML file path | | ✅ | |
26 | | -| CTF_LOG_LEVEL | Harness log level | `info`, `debug`, `trace` | `info` | 🚫 | |
27 | | -| CTF_LOKI_STREAM | Streams all components logs to `Loki`, see params below | `true`, `false` | `false` | 🚫 | |
28 | | -| LOKI_URL | URL to `Loki` push api, should be like`${host}/loki/api/v1/push` | URL | - | If you use `Loki` then ✅ | |
29 | | -| LOKI_TENANT_ID | Streams all components logs to `Loki`, see params below | `true`, `false` | - | If you use `Loki` then ✅ | |
30 | | -| TESTCONTAINERS_RYUK_DISABLED | Testcontainers-Go reaper container, removes all the containers after the test exit | `true`, `false` | `false` | 🚫 | |
31 | | -| RESTY_DEBUG | Log all Resty client HTTP calls | `true`, `false` | `false` | 🚫 | |
| 5 | +[](http://localhost:9999/framework/overview.html) |
0 commit comments