Skip to content

test: add coverage for integration tests#8021

Draft
BridgeAR wants to merge 13 commits intomasterfrom
BridgeAR/2026-04-16-add-integration-test-coverage
Draft

test: add coverage for integration tests#8021
BridgeAR wants to merge 13 commits intomasterfrom
BridgeAR/2026-04-16-add-integration-test-coverage

Conversation

@BridgeAR
Copy link
Copy Markdown
Member

This adds coverage for our integration tests by monkey patching child_process so that the sandbox creates a NYC instrumented process. That coverage is consolidated and merged before written back.

It does not work for test optimization in all cases and some tests needed some adjusted parameters to properly run with coverage due to the overhead related to the coverage reporting.

This adds coverage for our integration tests by monkey patching
child_process so that the sandbox creates a NYC instrumented process.
That coverage is consolidated and merged before written back.

It does not work for test optimization in all cases and some tests
needed some adjusted parameters to properly run with coverage due
to the overhead related to the coverage reporting.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 16, 2026

Overall package size

Self size: 5.5 MB
Deduped: 6.35 MB
No deduping: 6.35 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.48%. Comparing base (e64c764) to head (3b729e2).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #8021       +/-   ##
===========================================
+ Coverage   73.60%   87.48%   +13.88%     
===========================================
  Files         773      804       +31     
  Lines       36084    42210     +6126     
  Branches        0     7115     +7115     
