Skip to content

W-21017986 MCP e2e Tests#203

Merged
allison-grady merged 7 commits intomainfrom
t/commerce/W-21017986/e2e-tests
Feb 27, 2026
Merged

W-21017986 MCP e2e Tests#203
allison-grady merged 7 commits intomainfrom
t/commerce/W-21017986/e2e-tests

Conversation

@allison-grady
Copy link
Contributor

Summary

Adds the following e2e tests and runs them nightly:

  1. Server Lifecycle Tests

Server starts successfully with default options

Server starts with --toolsets all

Server starts with specific toolsets (--toolsets SCAPI,MRT)

Server starts with specific tools (--tools scapi_discovery)

Server handles --allow-non-ga-tools flag correctly

Server exits cleanly on connection close

  1. MCP Protocol Tests (tools/list)

Lists tools correctly with --toolsets all --allow-non-ga-tools

Filters tools by toolset correctly

Filters tools by individual tool name

Returns empty list when no tools match

Tool metadata includes correct name, description, inputSchema

  1. MCP Protocol Tests (tools/call)

Successfully calls placeholder tools and returns expected response

Validates tool input against schema

Returns proper error for unknown tool names

Returns proper error for invalid input

  1. Workspace Auto-Discovery Tests

Detects PWA Kit v3 projects from package.json

Detects Storefront Next projects from package.json

Detects cartridge projects from .project files

Falls back to SCAPI toolset when no project detected

Enables combined toolsets for hybrid projects

  1. Flag Inheritance Tests

--config flag is inherited and functional

--log-level flag controls logging output

--debug flag enables debug logging

Instance flags (--server, --client-id, etc.) are accepted

MRT flags (--api-key, --project, etc.) are accepted

Environment variables work as flag alternatives

  1. Error Handling Tests

Invalid JSON-RPC message returns proper error

Unknown method returns proper error

Missing required flags return helpful error message

Testing

To run on CLI:
pnpm -r run build
pnpm --filter @salesforce/b2c-dx-mcp run test:e2e

Or visit https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/actions/workflows/e2e-tests.yml, select Run Workflow, select this branch, and run the full nightly test suite.
Example test run

Dependencies

  • No net-new third-party dependencies were added
  • If net-new third-party dependencies were added, rationale/discussion is included and 3pl-approved is set by a maintainer

  • Tests pass (pnpm test)
  • Code is formatted (pnpm run format)

@github-actions github-actions bot added the needs-3pl-review PR introduces net-new third-party dependencies and needs discussion label Feb 24, 2026
@allison-grady allison-grady marked this pull request as ready for review February 24, 2026 19:25
Copy link
Contributor

@patricksullivansf patricksullivansf left a comment

Choose a reason for hiding this comment

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

This is cool!

Not sure why this got tagged as needs-3pl-review but no deps have been added.

@yhsieh1 yhsieh1 added the 3pl-approved Maintainer approved net-new third-party dependency additions label Feb 25, 2026
@github-actions github-actions bot removed the needs-3pl-review PR introduces net-new third-party dependencies and needs discussion label Feb 25, 2026
Copy link
Contributor

@yhsieh1 yhsieh1 left a comment

Choose a reason for hiding this comment

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

@allison-grady The PR looks good. I updated the label. Please update the branch.

@allison-grady allison-grady merged commit d5eddeb into main Feb 27, 2026
4 checks passed
@allison-grady allison-grady deleted the t/commerce/W-21017986/e2e-tests branch February 27, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3pl-approved Maintainer approved net-new third-party dependency additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants