Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

appbuilder-testing应用程序构建器测试

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

998

周安装

42

GitHub Stars

55

下载量

349
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:appbuilder-testing(应用程序构建器测试)
来源仓库:https://github.com/adobe/skills
仓库路径:skills/appbuilder-testing
安装命令:
npx skills add https://github.com/adobe/skills --skill appbuilder-testing
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/adobe/skills --skill appbuilder-testing

简介

用于生成 Jest 单元测试与组件测试代码,覆盖 Adobe App Builder 动作与 React Spectrum UI。

  • 提供 mock 助手与集成测试模板,适配 Adobe SDK 调用模式。
  • 支持现有动作回归测试与新组件行为验证双重用途。
  • 需确认项目已配置 Jest 环境并安装相关依赖包。
  • 测试用例应反映实际业务逻辑,避免仅追求覆盖率而忽略真实性。

SKILL.md

App Builder Testing

Generate and run Jest tests for Adobe App Builder actions and React Spectrum UI components. Scaffolds unit tests, integration tests, component tests, and mock helpers for Adobe SDKs.

Pattern Quick-Reference

Pick the template or reference that matches the user's intent. Default to assets/unit-test-template.js for generic test requests.

User wantsReferenceTemplate / Asset
Unit test for an existing actionreferences/testing-patterns.mdassets/unit-test-template.js
Integration test against deployed actionreferences/testing-patterns.mdassets/integration-test-template.js
Component test for React Spectrum UIreferences/component-testing-patterns.mdassets/component-test-template.js
Mock ExC Shell context in testsreferences/component-testing-patterns.mdassets/shell-mock-helper.js
Mock AEM extension context in testsreferences/component-testing-patterns.mdassets/uix-guest-mock-helper.js
Mock State SDK in testsreferences/mock-catalog.mdassets/mock-state-sdk.js
Mock Files SDK in testsreferences/mock-catalog.mdassets/mock-files-sdk.js
Mock Events SDK in testsreferences/mock-catalog.mdassets/mock-events-sdk.js
Mock Database SDK in testsreferences/mock-catalog.mdassets/mock-database-sdk.js
Full mock catalog (all SDKs)references/mock-catalog.md
Contract test for API interactionsreferences/testing-patterns.md
Pre-deployment verificationreferences/checklist.md
Debug test failuresreferences/debugging.md

Fast Path (for clear requests)

When the user's request maps unambiguously to a single pattern above — they name a specific test type, reference a template, or describe a use case that clearly matches one entry — skip straight to generation. Use the matched template and proceed directly.

Examples of fast-path triggers:

  • "Write tests for my action" → Read the action source, use assets/unit-test-template.js, generate immediately
  • "Help me mock State SDK" → Use assets/mock-state-sdk.js, inject into test file
  • "Add integration tests" → Use assets/integration-test-template.js, configure for deployed action
  • "Run tests with coverage" → Execute npx jest --coverage or aio app test
  • "Test my component/page/form/table" → Read the component source, use assets/component-test-template.js, wrap in Provider
  • "Mock shell context" → Use assets/shell-mock-helper.js, inject into test file
  • "Test my AEM extension component" → Use assets/uix-guest-mock-helper.js + assets/component-test-template.js

If there is any ambiguity — multiple test types needed, project structure unclear, or the user hasn't specified enough — fall through to the full workflow below.

Quick Reference

  • Test directory: Place test files in test/ mirroring the action path, e.g., test/actions/<action-name>/index.test.js.
  • Jest configuration: App Builder projects use Jest by default. Config lives in package.json or jest.config.js.
  • Test command: aio app test (wrapper) or npx jest --coverage (direct).
  • Mock pattern: Use jest.mock() at the top of test files to mock Adobe SDK dependencies before importing the action.
  • Response shape: All actions return {statusCode, body} — assert both in every test.
  • Error paths: Always test 200 (success), 400 (bad input), and 500 (SDK failure) scenarios.
  • CommonJS: Action test files use require() and module.exports (not ES imports).
  • Component test directory: test/web-src/components/<ComponentName>.test.js (or test/components/).
  • Provider wrapper: Always wrap in <Provider theme={defaultTheme}> — Spectrum renders nothing without it.
  • ARIA selectors: Use getByRole(), not CSS classes — see references/component-testing-patterns.md selector table.
  • Async testing: Use findBy* for data that appears async, queryBy* for absence, waitFor for state changes.

