Token导航 LogoToken导航TokenDH.com
开发操作浏览器github未标认证来源可访问clear审计提醒

pict-test-designerpict 测试设计师

Agent Skill

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

总安装

461

周安装

19

GitHub Stars

7

下载量

150
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:pict-test-designer(pict 测试设计师)
来源仓库:https://github.com/jst-well-dan/skill-box
仓库路径:skills/pict-test-designer
安装命令:
npx skills add https://github.com/jst-well-dan/skill-box --skill pict-test-designer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/jst-well-dan/skill-box --skill pict-test-designer

简介

用于辅助测试设计、自动化测试和回归验证,适合编写测试用例或定位问题。

  • 适用于确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏逻辑。
  • 涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。
  • 安装方式:github;建议确认权限范围和维护状态。
  • pict-test-designer 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

PICT Test Designer

This skill enables systematic test case design using PICT (Pairwise Independent Combinatorial Testing). Given requirements or code, it analyzes the system to identify test parameters, generates a PICT model with appropriate constraints, executes the model to generate pairwise test cases, and formats the results with expected outputs.

When to Use This Skill

Use this skill when:

  • Designing test cases for a feature, function, or system with multiple input parameters
  • Creating test suites for configurations with many combinations
  • Needing comprehensive coverage with minimal test cases
  • Analyzing requirements to identify test scenarios
  • Working with code that has multiple conditional paths
  • Building test matrices for API endpoints, web forms, or system configurations

Workflow

Follow this process for test design:

1. Analyze Requirements or Code

From the user's requirements or code, identify:

  • Parameters: Input variables, configuration options, environmental factors
  • Values: Possible values for each parameter (using equivalence partitioning)
  • Constraints: Business rules, technical limitations, dependencies between parameters
  • Expected Outcomes: What should happen for different combinations

Example Analysis:

For a login function with requirements:

  • Users can login with username/password
  • Supports 2FA (on/off)
  • Remembers login on trusted devices
  • Rate limits after 3 failed attempts

Identified parameters:

  • Credentials: Valid, Invalid
  • TwoFactorAuth: Enabled, Disabled
  • RememberMe: Checked, Unchecked
  • PreviousFailures: 0, 1, 2, 3, 4

2. Generate PICT Model

Create a PICT model with:

  • Clear parameter names
  • Well-defined value sets (using equivalence partitioning and boundary values)
  • Constraints for invalid combinations
  • Comments explaining business rules

Model Structure:

# Parameter definitions
ParameterName: Value1, Value2, Value3

# Constraints (if any)
IF [Parameter1] = "Value" THEN [Parameter2] <> "OtherValue";

Refer to docs/pict_syntax.md for:

  • Complete syntax reference
  • Constraint grammar and operators
  • Advanced features (sub-models, aliasing, negative testing)
  • Command-line options
  • Detailed constraint patterns

Refer to docs/examples.md for:

  • Complete real-world examples by domain
  • Software function testing examples
  • Web application, API, and mobile testing examples
  • Database and configuration testing patterns
  • Common patterns for authentication, resource access, error handling

3. Execute PICT Model

Generate the PICT model text and format it for the user. You can use Python code directly to work with the model:

# Define parameters and constraints
parameters = {
    "OS": ["Windows", "Linux", "MacOS"],
    "Browser": ["Chrome", "Firefox", "Safari"],
    "Memory": ["4GB", "8GB", "16GB"]
}

constraints = [
    'IF [OS] = "MacOS" THEN [Browser] IN {Safari, Chrome}',
    'IF [Memory] = "4GB" THEN [OS] <> "MacOS"'
]

# Generate model text
model_lines = []
for param_name, values in parameters.items():
    values_str = ", ".join(values)
    model_lines.append(f"{param_name}: {values_str}")

if constraints:
    model_lines.append("")
    for constraint in constraints:
        if not constraint.endswith(';'):
            constraint += ';'
        model_lines.append(constraint)

model_text = "\n".join(model_lines)
print(model_text)

Using the helper script (optional): The scripts/pict_helper.py script provides utilities for model generation and output formatting:

# Generate model from JSON config
python scripts/pict_helper.py generate config.json

# Format PICT tool output as markdown table
python scripts/pict_helper.py format output.txt

# Parse PICT output to JSON
python scripts/pict_helper.py parse output.txt

To generate actual test cases, the user can:

  1. Save the PICT model to a file (e.g., model.txt)
  2. Use online PICT tools like:

- https://pairwise.yuuniworks.com/ - https://pairwise.teremokgames.com/

  1. Or install PICT locally (see docs/pict_syntax.md)

4. Determine Expected Outputs

For each generated test case, determine the expected outcome based on:

  • Business requirements
  • Code logic
  • Valid/invalid combinations

Create a list of expected outputs corresponding to each test case.

5. Format Complete Test Suite

Provide the user with:

  1. PICT Model - The complete model with parameters and constraints
  2. Markdown Table - Test cases in table format with test numbers
  3. Expected Outputs - Expected result for each test case

Output Format

Present results in this structure:

## PICT Model

Parameters

Parameter1: Value1, Value2, Value3 Parameter2: ValueA, ValueB

Constraints

IF [Parameter1] = "Value1" THEN [Parameter2] = "ValueA";


## Generated Test Cases

| Test # | Parameter1 | Parameter2 | Expected Output |
| --- | --- | --- | --- |
| 1 | Value1 | ValueA | Success |
| 2 | Value2 | ValueB | Success |
| 3 | Value1 | ValueB | Error: Invalid combination |
...

## Test Case Summary

- Total test cases: N
- Coverage: Pairwise (all 2-way combinations)
- Constraints applied: N

