# LibTmux.Testing.TmuxTestFactory.CreateHierarchyAsync

- **Module:** LibTmux.Testing.TmuxTestFactory
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Testing/TmuxTestFactory.cs#L181
- **Page:** https://libtmux.org/reference/dotnet/libtmux-testing-tmuxtestfactory-createhierarchyasync/

```
LibTmux.Testing.TmuxTestFactory.CreateHierarchyAsync(options: TmuxTestOptions?, cancellationToken: CancellationToken) -> Task<TemporaryHierarchyScope>
```

Starts a server, session, window, and pane a test can type into.

## Parameters

- `options` (TmuxTestOptions?) — How to reach tmux, or null for a socket of its own.
- `cancellationToken` (CancellationToken) — Cancels the tmux commands.

## Returns

The scope owning all four.
