Skip to content

Live OBS tests in MSTest, coverage gate, and the fixes they found - #45

Merged
Agash merged 4 commits into
masterfrom
feat/coverage-and-integration-tests
Sep 23, 2026
Merged

Agash merged 4 commits into
masterfrom
feat/coverage-and-integration-tests

Conversation

@Agash

@Agash Agash commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Moves the live OBS validation out of the example app and into the test project, and raises coverage to 93.9% line / 80.9% branch on net9, net10 and net11. Those numbers combine the unit tests and the live run.

Tests

  • The request sweeps now run as MSTest integration tests over JSON and MessagePack. The run-transport-tests command is gone from the example app, and the old hand-configured integration class is removed.
  • An in-memory OBS (Fakes/FakeObsServer) speaks the wire protocol, so the handshake, receive loop, reconnects, events, batches and group helpers are tested through the real code without a live OBS.
  • Every protocol event is checked to raise its public event.
  • Every test name follows {Method}_{Scenario}_{ExpectedResult}.

Library fixes the new tests found

  • A rejected identify (close code 4009) is now reported as AuthenticationFailureException and is not retried. Before, a wrong password reconnected indefinitely.
  • With auto-reconnect off, a lost connection now stays lost. Before, it reconnected once after every drop.
  • CanvasCreated, CanvasNameChanged and CanvasRemoved now fire. The event dispatch table is generated from the protocol, so it can't drift again.
  • The record, stream and virtual-camera "and wait" helpers now return null on timeout, as documented. Before, they threw.
  • SourceExistsAsync no longer reports a dropped connection or a timeout as the source not existing.
  • Logging in the groups and hosting now uses [LoggerMessage].

CI

  • The live job runs one framework at a time, since every test host drives the same OBS.
  • It gates line (90%) and branch (80%) coverage on every framework. The previous summary step could not run: a string split across lines made the workflow invalid YAML.
  • It passes Obs.Required=true, so a missing endpoint or fixture fails the run instead of skipping every live test.

@Agash
Agash force-pushed the feat/coverage-and-integration-tests branch from 3843baa to f45a1ae Compare September 23, 2026 03:56
@Agash
Agash merged commit 8e54e40 into master Sep 23, 2026
10 checks passed
@Agash
Agash deleted the feat/coverage-and-integration-tests branch September 23, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant