x-pack/platform/packages/shared/kbn-streamlang-tests/README.md
Testing platform for the Streamlang DSL (Domain Specific Language) used in Kibana Streams processing. Comprehensive testing is critical for Streamlang DSL transpilation because it validates the nuanced behavioral differences and edge cases between Ingest Pipeline processors and ES|QL queries, ensuring that the same DSL logic produces consistent results across both execution environments while identifying and documenting limitations.
This package serves as an independent testing environment for the @kbn/streamlang package. It was created as a separate package to avoid circular dependency issues which could easily arise when tests are co-located with the main Streamlang implementation (given @kbn-streamlang is a "shared-common" package imported by streams plugins).
One such circular dependency chain is illustrated below:
graph TD
A["@kbn/streamlang"] -->|_imports for co-living tests_| B["@kbn/scout"]
B -.->|_optional: @kbn/scout-synthtrace_| C["@kbn/synthtrace"]
C -->|_imports_| D["@kbn/streams-schema"]
D -->|_imports_| A
style A fill:#555577
style D fill:#555577
linkStyle 0 stroke-width: 2px, font-size: 8px;
classDef circular stroke:#ff0000,stroke-width:2px,stroke-dasharray: 5 5
class A,D circular
Why this package exists (dependency story):
@kbn/streamlang tests want @kbn/scout for Playwright helpers@kbn/scout no longer depends on @kbn/synthtrace (synthtrace is in @kbn/scout-synthtrace)@kbn/scout still pulled @kbn/synthtrace unconditionally, you could get: @kbn/synthtrace → @kbn/streams-schema → @kbn/streamlang ← cycleBy isolating the test code into this independent package:
This separation offers additional opportunities:
@kbn/streamlang package maintains a clean public API without test artifactsFor detailed instructions on running the Streamlang DSL end-to-end tests, see:
Scout API Tests - Contains instructions for running both ESS (Elastic Stack Service) and Serverless test suites.