Skip to content

feat(bdd): add --coverage flag to run-bdd-tests.sh for all SDKs#2950

Merged
hubcio merged 5 commits intoapache:masterfrom
atharvalade:feat/bdd-coverage-flag
Mar 19, 2026
Merged

feat(bdd): add --coverage flag to run-bdd-tests.sh for all SDKs#2950
hubcio merged 5 commits intoapache:masterfrom
atharvalade:feat/bdd-coverage-flag

Conversation

@atharvalade
Copy link
Contributor

@atharvalade atharvalade commented Mar 16, 2026

Which issue does this PR close?

Closes #2865

Rationale

The BDD test script runs all SDK tests via Docker Compose but has no way to collect code coverage from the containers. The Go workaround (go test -coverprofile) does not scale to the other SDKs (Rust, Python, Node, C#, Java).

What changed?

Previously, coverage collection from BDD containers required per-SDK workarounds outside the shared Docker Compose stack. There was no unified mechanism to instrument all six SDKs during a BDD run.

A --coverage flag was added to run-bdd-tests.sh that loads a Compose override file (docker-compose.coverage.yml). The override mounts a shared ./reports volume into each BDD container and replaces the test command with the SDK-specific coverage-instrumented variant (Go coverprofile, cargo-llvm-cov, pytest-cov, c8, dotnet CodeCoverage, JaCoCo). SDK dependency changes were minimal: pytest-cov added to Python BDD, jacoco plugin added to Java BDD, Microsoft.Testing.Extensions.CodeCoverage added to C# BDD.

Local Execution

  • Passed
  • Pre-commit hooks ran

AI Usage

  1. Claude Opus 4.6
  2. Assisted with codebase exploration, plan drafting, and implementation scaffolding
  3. Verified via shellcheck, bash syntax validation, Docker Compose config merge, argument parsing tests, trailing whitespace/newline checks, uv lockfile sync, and license header comparison
  4. Yes

@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.94%. Comparing base (34280ab) to head (393a88a).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2950      +/-   ##
============================================
- Coverage     72.01%   71.94%   -0.08%     
  Complexity      925      925              
============================================
  Files          1113     1113              
  Lines         92345    92345              
  Branches      69896    69906      +10     
============================================
- Hits          66500    66434      -66     
- Misses        23290    23340      +50     
- Partials       2555     2571      +16     
Flag Coverage Δ
csharp 67.43% <ø> (-0.25%) ⬇️
go 36.38% <ø> (ø)
java 61.91% <ø> (ø)
node 91.37% <ø> (-0.04%) ⬇️
python 81.43% <ø> (ø)
rust 72.71% <ø> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 19 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hubcio
Copy link
Contributor

hubcio commented Mar 17, 2026

I noticed that all bdd test weren't ran when scripts/run-bdd-tests.sh was modified. see .github/components.yml - can you make it run all bdd tests once modified?

@atharvalade atharvalade force-pushed the feat/bdd-coverage-flag branch from 1d20cb0 to 8f42d89 Compare March 17, 2026 16:12
@atharvalade
Copy link
Contributor Author

I noticed that all bdd test weren't ran when scripts/run-bdd-tests.sh was modified. see .github/components.yml - can you make it run all bdd tests once modified?

oh right, I added a bdd-infrastructure component in components.yml that all bdd-* components depend on, so changes to run-bdd-tests.sh or the compose files now trigger all BDD tests @hubcio

@hubcio hubcio merged commit 9c8b5cc into apache:master Mar 19, 2026
78 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.

ci: add --coverage flag to run-bdd-tests.sh for all SDK BDD suites

3 participants