temporalio / temporalio/sdk-typescript

[Feature Request] Refactor integration-test architecture, taxonomy, and coverage strategy

Open
#2,383 0 comments 0 reactions 1 assignee View on GitHub

@THardy98 is already working on this.

Since Sep 8, 2026.

enhancement
Dominant language
TypeScript
Stars
917
Forks
224
Avg merge
3d 16h
Merged PRs (30d)
43

Description

Problem

The integration suite uses inconsistent setup and ownership patterns. Shared helpers hide file-level AVA hooks, the multi-codec harness runs hidden concurrent work, several large files cover unrelated behavior, and filenames carry an increasingly unclear mix of product area and execution requirements.

The repository also lacks a clear coverage strategy. Line coverage is useful for pure SDK code, but it does not show whether server capabilities, authentication modes, codec paths, or deterministic replay are exercised.

Proposed direction

  • Define one preferred fixture pattern with explicit ownership of the environment, client, Worker, converter, task queue, setup, and teardown.
  • Represent codec variants as independently named AVA cases with isolated routing and results.
  • Organize tests by behavior or product domain and establish a practical suite-sizing guideline using case count and measured duration.
  • Keep Cloud eligibility machine-checkable while the taxonomy evolves.
  • Combine line and branch coverage with integration capability, runtime/authentication, scenario, and replay coverage.

Migration should be incremental. Mechanical file movement should remain separate from behavior changes, and coverage instrumentation should not be used for performance measurements.

Done when

  • The preferred fixture API and migration guidance are documented.
  • Parameterized cases have independent names, routing, failures, and cleanup.
  • Test files follow an agreed taxonomy and sizing guideline.
  • Coverage reports explain which behaviors each metric does and does not represent.
  • Refactors preserve existing assertions and local/Cloud behavior.

Related work

  • Parent tracker: #2381
  • Cloud adaptation: #2326

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.