===========================================
+ Hits        26558    36929    +10371     
+ Misses       9526     5281     -4245     
Flag Coverage Δ
aiguard-integration-active 40.98% <ø> (?)
aiguard-integration-latest 40.93% <ø> (?)
aiguard-integration-maintenance 40.98% <ø> (?)
aiguard-macos 36.53% <ø> (-0.09%) ⬇️
aiguard-ubuntu 36.64% <ø> (-0.09%) ⬇️
aiguard-windows 36.44% <ø> (-0.09%) ⬇️
apm-capabilities-tracing-macos 48.17% <ø> (ø)
apm-capabilities-tracing-ubuntu 48.21% <ø> (ø)
apm-capabilities-tracing-windows 47.94% <ø> (-0.06%) ⬇️
apm-integrations-aerospike-18-gte.5.2.0 34.98% <ø> (?)
apm-integrations-aerospike-20-gte.5.5.0 35.00% <ø> (?)
apm-integrations-aerospike-22-gte.5.12.1 35.00% <ø> (?)
apm-integrations-aerospike-22-gte.6.0.0 35.00% <ø> (?)
apm-integrations-aerospike-eol- 34.90% <ø> (?)
apm-integrations-child-process 36.16% <ø> (-0.10%) ⬇️
apm-integrations-confluentinc-kafka-javascript-18 41.85% <ø> (?)
apm-integrations-confluentinc-kafka-javascript-20 41.87% <ø> (?)
apm-integrations-confluentinc-kafka-javascript-22 41.87% <ø> (?)
apm-integrations-confluentinc-kafka-javascript-24 41.80% <ø> (?)
apm-integrations-couchbase-18 35.15% <ø> (-0.09%) ⬇️
apm-integrations-couchbase-eol 35.23% <ø> (-0.09%) ⬇️
apm-integrations-dns 34.94% <ø> (?)
apm-integrations-elasticsearch 35.54% <ø> (?)
apm-integrations-http-latest 42.80% <ø> (?)
apm-integrations-http-maintenance 42.86% <ø> (?)
apm-integrations-http-oldest 42.87% <ø> (?)
apm-integrations-http2 40.37% <ø> (?)
apm-integrations-kafkajs-latest 41.74% <ø> (?)
apm-integrations-kafkajs-oldest 41.80% <ø> (?)
apm-integrations-net 35.61% <ø> (?)
apm-integrations-next-11.1.4 29.36% <ø> (?)
apm-integrations-next-13.2.0 31.23% <ø> (?)
apm-integrations-next-gte.10.2.0.and.lt.11 23.20% <ø> (?)
apm-integrations-next-gte.11.0.0.and.lt.13 31.23% <ø> (?)
apm-integrations-next-gte.13.0.0.and.lt.14 31.49% <ø> (?)
apm-integrations-next-gte.14.0.0.and.lte.14.2.6 31.33% <ø> (?)
apm-integrations-next-gte.14.2.7.and.lt.15 31.33% <ø> (?)
apm-integrations-next-gte.15.0.0 31.36% <ø> (?)
apm-integrations-oracledb 35.20% <ø> (-0.09%) ⬇️
apm-integrations-pino 31.88% <ø> (?)
apm-integrations-prisma-18-gte.6.16.0.and.lt.7.0.0 35.52% <ø> (?)
apm-integrations-prisma-latest-all 35.85% <ø> (?)
apm-integrations-sharedb 34.56% <ø> (?)
apm-integrations-tedious 35.13% <ø> (?)
appsec-express 52.90% <ø> (-0.09%) ⬇️
appsec-fastify 49.38% <ø> (-0.07%) ⬇️
appsec-graphql 49.73% <ø> (+0.02%) ⬆️
appsec-integration-active 34.31% <33.33%> (?)
appsec-integration-latest 34.29% <33.33%> (?)
appsec-integration-maintenance 34.32% <33.33%> (?)
appsec-integration-oldest 34.31% <33.33%> (?)
appsec-kafka 42.16% <ø> (-0.09%) ⬇️
appsec-ldapjs 41.48% <ø> (-0.08%) ⬇️
appsec-lodash 41.51% <ø> (-0.08%) ⬇️
appsec-macos 56.82% <ø> (-0.07%) ⬇️
appsec-mongodb-core 46.14% <ø> (-0.07%) ⬇️
appsec-mongoose 46.71% <ø> (-0.07%) ⬇️
appsec-mysql 48.86% <ø> (-0.07%) ⬇️
appsec-next-latest-11.1.4 29.56% <ø> (?)
appsec-next-latest-13.2.0 31.46% <ø> (?)
appsec-next-latest-gte.10.2.0.and.lt.11 31.78% <ø> (?)
appsec-next-latest-gte.11.0.0.and.lt.13 31.44% <ø> (?)
appsec-next-latest-gte.13.0.0.and.lt.14 31.64% <ø> (?)
appsec-next-latest-gte.14.0.0.and.lte.14.2.6 31.49% <ø> (?)
appsec-next-latest-gte.14.2.7.and.lt.15 31.49% <ø> (?)
appsec-next-latest-gte.15.0.0 31.49% <ø> (?)
appsec-next-oldest-11.1.4 29.58% <ø> (?)
appsec-next-oldest-13.2.0 31.70% <ø> (?)
appsec-next-oldest-gte.10.2.0.and.lt.11 31.94% <ø> (?)
appsec-next-oldest-gte.11.0.0.and.lt.13 31.46% <ø> (?)
appsec-next-oldest-gte.13.0.0.and.lt.14 31.89% <ø> (?)
appsec-next-oldest-gte.14.0.0.and.lte.14.2.6 31.74% <ø> (?)
appsec-next-oldest-gte.14.2.7.and.lt.15 31.74% <ø> (?)
appsec-next-oldest-gte.15.0.0 31.74% <ø> (?)
appsec-node-serialize 40.69% <ø> (-0.08%) ⬇️
appsec-passport 44.68% <ø> (-0.08%) ⬇️
appsec-postgres 48.46% <ø> (-0.07%) ⬇️
appsec-sourcing 40.18% <ø> (-0.08%) ⬇️
appsec-stripe 42.40% <ø> (-0.08%) ⬇️
appsec-template 40.85% <ø> (-0.08%) ⬇️
appsec-ubuntu 56.90% <ø> (-0.07%) ⬇️
appsec-windows 56.69% <ø> (-0.09%) ⬇️
debugger-ubuntu-active 42.35% <ø> (?)
debugger-ubuntu-latest 42.29% <ø> (?)
debugger-ubuntu-maintenance 42.36% <ø> (?)
debugger-ubuntu-oldest 42.70% <ø> (?)
instrumentations-instrumentation-bluebird 29.85% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-body-parser 37.76% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-child_process 35.54% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-cookie-parser 31.77% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express 31.99% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 31.90% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express-session 37.39% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-fs 29.52% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-generic-pool 30.99% <ø> (ø)
instrumentations-instrumentation-http 36.99% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-knex 29.82% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-mongoose 30.93% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-multer 37.53% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-mysql2 35.51% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-passport 41.27% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-passport-http 40.96% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-passport-local 41.46% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-pg 35.03% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-promise 29.78% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-promise-js 29.79% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-q 29.82% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-url 29.78% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-when 29.80% <ø> (-0.10%) ⬇️
llmobs-ai 38.47% <ø> (-0.09%) ⬇️
llmobs-anthropic 37.92% <ø> (-0.09%) ⬇️
llmobs-bedrock 37.17% <ø> (-0.08%) ⬇️
llmobs-google-genai 37.61% <ø> (-0.08%) ⬇️
llmobs-langchain 37.05% <ø> (-0.07%) ⬇️
llmobs-openai 41.29% <ø> (-0.08%) ⬇️
llmobs-sdk-active 46.09% <ø> (?)
llmobs-sdk-latest 46.02% <ø> (?)
llmobs-sdk-maintenance 46.09% <ø> (?)
llmobs-sdk-oldest 46.07% <ø> (?)
llmobs-vertex-ai 37.78% <ø> (-0.09%) ⬇️
openfeature-macos 38.96% <ø> (?)
openfeature-ubuntu 39.10% <ø> (?)
openfeature-unit-active 43.83% <ø> (?)
openfeature-unit-latest 43.61% <ø> (?)
openfeature-unit-maintenance 43.83% <ø> (?)
openfeature-unit-oldest 43.83% <ø> (?)
openfeature-windows 38.84% <ø> (?)
platform-core 30.01% <ø> (ø)
platform-esbuild 32.83% <ø> (ø)
platform-instrumentations-misc 40.24% <ø> (ø)
platform-integration-active 47.09% <ø> (?)
platform-integration-latest 47.05% <ø> (?)
platform-integration-maintenance 47.12% <ø> (?)
platform-integration-oldest 47.17% <ø> (?)
platform-shimmer 35.73% <ø> (ø)
platform-unit-guardrails 31.38% <ø> (ø)
platform-webpack 20.85% <33.33%> (+0.01%) ⬆️
plugins-azure-durable-functions 25.21% <ø> (ø)
plugins-azure-event-hubs 25.36% <ø> (ø)
plugins-azure-service-bus 24.78% <ø> (ø)
plugins-bullmq 40.69% <ø> (-0.22%) ⬇️
plugins-cassandra 35.34% <ø> (-0.09%) ⬇️
plugins-cookie 26.33% <ø> (ø)
plugins-cookie-parser 26.14% <ø> (ø)
plugins-crypto 25.66% <ø> (ø)
plugins-dd-trace-api 35.47% <ø> (-0.10%) ⬇️
plugins-express-mongo-sanitize 26.28% <ø> (ø)
plugins-express-session 26.10% <ø> (ø)
plugins-fastify 39.44% <ø> (-0.09%) ⬇️
plugins-fetch 35.85% <ø> (-0.09%) ⬇️
plugins-fs 35.76% <ø> (-0.10%) ⬇️
plugins-generic-pool 25.25% <ø> (ø)
plugins-google-cloud-pubsub 43.12% <ø> (-0.08%) ⬇️
plugins-grpc 38.12% <ø> (-0.09%) ⬇️
plugins-handlebars 26.32% <ø> (ø)
plugins-hapi 37.36% <ø> (-0.09%) ⬇️
plugins-hono 37.60% <ø> (-0.09%) ⬇️
plugins-ioredis 35.80% <ø> (-0.09%) ⬇️
plugins-knex 26.01% <ø> (ø)
plugins-langgraph 35.15% <ø> (-0.09%) ⬇️
plugins-ldapjs 23.88% <ø> (ø)
plugins-light-my-request 25.75% <ø> (ø)
plugins-limitd-client 30.07% <ø> (-0.10%) ⬇️
plugins-lodash 25.33% <ø> (ø)
plugins-mariadb 36.67% <ø> (-0.09%) ⬇️
plugins-memcached 35.45% <ø> (-0.09%) ⬇️
plugins-microgateway-core 36.44% <ø> (-0.09%) ⬇️
plugins-moleculer 38.15% <ø> (-0.09%) ⬇️
plugins-mongodb 36.54% <ø> (-0.09%) ⬇️
plugins-mongodb-core 36.26% <ø> (-0.12%) ⬇️
plugins-mongoose 36.21% <ø> (ø)
plugins-multer 26.10% <ø> (ø)
plugins-mysql 36.54% <ø> (-0.09%) ⬇️
plugins-mysql2 36.52% <ø> (-0.09%) ⬇️
plugins-node-serialize 26.37% <ø> (ø)
plugins-opensearch 35.10% <ø> (-0.09%) ⬇️
plugins-passport-http 26.16% <ø> (ø)
plugins-postgres 34.49% <ø> (-0.09%) ⬇️
plugins-process 25.66% <ø> (ø)
plugins-pug 26.33% <ø> (ø)
plugins-redis 36.00% <ø> (-0.05%) ⬇️
plugins-router 40.01% <ø> (-0.09%) ⬇️
plugins-sequelize 25.03% <ø> (ø)
plugins-test-and-upstream-amqp10 35.77% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-amqplib 40.96% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-apollo 36.62% <ø> (-0.08%) ⬇️
plugins-test-and-upstream-avsc 35.62% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-bunyan 31.22% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-connect 37.95% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-graphql 37.30% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-koa 37.56% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-protobufjs 35.83% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-rhea 41.07% <ø> (-0.09%) ⬇️
plugins-undici 36.63% <ø> (-0.09%) ⬇️
plugins-url 25.66% <ø> (ø)
plugins-valkey 35.48% <ø> (-0.09%) ⬇️
plugins-vm 25.66% <ø> (ø)
plugins-winston 31.65% <ø> (-0.09%) ⬇️
plugins-ws 39.08% <ø> (-0.09%) ⬇️
profiling-macos 42.09% <ø> (+3.97%) ⬆️
profiling-ubuntu 42.48% <ø> (+4.20%) ⬆️
profiling-windows 40.06% <ø> (+0.41%) ⬆️
serverless-aws-sdk-latest-aws-sdk 35.44% <ø> (?)
serverless-aws-sdk-latest-bedrockruntime 33.86% <ø> (?)
serverless-aws-sdk-latest-client 21.98% <ø> (?)
serverless-aws-sdk-latest-dynamodb 36.62% <ø> (?)
serverless-aws-sdk-latest-eventbridge 28.97% <ø> (?)
serverless-aws-sdk-latest-kinesis 39.06% <ø> (?)
serverless-aws-sdk-latest-lambda 36.51% <ø> (?)
serverless-aws-sdk-latest-s3 34.46% <ø> (?)
serverless-aws-sdk-latest-serverless-peer-service 40.97% <ø> (?)
serverless-aws-sdk-latest-sns 40.54% <ø> (?)
serverless-aws-sdk-latest-sqs 39.48% <ø> (?)
serverless-aws-sdk-latest-stepfunctions 35.09% <ø> (?)
serverless-aws-sdk-latest-util 43.37% <ø> (?)
serverless-aws-sdk-oldest-aws-sdk 35.50% <ø> (?)
serverless-aws-sdk-oldest-bedrockruntime 33.90% <ø> (?)
serverless-aws-sdk-oldest-client 22.36% <ø> (?)
serverless-aws-sdk-oldest-dynamodb 36.67% <ø> (?)
serverless-aws-sdk-oldest-eventbridge 29.03% <ø> (?)
serverless-aws-sdk-oldest-kinesis 39.13% <ø> (?)
serverless-aws-sdk-oldest-lambda 36.55% <ø> (?)
serverless-aws-sdk-oldest-s3 34.52% <ø> (?)
serverless-aws-sdk-oldest-serverless-peer-service 41.02% <ø> (?)
serverless-aws-sdk-oldest-sns 40.60% <ø> (?)
serverless-aws-sdk-oldest-sqs 39.54% <ø> (?)
serverless-aws-sdk-oldest-stepfunctions 35.13% <ø> (?)
serverless-aws-sdk-oldest-util 43.63% <ø> (?)
serverless-azure-functions-client 25.10% <ø> (ø)
serverless-azure-functions-eventhubs 25.10% <ø> (ø)
serverless-azure-functions-servicebus 25.10% <ø> (ø)
serverless-lambda 30.00% <ø> (?)
test-optimization-cucumber-latest-7.0.0 47.76% <ø> (?)
test-optimization-cucumber-latest-latest 49.03% <ø> (?)
test-optimization-cucumber-oldest-7.0.0 47.77% <ø> (?)
test-optimization-cypress-latest-10.2.0-commonJS 46.68% <ø> (?)
test-optimization-cypress-latest-10.2.0-esm 46.72% <ø> (?)
test-optimization-cypress-latest-14.5.4-commonJS 47.18% <ø> (?)
test-optimization-cypress-latest-14.5.4-esm 47.21% <ø> (?)
test-optimization-cypress-latest-latest-commonJS 47.67% <ø> (?)
test-optimization-cypress-latest-latest-esm 47.71% <ø> (?)
test-optimization-cypress-oldest-10.2.0-commonJS 46.72% <ø> (?)
test-optimization-cypress-oldest-10.2.0-esm 46.76% <ø> (?)
test-optimization-cypress-oldest-14.5.4-commonJS 47.22% <ø> (?)
test-optimization-cypress-oldest-14.5.4-esm 47.25% <ø> (?)
test-optimization-jest-latest-24.8.0 53.47% <ø> (?)
test-optimization-jest-oldest-24.8.0 53.51% <ø> (?)
test-optimization-mocha-latest-5.2.0 48.52% <ø> (?)
test-optimization-mocha-latest-latest 49.70% <ø> (?)
test-optimization-mocha-oldest-5.2.0 48.32% <ø> (?)
test-optimization-mocha-oldest-latest 49.58% <ø> (?)
test-optimization-playwright-latest-latest 47.37% <100.00%> (?)
test-optimization-playwright-latest-oldest 47.55% <100.00%> (?)
test-optimization-playwright-oldest-latest 47.38% <100.00%> (?)
test-optimization-playwright-oldest-oldest 47.54% <100.00%> (?)
test-optimization-selenium-latest 45.67% <ø> (?)
test-optimization-selenium-oldest 45.33% <ø> (?)
test-optimization-testopt-active 46.92% <100.00%> (?)
test-optimization-testopt-latest 46.88% <100.00%> (?)
test-optimization-testopt-maintenance 46.92% <100.00%> (?)
test-optimization-testopt-oldest 47.87% <100.00%> (?)
test-optimization-vitest-latest 50.94% <ø> (?)
test-optimization-vitest-oldest 48.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@datadog-prod-us1-3
Copy link
Copy Markdown