Best Practices

Parameter Identification

Good:

  • Use descriptive names: AuthMethod, UserRole, PaymentType
  • Apply equivalence partitioning: FileSize: Small, Medium, Large instead of FileSize: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
  • Include boundary values: Age: 0, 17, 18, 65, 66
  • Add negative values for error testing: Amount: ~-1, 0, 100, ~999999

Avoid:

  • Generic names: Param1, Value1, V1
  • Too many values without partitioning
  • Missing edge cases

Constraint Writing

Good:

  • Document rationale: # Safari only available on MacOS
  • Start simple, add incrementally
  • Test constraints work as expected

Avoid:

  • Over-constraining (eliminates too many valid combinations)
  • Under-constraining (generates invalid test cases)
  • Complex nested logic without clear documentation

Expected Output Definition

Be specific:

  • "Login succeeds, user redirected to dashboard"
  • "HTTP 400: Invalid credentials error"
  • "2FA prompt displayed"

Not vague:

  • "Works"
  • "Error"
  • "Success"

Scalability

For large parameter sets:

  • Use sub-models to group related parameters with different orders
  • Consider separate test suites for unrelated features
  • Start with order 2 (pairwise), increase for critical combinations
  • Typical pairwise testing reduces test cases by 80-90% vs exhaustive

Common Patterns

Web Form Testing

parameters = {
    "Name": ["Valid", "Empty", "TooLong"],
    "Email": ["Valid", "Invalid", "Empty"],
    "Password": ["Strong", "Weak", "Empty"],
    "Terms": ["Accepted", "NotAccepted"]
}

constraints = [
    'IF [Terms] = "NotAccepted" THEN [Name] = "Valid"',  # Test validation even if terms not accepted
]

API Endpoint Testing

parameters = {
    "HTTPMethod": ["GET", "POST", "PUT", "DELETE"],
    "Authentication": ["Valid", "Invalid", "Missing"],
    "ContentType": ["JSON", "XML", "FormData"],
    "PayloadSize": ["Empty", "Small", "Large"]
}

constraints = [
    'IF [HTTPMethod] = "GET" THEN [PayloadSize] = "Empty"',
    'IF [Authentication] = "Missing" THEN [HTTPMethod] IN {GET, POST}'
]

Configuration Testing

parameters = {
    "Environment": ["Dev", "Staging", "Production"],
    "CacheEnabled": ["True", "False"],
    "LogLevel": ["Debug", "Info", "Error"],
    "Database": ["SQLite", "PostgreSQL", "MySQL"]
}

constraints = [
    'IF [Environment] = "Production" THEN [LogLevel] <> "Debug"',
    'IF [Database] = "SQLite" THEN [Environment] = "Dev"'
]

Troubleshooting

No Test Cases Generated

  • Check constraints aren't over-restrictive
  • Verify constraint syntax (must end with ;)
  • Ensure parameter names in constraints match definitions (use [ParameterName])

Too Many Test Cases

  • Verify using order 2 (pairwise) not higher order
  • Consider breaking into sub-models
  • Check if parameters can be separated into independent test suites

Invalid Combinations in Output

  • Add missing constraints
  • Verify constraint logic is correct
  • Check if you need to use NOT or <> operators

Script Errors

  • Ensure pypict is installed: pip install pypict --break-system-packages
  • Check Python version (3.7+)
  • Verify model syntax is valid

References

  • docs/pict_syntax.md - Complete PICT syntax reference with grammar and operators
  • docs/examples.md - Comprehensive real-world examples across different domains
  • scripts/pict_helper.py - Python utilities for model generation and output formatting
  • PICT GitHub Repository - Official PICT documentation
  • pypict Documentation - Python binding documentation
  • Online PICT Tools - Web-based PICT generator

Examples

Example 1: Simple Function Testing

User Request: "Design tests for a divide function that takes two numbers and returns the result."

Analysis:

  • Parameters: dividend (number), divisor (number)
  • Values: Using equivalence partitioning and boundaries

- Numbers: negative, zero, positive, large values

  • Constraints: Division by zero is invalid
  • Expected outputs: Result or error

PICT Model:

Dividend: -10, 0, 10, 1000
Divisor: ~0, -5, 1, 5, 100

IF [Divisor] = "0" THEN [Dividend] = "10";

Test Cases:

Test #DividendDivisorExpected Output
1100Error: Division by zero
2-101-10.0
30-50.0
410005200.0
5101000.1

Example 2: E-commerce Checkout

User Request: "Design tests for checkout flow with payment methods, shipping options, and user types."

Analysis:

  • Payment: Credit Card, PayPal, Bank Transfer (limited by user type)
  • Shipping: Standard, Express, Overnight
  • User: Guest, Registered, Premium
  • Constraints: Guests can't use Bank Transfer, Premium users get free Express

PICT Model:

PaymentMethod: CreditCard, PayPal, BankTransfer
ShippingMethod: Standard, Express, Overnight
UserType: Guest, Registered, Premium

IF [UserType] = "Guest" THEN [PaymentMethod] <> "BankTransfer";
IF [UserType] = "Premium" AND [ShippingMethod] = "Express" THEN [PaymentMethod] IN {CreditCard, PayPal};

Output: 12-15 test cases covering all valid payment/shipping/user combinations with expected costs and outcomes.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

Claude Code

27.6%
按下载量换算41

OpenCode

24.93%
按下载量换算37

Antigravity

18.45%
按下载量换算28

Codex

13.35%
按下载量换算20

windsurf

7.84%
按下载量换算12

Gemini CLI

3.52%
按下载量换算5

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills