integration-testing-knowledge

Constructs and executes API integration tests against PPE environments using BAM MCP tools.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill integration-testing-knowledge-yuezhen-huang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: integration-testing-knowledge
Source: https://github.com/yuezhen-huang/my-bytedance-skillhub/tree/main/integration-testing-knowledge
Command: npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill integration-testing-knowledge-yuezhen-huang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Setting up integration tests against Product Preview Environments (PPE) requires knowing how to route HTTP/RPC requests, obtain test accounts, and retrieve test data, which is scattered tribal knowledge. This Skill consolidates the full workflow into actionable steps. ## Core Features & Use Cases - Test Case Discovery: Search the api_test repository with grep patterns by PSM, API method, or test data key to find existing test cases. - Test Account & Data Retrieval: Run provided scripts to obtain occupied test accounts and fetch test data by namespace and key across environments (sg, va, boe, etc.). - PPE Request Routing: Configure HTTP headers (x-use-ppe, x-tt-env) or RPC Base.Extra.env fields, plus BAM MCP tool settings, to route requests to PPE. - Observability Mapping: Map VDCs to correct PPE VRegions for metrics queries and online VRegions for log queries. - Use Case: You need to verify a new RPC endpoint in a PPE environment. Use this Skill to find a related test case, get a test account and data, then send the request via the bam_api_test MCP tool with the correct ppe_ env routing. ## Quick Start Help me construct and send an RPC integration test request to the ppe_gdpa_dryrun environment using the BAM MCP tool.

Frequently Asked Questions about integration-testing-knowledge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I route HTTP requests to a PPE environment?

Add the headers x-use-ppe: 1 and x-tt-env: ppe_* to your HTTP request to route it to a PPE environment. For RPC requests, set env=ppe_* in the Base.Extra.env field of the request body instead.

How do I get a test account for API integration testing?

Run the get_occupied_user.py script with python3, optionally passing --test_env to select the environment (default sg). It returns JSON with uid, sec_uid, device_id, session_key, and token for available test accounts.

How do I find existing test cases for a specific PSM or API method?

Use grep to search the api_test repository under the API_TEST_ROOT directory. Search by PSM name, API method like QueryPermission, or test data keys, looking for @apipath decorators and read_test_data calls.

Which VRegion should I use for PPE metrics and logs?

For metrics, map your VDC to the PPE VRegion, such as Singapore-PPE for sg1 or US-TTP-PPE for useast5. For logs, use the corresponding online VRegion like Singapore-Central, since PPE logs merge into online storage.

Can I change the caller identity when using BAM MCP test tools?

No, BAM uses explorer.api.executor as the caller and it cannot be changed. You must still set the env field to ppe_* and add the appropriate routing headers or RPC env fields for your protocol.