Skip to content

Build out examples/documentation for unit testing Workflows/activities#1708

Merged
WhitWaldo merged 14 commits intodapr:masterfrom
daanschutte:daanschutte/workflow-tests
Feb 23, 2026
Merged

Build out examples/documentation for unit testing Workflows/activities#1708
WhitWaldo merged 14 commits intodapr:masterfrom
daanschutte:daanschutte/workflow-tests

Conversation

@daanschutte
Copy link
Contributor

Description

Improves testing examples for Dapr Workflows by adding test coverage for additional concepts and fixing documentation issues.

  • Changes to the README:
    • Corrected the port to match the default
    • Reordered startup sequence to prevent launch errors (start Dapr sidecar before program)
    • Added a table to expand on which concepts are tested
  • Added more tests
    • TestHighCostOrderApproved: Mock external events (WaitForExternalEventAsync) and verify custom status
    • TestHighCostOrderApprovalTimeout: Simulate timeouts with TaskCanceledException
    • TestActivityException: Simulate activity failures with WorkflowTaskFailedException
  • Dropped unused test file

Issue reference

Addresses #1532 by improving test coverage. Additional improvements may be needed - open to suggestions.

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@daanschutte daanschutte requested review from a team as code owners February 13, 2026 05:39
@daanschutte daanschutte force-pushed the daanschutte/workflow-tests branch from 1fc211a to 5936958 Compare February 13, 2026 05:45
Signed-off-by: Daan Schutte <daan.schutte@icloud.com>
Signed-off-by: Daan Schutte <daan.schutte@icloud.com>
Signed-off-by: Daan Schutte <daan.schutte@icloud.com>
Signed-off-by: Daan Schutte <daan.schutte@icloud.com>
Signed-off-by: Daan Schutte <daan.schutte@icloud.com>
Signed-off-by: Daan Schutte <daan.schutte@icloud.com>
Signed-off-by: Daan Schutte <daan.schutte@icloud.com>
Signed-off-by: Daan Schutte <daan.schutte@icloud.com>
@daanschutte daanschutte force-pushed the daanschutte/workflow-tests branch from 41c5400 to ffd3857 Compare February 14, 2026 05:12
Copy link
Contributor

@WhitWaldo WhitWaldo left a comment

Choose a reason for hiding this comment

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

First of all, thank you for the contribution! Examples that improve understanding of how to test workflows are definitely lacking in the repository, so I appreciate you spotting and remedying that!

If you could fix the spelling typo, I'd be happy to merge this.

WhitWaldo and others added 4 commits February 22, 2026 13:31
* Collapsed available strategies to just Numeric, Date and SemVer and normalized the options between each for similar support. Updated tests accordingly.
* Added missing prefix support for date version strategy

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added support for a property that can be placed in the entry application csproj that enables the automatic discovery and import of workflows across multiple projects
* Added built-in package reference to `Dapr.Workflow.Abstractions`

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updating to exclude Dapr.Workflow.Versioning.Abstractions,Dapr.Workflow.Versioning.Generators, and Dapr.Workflow.Versioning.Runtime projects from being deployed to NuGet.
* Removed requirement that to discover packages requires a release tag, but left this in place for Publish Packages

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Daan Schutte <daan.schutte@icloud.com>
@daanschutte
Copy link
Contributor Author

Fixed the typo, don't have the time now but will look at the merge conflict later!

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.

2 participants