Agent Skills
› xberg-io/xberg
› e2e-fixtures
e2e-fixtures
GitHub用于管理端到端测试的JSON格式固定数据(Fixtures),支持调用、输入、Mock及断言定义,自动映射至Python测试文件。
Trigger Scenarios
需要添加或修改E2E测试用例的数据配置
生成基于JSON结构的端到端测试脚本
Install
npx skills add xberg-io/xberg --skill e2e-fixtures -g -y
SKILL.md
Frontmatter
{
"name": "e2e-fixtures",
"type": "Playbook",
"paths": [
"fixtures\/**",
"e2e\/**"
],
"title": "E2E Fixtures",
"x-ai-rulez": {
"id": "e2e-fixtures",
"kind": "skill",
"metadata": {
"name": "e2e-fixtures"
}
},
"description": "Add or edit e2e fixtures: calls, inputs, mocks, assertions and schema."
}
xberg E2E Fixtures
One JSON object per file under fixtures/<dir>/. The directory is the default category; an explicit category field
overrides it and names the generated test file (e.g. fixtures/plugin_api/list_reranker_backends.json sets
reranker_backend_management, so its Python test lands in e2e/python/tests/test_reranker_backend_management.py).
- Fields:
id(unique snake_case, becomes the test name),call,description,docs(topic,title,description,side_effects),assertions; optionalcategory,tags,input,config,args,skip. call:extract(most fixtures),extract_batch,pdf_page_count,extract_with_external_redaction, and the plugin-registry calls (list_*,register_*,unregister_*,clear_*for OCR, embedding, tokenizer, reranker backends, renderers, validators, post-processors;ocr_backend_supports_language).input:extract_input(kind: "uri"with$mock_url/..., orbytes+filename+mime_type) plusmock_responses(path,status_code,headers, optionalmethod, and a body:body_fileresolved against aresponsessubdirectory offixtures/(none exists yet), thenfixtures/itself, so../test_documents/...is the in-repo submodule; orbody_inline). Batch calls takeinputs. A bytes input can also sit at the top level ofinput(kind: "bytes",bytes,filename,mime_type) withoutextract_input. Other calls take call-specificinputfields (pdf_bytes/password,findings_json, registryname/backend); copy an existing fixture of that call.- Assertion types:
not_error,error,equals,min_length,count_min,count_equals,contains,contains_any,contains_all,not_contains,not_empty,greater_than_or_equal,less_than_or_equal. Examplefield:results[0].mime_type. - Assertion shape and generation: the shared
e2e-generationskill. skip:{languages: [...], reason: "..."}.- Directories:
smoke,extract,batch,contract,error,format_specific,pdf,code,url,plugin_api,registry,summarization. Field-only categories (all underplugin_api/):ocr_backend_management,embedding_backend_management,tokenizer_backend_management,reranker_backend_management,renderer_management,validator_management,post_processor_management. fixtures/repros/holds repro assets (PDFs, configs, READMEs) andfixtures/images/a test image; neither holds e2e fixtures.
Copy the nearest existing fixture of the same call rather than writing one from this list.
Version History
- 844bb91 Current 2026-11-03 09:36


