Skip to content

Integration tests on DaprClient responses#981

Merged
sicoyle merged 24 commits intodapr:mainfrom
seherv:grpc-tests
Apr 24, 2026
Merged

Integration tests on DaprClient responses#981
sicoyle merged 24 commits intodapr:mainfrom
seherv:grpc-tests

Conversation

@seherv
Copy link
Copy Markdown
Contributor

@seherv seherv commented Apr 15, 2026

Description

Tests the gRPC channel created by DaprClient directly, instead of asserting on the log outputs of the examples like in the PR that removes Mechanical Markdown (#977).

The old log assertions are kept as "documentation tests".

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #972

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.53%. Comparing base (bffb749) to head (e1521b5).
⚠️ Report is 113 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #981      +/-   ##
==========================================
- Coverage   86.63%   81.53%   -5.11%     
==========================================
  Files          84      139      +55     
  Lines        4473    13525    +9052     
==========================================
+ Hits         3875    11027    +7152     
- Misses        598     2498    +1900     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
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 migrates example validation away from mechanical-markdown by introducing two pytest suites: (1) stdout-based “documentation” tests that run the examples and assert expected output, and (2) SDK-based integration tests that assert directly on DaprClient responses.

Changes:

  • Replace mechanical-markdown validation with pytest in tox -e examples (stdout assertions).
  • Add tox -e integration suite with a Dapr sidecar test harness and SDK-level assertions.
  • Update CI workflow and contributor docs to reflect the new testing approach.

Reviewed changes

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

Show a summary per file
File Description
tox.ini Switch examples validation to pytest; add integration env
.github/workflows/validate_examples.yaml Run both examples + integration in CI
pyproject.toml Add pytest marker registration
examples/validate.sh Remove mechanical-markdown entrypoint
README.md Update developer instructions (examples/integration)
AGENTS.md Update guidance for example validation workflow
examples/AGENTS.md Update example validation documentation
CLAUDE.md Add repo coding/style guidance
examples/conversation/real_llm_providers_example.py Update output text
tests/clients/test_conversation_helpers.py Docstring wording tweak
tests/examples/conftest.py Add DaprRunner helper + example_dir fixture
tests/examples/test_configuration.py Stdout-based example test
tests/examples/test_conversation.py Stdout-based example test
tests/examples/test_crypto.py Stdout-based example test
tests/examples/test_demo_actor.py Stdout-based example test
tests/examples/test_distributed_lock.py Stdout-based example test
tests/examples/test_error_handling.py Stdout-based example test
tests/examples/test_grpc_proxying.py Stdout-based example test
tests/examples/test_invoke_binding.py Stdout-based example test
tests/examples/test_invoke_custom_data.py Stdout-based example test
tests/examples/test_invoke_http.py Stdout-based example test
tests/examples/test_invoke_simple.py Stdout-based example test
tests/examples/test_jobs.py Stdout-based example test
tests/examples/test_langgraph_checkpointer.py Stdout-based example test
tests/examples/test_metadata.py Stdout-based example test
tests/examples/test_pubsub_simple.py Stdout-based example test
tests/examples/test_pubsub_streaming.py Stdout-based example test
tests/examples/test_pubsub_streaming_async.py Stdout-based example test
tests/examples/test_secret_store.py Stdout-based example test
tests/examples/test_state_store.py Stdout-based example test
tests/examples/test_state_store_query.py Stdout-based example test
tests/examples/test_w3c_tracing.py Stdout-based example test
tests/examples/test_workflow.py Stdout-based example test
tests/integration/conftest.py Add DaprTestEnvironment harness for SDK tests
tests/integration/secrets.json Local secret store test data
tests/integration/test_configuration.py SDK-based configuration tests
tests/integration/test_distributed_lock.py SDK-based lock tests
tests/integration/test_invoke.py SDK-based invocation tests
tests/integration/test_metadata.py SDK-based metadata tests
tests/integration/test_pubsub.py SDK-based pub/sub delivery tests
tests/integration/test_secret_store.py SDK-based secret store tests
tests/integration/test_state_store.py SDK-based state store tests
tests/integration/apps/invoke_receiver.py gRPC app for invoke tests
tests/integration/apps/pubsub_subscriber.py Subscriber app persisting received events
tests/integration/components/configurationstore.yaml Redis configuration component
tests/integration/components/localsecretstore.yaml Local-file secret store component
tests/integration/components/lockstore.yaml Redis lock component
tests/integration/components/pubsub.yaml Redis pubsub component
tests/integration/components/statestore.yaml Redis state component

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

Comment thread README.md Outdated
Comment thread examples/AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread tests/integration/conftest.py
Comment thread tests/examples/test_configuration.py
Comment thread tests/clients/test_conversation_helpers.py Outdated
Comment thread examples/AGENTS.md Outdated
Comment thread tests/integration/test_configuration.py
Comment thread examples/conversation/real_llm_providers_example.py Outdated
Copy link
Copy Markdown
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 48 out of 48 changed files in this pull request and generated 2 comments.


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

Comment thread tests/integration/test_configuration.py
Comment thread tests/integration/test_pubsub.py Outdated
Copy link
Copy Markdown
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 48 out of 48 changed files in this pull request and generated 2 comments.


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

Comment thread tox.ini
Comment thread tests/integration/conftest.py
Copy link
Copy Markdown
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 48 out of 48 changed files in this pull request and generated 4 comments.


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

Comment thread README.md Outdated
Comment thread tox.ini
Comment thread tests/integration/conftest.py
Comment thread tests/integration/conftest.py Outdated
Copy link
Copy Markdown
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 48 out of 48 changed files in this pull request and generated 8 comments.


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

Comment thread tests/integration/AGENTS.md Outdated
Comment thread tox.ini Outdated
Comment thread tox.ini Outdated
Comment thread tox.ini Outdated
Comment thread tox.ini Outdated
Comment thread tests/integration/conftest.py Outdated
Comment thread tests/examples/test_langgraph_checkpointer.py
Comment thread README.md Outdated
Copy link
Copy Markdown
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 48 out of 48 changed files in this pull request and generated 3 comments.


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

Comment thread tests/examples/test_langgraph_checkpointer.py Outdated
Comment thread tests/examples/test_workflow.py Outdated
Comment thread tests/examples/test_langgraph_checkpointer.py
@seherv seherv force-pushed the grpc-tests branch 2 times, most recently from 31dfad2 to 2a22fdf Compare April 20, 2026 11:57
@seherv seherv requested a review from Copilot April 20, 2026 11:57
Copy link
Copy Markdown
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 49 out of 49 changed files in this pull request and generated 3 comments.


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

Comment thread tox.ini Outdated
Comment thread tox.ini Outdated
Comment thread tox.ini Outdated
@seherv seherv marked this pull request as ready for review April 20, 2026 12:06
@seherv seherv requested review from a team as code owners April 20, 2026 12:06
@sicoyle
Copy link
Copy Markdown
Contributor

sicoyle commented Apr 20, 2026

just approved the workflows :)

@sicoyle
Copy link
Copy Markdown
Contributor

sicoyle commented Apr 21, 2026

workflows approved again @seherv :)

Comment thread tests/integration/conftest.py Outdated
self._bg_process: subprocess.Popen[str] | None = None
self._bg_output_file: IO[str] | None = None
def __init__(self, default_components: Path = RESOURCES_DIR) -> None:
self._default_components = default_components
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.

resources pls

Comment thread tests/integration/conftest.py Outdated
http_port: int = 3500,
app_port: int | None = None,
app_cmd: str | None = None,
components: Path | None = None,
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.

resources pls

Comment thread tests/integration/conftest.py
Comment thread tests/integration/conftest.py
dependabot Bot and others added 22 commits April 24, 2026 17:09
Updates the requirements on [pyyaml](https://github.com/yaml/pyyaml) to permit the latest version.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/6.0.3/CHANGES)
- [Commits](yaml/pyyaml@6.0.2...6.0.3)

---
updated-dependencies:
- dependency-name: pyyaml
  dependency-version: 6.0.3
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sam <sam@diagrid.io>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
This reverts commit df5b0fc.

Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Updates the requirements on [pydantic](https://github.com/pydantic/pydantic) to permit the latest version.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](pydantic/pydantic@v2.0...v2.13.3)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-version: 2.13.3
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
seherv added 2 commits April 24, 2026 17:11
Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@sicoyle sicoyle left a comment

Choose a reason for hiding this comment

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

thank you!

@sicoyle sicoyle added this pull request to the merge queue Apr 24, 2026
Merged via the queue into dapr:main with commit e401e5c Apr 24, 2026
14 of 15 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.

(parent) refactor: mv mechanical markdown tests to pytest native

4 participants