Skip to content

.NET Workflows - Add unit tests for QuestionExecutor - #3892

Merged
Chris (crickman) merged 10 commits into
mainfrom
copilot/add-unit-test-class-for-questionexecutor
Feb 17, 2026
Merged

.NET Workflows - Add unit tests for QuestionExecutor#3892
Chris (crickman) merged 10 commits into
mainfrom
copilot/add-unit-test-class-for-questionexecutor

Conversation

CopilotAI commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

QuestionExecutor lacked unit test coverage.

Description

Created QuestionExecutorTest with 100% coverage.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

CopilotAIand others added 2 commits February 12, 2026 18:59
Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
…e logic
Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
CopilotAI changed the title [WIP] Add unit test class for QuestionExecutorAdd comprehensive unit tests for QuestionExecutorFeb 12, 2026
@crickmanChris (crickman) changed the title Add comprehensive unit tests for QuestionExecutor.NET Workflows - Add unit tests for QuestionExecutorFeb 13, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds unit test coverage for the declarative workflow QuestionExecutor and adjusts executor behavior to align with the tested scenarios.

Changes:

  • Added a new QuestionExecutorTest suite covering step naming, completion detection, execute/prepare/capture/complete handlers, autosend behavior, and repeat-count scenarios.
  • Updated QuestionExecutor logic for prompting decisions (AlwaysPrompt + SkipQuestionMode + variable state).
  • Updated QuestionExecutor capture/prompt handling to avoid null-prompt crashes and to handle missing default values when repeat count is exceeded.

Reviewed changes

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

FileDescription
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/QuestionExecutorTest.csNew unit test suite covering QuestionExecutor execution paths and handler behaviors.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/ObjectModel/QuestionExecutor.csBehavior updates to prompting decision logic, capture assignment null-safety, and repeat-count/default handling.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NETUsage: [Issues, PRs], Target: .NetworkflowsUsage: [Issues, PRs], Target: Workflows

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants

@alliscode@crickman@peibekwe@markwallace-microsoft