datadog-prod-us1-3 bot commented Apr 16, 2026

Tests

Fix all issues with BitsAI or with Cursor

⚠️ Other Violations

🧪 4 Tests failed

jest@latest commonJS when jest is using worker threads reports tests when using agentless from integration-tests/jest/jest.spec.js   View in Datadog   (Fix with Cursor)
Expected values to be partially and strictly deep-equal:
+ actual - expected

  [
-   'test',
-   'test_suite_end',
    'test_session_end',
    'test_module_end'
  ]

jest@latest commonJS when jest is using worker threads reports tests when using agentless from integration-tests/jest/jest.spec.js   View in Datadog   (Fix with Cursor)
[
  'test_session_end',
  'test_module_end'
] partialDeepStrictEqual [
  'test',
  'test_suite_end',
  'test_session_end',
  'test_module_end'
]
jest@latest commonJS when jest is using worker threads reports tests when using evp proxy from integration-tests/jest/jest.spec.js   View in Datadog   (Fix with Cursor)
Expected values to be partially and strictly deep-equal:
+ actual - expected

  [
-   'test',
-   'test_suite_end',
    'test_session_end',
    'test_module_end'
  ]

jest@latest commonJS when jest is using worker threads reports tests when using evp proxy from integration-tests/jest/jest.spec.js   View in Datadog   (Fix with Cursor)
[
  'test_session_end',
  'test_module_end'
] partialDeepStrictEqual [
  'test',
  'test_suite_end',
  'test_session_end',
  'test_module_end'
]
View all

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 84.15% (+16.13%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 3b729e2 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Apr 16, 2026

Benchmarks

Benchmark execution time: 2026-04-18 18:00:10

Comparing candidate commit 3b729e2 in PR branch BridgeAR/2026-04-16-add-integration-test-coverage with baseline commit e64c764 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1378 metrics, 106 unstable metrics.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant