Skip to content

Simplify test framework with process tracking and assertion helpers#647

Merged
RakeshwarK merged 14 commits intomicrosoft:mainfrom
RakeshwarK:TestImprov
Mar 4, 2026
Merged

Simplify test framework with process tracking and assertion helpers#647
RakeshwarK merged 14 commits intomicrosoft:mainfrom
RakeshwarK:TestImprov

Conversation

@RakeshwarK
Copy link
Contributor

Introduces reusable process tracking and assertion infrastructure to the test framework. Applied to Redis workload tests as a proof-of-concept before extending solution-wide.

Rakeshwar Reddy Kambaiahgari and others added 2 commits February 25, 2026 20:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces reusable test infrastructure for tracking process executions and validating commands in tests. The new infrastructure simplifies test code by replacing manual command list management with fluent assertion helpers.

Changes:

  • Added CommandExecutionInfo and FixtureTracking classes to provide process execution tracking and assertion helpers
  • Extended InMemoryProcessManager with TrackProcesses() and SetupProcessOutput() methods for fluent test setup
  • Refactored Redis workload tests (unit and functional) to use the new infrastructure, demonstrating cleaner and more maintainable test code

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/VirtualClient/VirtualClient.TestFramework/CommandExecutionInfo.cs New data class capturing command execution details (command, arguments, process reference, timing)
src/VirtualClient/VirtualClient.TestFramework/FixtureTracking.cs New tracking class with assertion methods (AssertCommandsExecuted, AssertCommandsExecutedInOrder, AssertCommandExecutedTimes)
src/VirtualClient/VirtualClient.TestFramework/InMemoryProcessManager.cs Added TrackProcesses and SetupProcessOutput methods, refactored CreateProcess to use CreateDefaultProcess helper
src/VirtualClient/VirtualClient.TestFramework/MockFixture.cs Added Tracking property and fluent wrapper methods (TrackProcesses, SetupProcessOutput)
src/VirtualClient/VirtualClient.TestFramework/DependencyFixture.cs Added Tracking property and fluent wrapper methods (TrackProcesses, SetupProcessOutput)
src/VirtualClient/VirtualClient.Actions.UnitTests/Redis/RedisServerExecutorTests.cs Refactored to use new tracking infrastructure, replacing manual List management with AssertCommandsExecutedInOrder
src/VirtualClient/VirtualClient.Actions.UnitTests/Redis/RedisBenchmarkClientExecutorTests.cs Refactored to use new tracking infrastructure, simplified test setup with SetupProcessOutput
src/VirtualClient/VirtualClient.Actions.FunctionalTests/Redis/RedisServerProfileTests.cs Refactored to use new tracking infrastructure, removed manual InMemoryProcess setup
src/VirtualClient/VirtualClient.Actions.FunctionalTests/Redis/RedisClientProfileTests.cs Refactored to use new tracking infrastructure, removed [Ignore] attribute from previously skipped test

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 11 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RakeshwarK RakeshwarK marked this pull request as ready for review February 27, 2026 14:49
@RakeshwarK RakeshwarK enabled auto-merge (squash) February 28, 2026 00:20
@RakeshwarK RakeshwarK disabled auto-merge February 28, 2026 00:22
@RakeshwarK RakeshwarK requested a review from brdeyo March 2, 2026 19:33
@RakeshwarK RakeshwarK merged commit 6ff0a27 into microsoft:main Mar 4, 2026
5 checks passed
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.

3 participants