Skip to content

Add API for In-process Testing and Add Class-Syntax Integration Tests#476

Merged
nytian merged 17 commits into
mainfrom
nytian/class-syntax-test
Oct 27, 2025
Merged

Add API for In-process Testing and Add Class-Syntax Integration Tests#476
nytian merged 17 commits into
mainfrom
nytian/class-syntax-test

Conversation

@nytian

@nytian nytian commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

This PR Introduce a new api and package DurableTaskTestHost for customer to test their orchestrations in-process

  • DurableTaskTestHost: A wrapper around the gRPC Fixture that provides a simple API for testing orchestrations and activities in-process without external dependencies
  • DurableTaskTestHost.README.md: Doc explaining how to use the API
  • InProcessTestHost.Tests :test for this new added api and also samples.
  • ClassSyntaxIntegrationTests: Integration tests for class-based orchestrator and activity

@cgillum

cgillum commented Oct 10, 2025

Copy link
Copy Markdown
Member

Is the goal of this feature to ship it as a public package for other developers to use? If so, we should put this in its own project and make it into a nuget package. But let me know if that was the intention here, or if it's something different.

@nytian
nytian marked this pull request as draft October 15, 2025 00:24
@nytian
nytian marked this pull request as ready for review October 15, 2025 16:08
Comment thread src/InProcessTestHost/InProcessTestHost.csproj Outdated
/// </summary>
public class ClassSyntaxIntegrationTests : IntegrationTestBase
{
public ClassSyntaxIntegrationTests(ITestOutputHelper output, GrpcSidecarFixture sidecarFixture)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is the GrpcSidecarFixture using the new test host internally?

@nytian nytian Oct 20, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think so, DurableTaskTestHost is like the combination of GrpcSidecarFixture and IntegrationTestBase,. So they two do have some overlap

Comment thread src/InProcessTestHost/InProcessTestHost.csproj
@nytian
nytian marked this pull request as draft October 19, 2025 20:01
@nytian
nytian marked this pull request as draft October 19, 2025 20:01
@nytian
nytian marked this pull request as ready for review October 19, 2025 23:09
@nytian
nytian requested a review from cgillum October 20, 2025 16:29
@nytian
nytian requested a review from halspang October 22, 2025 21:55

@halspang halspang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall this seems good to me, just a few comments.

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I know some of our packages support netstandard2.0 and net6. Do we need to do that here as well or are we OK with just net6?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just tried, we are using Grpc.AspNetCore.Server in this test pkg which doesn't support netstandard2.0. I guess we are fine? If there are special customer asking for that then I can move back to add the TFM. Now it's just preview pkg

Comment thread src/InProcessTestHost/Sidecar/Dispatcher/ITrafficSignal.cs Outdated
Comment thread src/InProcessTestHost/Sidecar/AsyncManualResetEvent.cs
Comment thread src/InProcessTestHost/Sidecar/Logs.cs Outdated
@nytian
nytian merged commit a949bd5 into main Oct 27, 2025
4 checks passed
@nytian
nytian deleted the nytian/class-syntax-test branch October 27, 2025 20:43
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