Simplify test framework with process tracking and assertion helpers#647
Merged
RakeshwarK merged 14 commits intomicrosoft:mainfrom Mar 4, 2026
Merged
Simplify test framework with process tracking and assertion helpers#647RakeshwarK merged 14 commits intomicrosoft:mainfrom
RakeshwarK merged 14 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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
CommandExecutionInfoandFixtureTrackingclasses to provide process execution tracking and assertion helpers - Extended
InMemoryProcessManagerwithTrackProcesses()andSetupProcessOutput()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.
src/VirtualClient/VirtualClient.TestFramework/FixtureTracking.cs
Outdated
Show resolved
Hide resolved
added 2 commits
February 26, 2026 20:10
Contributor
There was a problem hiding this comment.
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.
src/VirtualClient/VirtualClient.TestFramework/FixtureTracking.cs
Outdated
Show resolved
Hide resolved
src/VirtualClient/VirtualClient.TestFramework/FixtureTracking.cs
Outdated
Show resolved
Hide resolved
src/VirtualClient/VirtualClient.TestFramework/FixtureTracking.cs
Outdated
Show resolved
Hide resolved
src/VirtualClient/VirtualClient.TestFramework/FixtureTracking.cs
Outdated
Show resolved
Hide resolved
brdeyo
requested changes
Feb 27, 2026
src/VirtualClient/VirtualClient.TestFramework/FixtureTracking.cs
Outdated
Show resolved
Hide resolved
added 2 commits
February 27, 2026 17:29
brdeyo
approved these changes
Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.