Split unit and integration/E2E tests into separate Mill modules #23

Open
opened 2026-04-04 20:17:42 +00:00 by mprihoda · 0 comments
mprihoda commented 2026-04-04 20:17:42 +00:00 (Migrated from github.com)

Problem

Unit tests and integration/E2E tests are mixed in the same test modules (core.test, direct.test, effectful.test). This makes it impossible to run only fast unit tests pre-push while deferring slow tests (process spawning, real CLI) to CI.

Proposed Solution

Add itest (or similar) modules to Mill for each top-level module:

  • core.itestSDKUserMessageRoundTripTest, SDKUserMessageE2ETest
  • direct.itestClaudeCodeIntegrationTest, ClaudeCodeStreamingTest, process-spawning tests from ProcessManagerTest, EnvironmentTest
  • effectful.itestClaudeCodeIntegrationTest, environment/security tests

This enables:

  • ./mill __.test — fast unit tests (pre-push hook)
  • ./mill __.itest — integration/E2E tests (CI only)

Files to move

Current integration/E2E tests mixed into unit test modules:

  • core/test/src/.../SDKUserMessageRoundTripTest.scala
  • core/test/src/.../SDKUserMessageE2ETest.scala
  • direct/test/src/.../ClaudeCodeIntegrationTest.scala
  • direct/test/src/.../ClaudeCodeStreamingTest.scala
  • effectful/test/src/.../ClaudeCodeIntegrationTest.scala
  • Several environment/process tests that spawn real processes
## Problem Unit tests and integration/E2E tests are mixed in the same `test` modules (`core.test`, `direct.test`, `effectful.test`). This makes it impossible to run only fast unit tests pre-push while deferring slow tests (process spawning, real CLI) to CI. ## Proposed Solution Add `itest` (or similar) modules to Mill for each top-level module: - `core.itest` — `SDKUserMessageRoundTripTest`, `SDKUserMessageE2ETest` - `direct.itest` — `ClaudeCodeIntegrationTest`, `ClaudeCodeStreamingTest`, process-spawning tests from `ProcessManagerTest`, `EnvironmentTest` - `effectful.itest` — `ClaudeCodeIntegrationTest`, environment/security tests This enables: - `./mill __.test` — fast unit tests (pre-push hook) - `./mill __.itest` — integration/E2E tests (CI only) ## Files to move Current integration/E2E tests mixed into unit test modules: - `core/test/src/.../SDKUserMessageRoundTripTest.scala` - `core/test/src/.../SDKUserMessageE2ETest.scala` - `direct/test/src/.../ClaudeCodeIntegrationTest.scala` - `direct/test/src/.../ClaudeCodeStreamingTest.scala` - `effectful/test/src/.../ClaudeCodeIntegrationTest.scala` - Several environment/process tests that spawn real processes
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
iterative-works/claude-code-query#23
No description provided.