| applyTo | dotnet/test/E2E/**/*.cs |
|---|
- Create and resume sessions through
E2ETestContextusingCtx.CreateSessionAsyncandCtx.ResumeSessionAsync. Do not call these methods directly onCopilotClient; the context applies the backend selected by the E2E matrix while preserving providers explicitly configured by the test. - Create clients with
Ctx.CreateClientso they receive the harness environment, CLI path, authentication defaults, transport handling, and lifecycle tracking. - Instantiate
CopilotClientdirectly only when client construction, startup, shutdown, or disposal is the behavior under test. Keep cleanup explicit in those tests, and still create any sessions throughCtxso they participate in backend coverage.