Full Workflow (for ambiguous or complex requests)

  1. Scan project structure — Check for existing test/ directory, jest.config.js, and test scripts in package.json. Scan both src/ for actions AND web-src/ for UI components.
  2. Identify targets to test — Parse ext.config.yaml (or app.config.yaml) for declared actions and their source paths. Check web-src/src/components/ for React components.
  3. Determine test types needed — Unit tests for logic, integration tests for deployed actions, contract tests for API interactions.
  4. For each action:a. Read the action source to identify SDK dependencies (State, Files, Events, Logger, etc.).b. Generate unit test using assets/unit-test-template.js as the base.c. Inject appropriate mocks from references/mock-catalog.md based on detected dependencies.d. Add error scenario tests (missing params, auth failures, SDK errors).
  5. For each UI component:a. Read the component source to identify dependencies (shell context, UIX guest, action calls).b. Generate component test using assets/component-test-template.js as the base.c. Wrap all renders in <Provider theme={defaultTheme}> — Spectrum renders nothing without it.d. Inject shell mock (assets/shell-mock-helper.js) or UIX guest mock (assets/uix-guest-mock-helper.js) as needed.e. Add loading, success, and error state tests for async data using findBy* and waitFor.
  6. Run tests — Execute aio app test or npx jest --coverage and report results.
  7. Validate — Check against references/checklist.md before marking done.

Example User Prompts

  • "Write unit tests for my generic action"
  • "Add integration tests for my deployed action"
  • "My action uses State SDK — help me mock it in tests"
  • "Run tests and show me coverage"
  • "Set up Jest for my App Builder project"
  • "Test my action handles errors properly"
  • "Write component tests for my data table page"
  • "Test my AEM extension panel component"
  • "Help me mock shell context in my tests"
  • "Add tests for my React Spectrum form"

Inputs To Request

  • Current repository path and action file locations
  • Which actions need tests (or test all declared actions)
  • Target test types: unit, integration, contract, or all
  • Whether action is deployed (needed for integration tests)

Deliverables

  • Test files in test/ matching the action directory structure
  • Component test files in test/web-src/components/ for UI components
  • Mock helpers for detected Adobe SDK dependencies
  • Shell or UIX Guest mock helpers when components depend on context SDKs
  • Jest configuration if not already present (including jsdom environment for component tests)
  • Coverage report from test execution

Quality Bar

  • Every action test covers at minimum: success (200), bad input (400), and SDK failure (500) paths
  • Mocks are isolated per test via beforeEach(() => jest.clearAllMocks())
  • No real SDK calls in unit tests — all external dependencies are mocked
  • Tests are deterministic and can run offline (no network dependencies in unit tests)
  • Coverage reporting is enabled (--coverage flag)
  • All component tests wrap in <Provider theme={defaultTheme}> — Spectrum renders nothing without it

References

  • Use references/testing-patterns.md for unit, integration, and contract test patterns with annotated examples.
  • Use references/component-testing-patterns.md for React Spectrum component testing with Provider wrapping, ARIA selectors, and async patterns.
  • Use references/mock-catalog.md for mock helpers covering all Adobe SDKs (State, Files, Events, Logger, Database, Shell, UIX Guest).
  • Use references/checklist.md for pre-deployment test verification.
  • Use assets/unit-test-template.js for Jest unit test boilerplate (CommonJS).
  • Use assets/integration-test-template.js for integration test against deployed actions.
  • Use assets/component-test-template.js for React Spectrum component test boilerplate with renderWithSpectrum() helper.
  • Use assets/shell-mock-helper.js for ExC Shell context mock (@adobe/exc-app).
  • Use assets/uix-guest-mock-helper.js for AEM UIX Guest mock (@adobe/uix-guest).
  • Use assets/mock-state-sdk.js, assets/mock-files-sdk.js, assets/mock-events-sdk.js, and assets/mock-database-sdk.js for ready-to-use SDK mock setups.

Common Issues

  • Tests fail with "Cannot find module": Ensure the action path in require() matches the actual file location. App Builder actions are typically at src/dx-excshell-1/actions/<name>/index.js.
  • Mocks not working: jest.mock() calls must appear before require() of the module under test. Jest hoists mock declarations but order still matters for manual mocks.
  • State/Files SDK tests fail: These SDKs require Runtime environment for real calls. Always mock them in unit tests. Use aio app run (not aio app dev) for integration tests that need real SDK access.
  • Coverage too low: Add tests for error branches — missing params, invalid auth headers, SDK init() failures, and timeout scenarios.
  • aio app test vs npx jest: aio app test is a thin wrapper around Jest. Use npx jest --coverage directly for more control over flags and reporters.
  • Spectrum components render blank in tests: Missing <Provider theme={defaultTheme}> wrapper. Use renderWithSpectrum() helper from assets/component-test-template.js.
  • ARIA role queries return null: Spectrum components use ARIA roles, not CSS classes. See references/component-testing-patterns.md section g for the role reference table.

Chaining

  • Chains FROM appbuilder-action-scaffolder (test actions after implementation)
  • Chains FROM appbuilder-ui-scaffolder (test UI components after scaffolding)
  • Chains TO appbuilder-cicd-pipeline (automated test execution in CI)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.93%
按下载量换算115

Claude

32.63%
按下载量换算114

Cursor

18.65%
按下载量换算65

Gemini CLI

10.08%
按下载量换算35

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/adobe/skills --skill appbuilder-testing 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills