frameworkarchitect

框架架构师:为 Playwright、Selenium 和 Appium 设计并搭建完整自动化框架,包括项目结构、基础类、配置管理、报告生成与 CI/CD 集成。

仓库最近推送
GitHub Stars
156
Forks
59
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "frameworkarchitect":https://skillpi.com/zh/skills/deepskill-3713d18dca6e0c87ed59412e90f6123f7ddf15f5a430c632f3a2faec57daa0f0。安装前核对上游来源和版本:https://github.com/anhtester/antigravity-testing-kit。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

框架架构师:为 Playwright、Selenium 和 Appium 设计并搭建完整自动化框架,包括项目结构、基础类、配置管理、报告生成与 CI/CD 集成。

0 下载

介绍来源: third_party · anhtester · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
适合谁
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: Framework Architect
description: Skill thiết kế và scaffold automation framework hoàn chỉnh cho Playwright, Selenium, và Appium — bao gồm project structure, base classes, config management, reporting, và CI/CD integration.

Framework Architect

Description

Skill chuyên biệt giúp agent thiết kế, scaffold và triển khai automation framework từ đầu. Hỗ trợ đa nền tảng (Web, Mobile, API) với các framework phổ biến nhất.

Agent có thể:

  • Thiết kế project structure theo best practices
  • Sinh base classes, config management, driver/browser management
  • Tích hợp reporting (Allure, HTML Report, Playwright Report)
  • Cấu hình CI/CD pipeline (GitHub Actions, GitLab CI, Jenkins)
  • Sinh template Page Object Model, fixtures, helpers
  • Tạo file cấu hình (package.json, pom.xml, build.gradle, playwright.config.ts)

When to Use

Sử dụng skill này khi:

  • User yêu cầu tạo/thiết kế automation framework mới
  • User cần scaffold project structure cho test automation
  • User muốn chuẩn hóa framework hiện tại
  • User cần tích hợp reporting hoặc CI/CD vào framework
  • User hỏi về best practices cho framework design

Trigger keywords: "create framework", "design framework", "scaffold project", "thiết kế framework", "tạo project mới"


Supported Stacks

🌐 Web Automation

Stack Ngôn ngữ Runner Report Build Tool
Playwright + TypeScript TypeScript Playwright Test HTML Report, Allure npm
Playwright + Java Java TestNG / JUnit5 Allure Report Maven / Gradle
Playwright + Python Python Pytest Allure, pytest-html pip
Selenium + Java Java TestNG Allure, ExtentReports Maven / Gradle
Selenium + Python Python Pytest Allure, pytest-html pip

📱 Mobile Automation

Stack Ngôn ngữ Runner Report Build Tool
Appium + Java Java TestNG Allure, ExtentReports Maven / Gradle
Appium + Python Python Pytest Allure, pytest-html pip

🔌 API Automation

Stack Ngôn ngữ Runner Report
REST Assured Java TestNG Allure
Playwright API TypeScript Playwright Test HTML Report
Requests + Pytest Python Pytest Allure

Framework Components

Mỗi framework PHẢI bao gồm các thành phần sau (tùy chỉnh theo stack):

1. Project Structure (Mandatory)

  • Cấu trúc thư mục rõ ràng, phân tách pages/tests/utils/config
  • File README.md hướng dẫn setup + chạy test
  • File .gitignore phù hợp

2. Configuration Management (Mandatory)

  • Quản lý environment (dev/staging/prod) qua config file hoặc .env
  • Centralized config — không hardcode giá trị trong test
  • Sensitive data (credentials) qua environment variables, KHÔNG commit vào repo

3. Browser / Driver Management (Mandatory)

  • Playwright: playwright.config.ts / conftest.py với browser setup
  • Selenium: WebDriverManager hoặc Driver Factory pattern
  • Appium: Desired Capabilities factory, Appium server config

4. Base Classes (Mandatory)

  • Base Page — chứa common methods (wait, click, type, screenshot)
  • Base Test — chứa setup/teardown, test lifecycle hooks
  • Không hardcode waits — chỉ dùng smart waits

5. Page Object Model (Mandatory)

  • Mỗi page/screen → 1 Page class
  • Locators khai báo ở đầu class, không inline trong test
  • Methods mô tả hành vi người dùng (không phải thao tác DOM)

6. Test Data Management (Mandatory)

  • Data factory / builder pattern cho test data
  • Data external (JSON/YAML/CSV) cho data-driven tests
  • Data unique + traceable (timestamp/random prefix)

7. Utilities (Mandatory)

  • Wait helpers (smart waits, custom conditions)
  • Screenshot utilities (capture on failure)
  • Logger (structured logging, không dùng print/console.log)
  • Date/Time helpers, String generators

8. Reporting (Mandatory)

  • Tích hợp ít nhất 1 reporting tool
  • Screenshot attach on failure
  • Test execution summary (pass/fail/skip counts)

9. CI/CD Pipeline (Optional — nhưng khuyến khích)

  • GitHub Actions / GitLab CI / Jenkins pipeline template
  • Parallel execution config
  • Artifact upload (reports, screenshots)

Project Structure Templates

Playwright + TypeScript

project-root/
├── playwright.config.ts        # Playwright configuration
├── package.json                # Dependencies + scripts
├── .env.example                # Environment template
├── .gitignore
├── README.md
├── src/
│   ├── pages/                  # Page Object classes
│   │   ├── base.page.ts        # Base page (common methods)
│   │   ├── login.page.ts
│   │   └── dashboard.page.ts
│   ├── fixtures/               # Custom fixtures
│   │   ├── auth.fixture.ts     # Authentication fixture
│   │   └── base.fixture.ts     # Extended test with all fixtures
│   ├── utils/                  # Helpers & utilities
│   │   ├── test-data.ts        # Data generators
│   │   ├── env.config.ts       # Environment config reader
│   │   └── helpers.ts          # Common helper functions
│   └── tests/                  # Test specs
│       ├── auth/
│       │   └── login.spec.ts
│       └── dashboard/
│           └── dashboard.spec.ts
├── test-data/                  # External test data (JSON/YAML)
│   └── users.json
└── .github/
    └── workflows/
        └── playwright.yml      # CI pipeline

Selenium + Java (Maven + TestNG)

project-root/
├── pom.xml                     # Maven config + dependencies
├── testng.xml                  # TestNG suite config
├── .env.example
├── .gitignore
├── README.md
├── src/
│   ├── main/java/
│   │   └── com/project/
│   │       ├── pages/          # Page Object classes
│   │       │   ├── BasePage.java
│   │       │   ├── LoginPage.java
│   │       │   └── DashboardPage.java
│   │       ├── drivers/        # Driver management
│   │       │   └── DriverFactory.java
│   │       ├── config/         # Configuration
│   │       │   └── ConfigReader.java
│   │       └── utils/          # Utilities
│   │           ├── WaitHelper.java
│   │           ├── ScreenshotUtil.java
│   │           └── TestDataGenerator.java
│   └── test/java/
│       └── com/project/
│           ├── base/
│           │   └── BaseTest.java
│           └── tests/
│               ├── LoginTest.java
│               └── DashboardTest.java
├── test-data/
│   └── users.json
└── .github/
    └── workflows/
        └── selenium.yml

Appium + Java (Maven + TestNG)

project-root/
├── pom.xml
├── testng.xml
├── .env.example
├── .gitignore
├── README.md
├── src/
│   ├── main/java/
│   │   └── com/project/
│   │       ├── screens/        # Screen Object classes (mobile POM)
│   │       │   ├── BaseScreen.java
│   │       │   ├── LoginScreen.java
│   │       │   └── HomeScreen.java
│   │       ├── drivers/        # Appium driver management
│   │       │   ├── AppiumDriverFactory.java
│   │       │   └── CapabilitiesManager.java
│   │       ├── config/
│   │       │   └── AppConfig.java
│   │       └── utils/
│   │           ├── MobileGestures.java    # Swipe, scroll, tap
│   │           ├── ScreenshotUtil.java
│   │           └── TestDataGenerator.java
│   └── test/java/
│       └── com/project/
│           ├── base/
│           │   └── BaseTest.java
│           └── tests/
│               ├── LoginTest.java
│               └── HomeTest.java
├── apps/                       # APK/IPA files
│   └── .gitkeep
├── test-data/
│   └── users.json
└── .github/
    └── workflows/
        └── appium.yml

Playwright + Python (Pytest)

project-root/
├── playwright.config.py        # Pytest-playwright config (nếu có)
├── pyproject.toml              # Python project config
├── requirements.txt            # Dependencies
├── conftest.py                 # Root fixtures + browser setup
├── .env.example
├── .gitignore
├── README.md
├── src/
│   ├── pages/
│   │   ├── base_page.py
│   │   ├── login_page.py
│   │   └── dashboard_page.py
│   ├── utils/
│   │   ├── config.py           # Env config reader
│   │   ├── test_data.py        # Data generators
│   │   └── helpers.py
│   └── tests/
│       ├── conftest.py         # Test-level fixtures
│       ├── test_login.py
│       └── test_dashboard.py
├── test-data/
│   └── users.json
└── .github/
    └── workflows/
        └── playwright.yml

Design Principles

  1. DRY (Don't Repeat Yourself) — Mỗi logic chỉ viết 1 lần, tái sử dụng qua Base classes và Utils
  2. Single Responsibility — Mỗi class/module làm 1 việc (Page chỉ chứa UI interaction, Test chỉ chứa test logic)
  3. Open/Closed — Framework dễ mở rộng (thêm page, thêm test) mà không sửa core
  4. Configuration over Code — Env, browser, timeout... quản lý qua config, không hardcode
  5. Fail Fast, Log Rich — Screenshot on failure, structured logging, clear assertion messages

Anti-Patterns (FORBIDDEN)

❌ Anti-Pattern ✅ Đúng cách
Hardcode URL/credentials trong code Đọc từ .env hoặc config file
Locator inline trong test Khai báo trong Page class
Thread.sleep() / waitForTimeout() Smart waits (expect(), WebDriverWait)
Global mutable state Isolated fixtures/setup per test
Monolithic test file (1 file 500+ dòng) Tách theo module/feature
System.out.println() / console.log() Logger framework (Log4j, winston, logging)

Rules References

Agent PHẢI tuân thủ các rules chi tiết:

  • .agent/rules/automation_rules.md — General automation best practices
  • .agent/rules/locator_strategy.md — Locator selection priority
  • .agent/rules/playwright_rules.md — Playwright-specific rules
  • .agent/rules/selenium_rules.md — Selenium-specific rules
  • .agent/rules/appium_rules.md — Appium mobile automation rules

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值95/100

亮点

  • 提供 Playwright/Selenium/Appium 多平台自动化框架设计与搭建服务,属于高频刚需工具
  • 直接解决用户明确的核心任务痛点,显著提升日常高频场景效率
触发精准90/100

亮点

  • 触发词覆盖多种变体(create framework, design framework, scaffold project, thiết kế framework, tạo project mới),边界清晰
结构规范95/100

亮点

  • Phase/步骤清晰,有出口条件,含端到端示例,frontmatter完整,单文件≤500行
执行可靠90/100

亮点

  • 工具来源明确,参数正确,覆盖主要异常,不可逆操作有确认机制
证据可验 (前四项均值)93/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 账号、密钥或授权

    使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。

    主文档提及 · 第 78, 279 行

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。