---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.3
alternate:
  - https://ytsaurus.tech/docs/en/flow/contributor/testing-framework.md
  - https://ytsaurus.tech/docs/ru/flow/contributor/testing-framework.md
  - href: https://ytsaurus.tech/docs/en/flow/contributor/testing-framework.md
    type: text/markdown
    title: Markdown version
  - href: https://ytsaurus.tech/docs/en/llms.txt?revision=181542d8c2d9f36be925894a517db8203cafae65
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://ytsaurus.tech/docs/en/llms.txt?revision=181542d8c2d9f36be925894a517db8203cafae65

<!-- source: en/_includes/flow/contributor/testing-framework.md -->
# Flow pipeline testing framework

This page describes how to set up a workstation and configure low-level parameters for contributors who are improving Flow itself and running its integration test suite. If you're a pipeline author testing your code, see [Testing (C++)](https://ytsaurus.tech/docs/en/flow/cpp/testing.md), [Testing (Java)](https://ytsaurus.tech/docs/en/flow/java/testing.md), [Testing (Go)](https://ytsaurus.tech/docs/en/flow/go/testing.md), and [Testing (Python)](https://ytsaurus.tech/docs/en/flow/python/testing.md) — these pages include the launch parameters and techniques you need for pipeline tests.

## Environment setup {#setup}

The Flow test suite captures Flow process crashes and extracts backtraces from coredumps. For this to work, you must enable coredump collection on your machine:

```bash
# Temporary (it’s better to add this to ~/.bashrc).
ulimit -c unlimited
```

Also, add the process PID to the coredump filename:

```bash
# Temporary — valid until reboot:
sudo sysctl -w kernel.core_uses_pid=1

# Permanent:
echo "kernel.core_uses_pid=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
```

Without `core_uses_pid=1`, you might see odd behavior, such as extracting multiple backtraces from a single coredump.


## Flow test parameters {#test-param}

In addition to the general parameters (see [Testing (C++)](https://ytsaurus.tech/docs/en/flow/cpp/testing.md#debug-test-framework)), these parameters are useful when you’re working on Flow itself — they affect the framework’s internal behavior:

#|
|| **Parameter** | **Default** | **Values** | **Action** ||
|| `DUMP_BACKTRACES_IF_HANGS` | `0` | `0`, `1` | Write backtraces of threads and fibers from running Flow processes to disk when an unhandled `WaitFailed` occurs during shutdown. ||
|| `FLOW_BINARY_PATH` | | Absolute path | Use a fixed pipeline binary — for example, one built with a thread sanitizer. ||
|| `ERROR_BACKTRACE_ENRICHER_LEVEL` | `enabled_for_not_native_errors` | [see enum](https://github.com/ytsaurus/ytsaurus/tree/main/yt/yt/flow/cpp/misc/error_backtrace_enricher.h) | Controls whether backtraces are added to errors in the logs. ||
|#

Examples:

```bash
ya make -A --test-param ERROR_BACKTRACE_ENRICHER_LEVEL=enabled_for_all
ya make -A --test-param DUMP_BACKTRACES_IF_HANGS=1
```
<!-- endsource: en/_includes/flow/contributor/testing-framework.md -->