-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtestskill.config-example.toml
More file actions
182 lines (145 loc) · 8.02 KB
/
Copy pathtestskill.config-example.toml
File metadata and controls
182 lines (145 loc) · 8.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# Testing Skill Configuration — copy this file to testskill.config.toml in your project root
# Run /testskill.init to do this automatically.
#
# Keys come in three flavors:
# 1. Tool-agnostic defaults — already filled in with a sensible value, adjust only if needed.
# 2. Framework-dependent — left blank; pick the value matching your test framework (Playwright / Vitest browser mode).
# 3. Project-dependent — left blank; fill in with your project's commands, URLs and paths.
[workflow]
# When true, stops the workflow if no test plan (test-plan.md) is found before writing tests.
# This ensures tests are never written without a proper plan first.
stop_when_no_plan = true
# When true, stops the workflow if no app analysis (app-analysis.md) is found.
# App analysis captures runtime information like network calls that inform test writing.
stop_when_no_page_analysis = true
# When true, requires human review task and approval of test plans before proceeding to code tests
must_have_human_review_of_plan = false
# How many times to re-run tests to check for flakiness
how_many_executions_to_ensure_stability = 3
# Whether to run all tests for verification or only the subset of files related to the changes
run_only_specific_test_files = true
# When true, if page_analyzer_mode=runtime, stops the workflow if the app can not be started, executed and approached
# For example, when Playwright MCP is unable to access the target page, or the API client is unable to invoke a route
stop_when_cant_reach_runtime = true
# How many maximum tests can be planned and executed
# Unless dealing with small components/routes, it is highly recommended to keep this number low to avoid exhausting the context
max_amount_of_test_to_plan = 4
# How many maximum mutants (bugs) to embed in the code when verifying that tests fail when they should
number_of_mutants_per_test = 1
# Analysis mode for testskill.page-analyzer agent
# "runtime" = live browser inspection (default), "static" = source code only (fast), "auto" = runtime if no tests exist, static otherwise
page_analyzer_mode = "static"
# Thinking mode: controls depth vs speed tradeoff across all sub-agents
# "lean" = aim for good-enough results quickly, move forward fast
# "ultra" = thorough analysis, maximize coverage and confidence
thinking_mode = "lean"
[framework]
# Unit test framework for testing pure logic, utilities, hooks
# Vitest: "vitest" | Jest: "jest"
unit_test_framework = ""
# Vitest: "https://vitest.dev/guide/" | Jest: "https://jestjs.io/docs/getting-started"
unit_test_framework_docs = ""
# Library used for mocking functions, modules, and code-level dependencies
# Vitest: "vitest" | Jest: "jest" | Sinon: "sinon"
unit_test_mocking_framework = ""
# Vitest: "https://vitest.dev/guide/mocking.html" | Jest: "https://jestjs.io/docs/mock-functions"
unit_test_mocking_framework_docs = ""
# Framework for integration/page tests (browser-based testing)
# Playwright: "playwright" | Vitest browser mode: "vitest-browser-mode"
integration_test_framework = ""
# Playwright: "https://playwright.dev/docs/intro" | Vitest browser mode: "https://vitest.dev/guide/browser/"
integration_test_framework_docs = ""
# Library used for intercepting and mocking network requests
# Playwright: "playwright-route" | Vitest browser mode: "msw"
network_interception_framework = ""
# Playwright: "https://playwright.dev/docs/mock" | MSW (Vitest browser mode): "https://mswjs.io/docs/"
network_interception_framework_docs = ""
[commands]
# Command to start the application for testing/inspection (project-specific).
# The app must be running for UI tests and page analysis.
# e.g. "pnpm dev" or "NODE_OPTIONS='--max-old-space-size=8192' pnpm dev --mode=staging"
app_start_command = ""
# Command to stop the application (optional, project-specific).
# Leave empty if the app stops automatically or doesn't need explicit stopping.
# e.g. 'pids=$(lsof -ti tcp:5173); [ -n "$pids" ] && kill -9 $pids'
app_stop_command = ""
# Command to run the test suite.
# This is the primary command used after writing tests to verify they pass.
# Playwright: "pnpm test:page" | Vitest browser mode: "pnpm test:browser"
test_run_command = ""
# Command to run the test suite with coverage reporting (lcov, html, etc.).
# Optional; leave empty to skip coverage.
# Vitest browser mode: "pnpm test:browser:coverage"
test_run_command_with_coverage = ""
# Command to run a single test file
# Used when run_only_specific_test_files is true, also used for diagnosis and verification
# Playwright: "pnpm test:page {file name}" | Vitest browser mode: "pnpm test:browser {file name}"
test_run_single_file_command = ""
# Command to run a single test by file and title
# Playwright: 'pnpm test:page {file name} -g "{test title}"'
# Vitest browser mode: 'pnpm test:browser {file name} -t "{test title}"'
test_run_single_test_command = ""
# Flag to append to the test run command to capture a trace file
# Playwright: "--trace on" | Vitest browser mode: "--browser.trace on"
test_trace_flag = ""
# Flag to append to the test run command to repeat it multiple times for stability checks
# Playwright: "--repeat-each={repeat count}"
# Vitest browser mode: no built-in CLI flag; use a shell loop: "for i in $(seq {repeat count}); do <test command> || exit 1; done"
test_repeat_flag = ""
# Flag to disable test retries during stability checks — retries mask flaky tests by silently passing on a second attempt
# Playwright: "--retries=0" | Vitest: "--retry=0"
test_no_retry_flag = ""
# Command to stage changes for git.
git_stage_command = "git add -A"
[paths]
# The parent directory where to save all test sessions
# artifacts (test plans, app analysis, etc.)
# e.g. "./test/.context"
test_context_root_folder = ""
# Name of a session-specific context folder to save artifacts of a single test session. This folder will be saved underneath test_context_root_folder.
# This folder will contain: test-plan.md, app-analysis.md, test results, etc.
test_context_folder_name_template = "test-context-{feature-or-task-name}-{two digits suffix for uniqueness}"
[app]
# The base URL of the frontend application or API (project-specific)
# Used for navigation during analysis and testing
# e.g. "http://localhost:5173" (Vite default) or "http://localhost:3000"
app_url = ""
# Free-form instructions for authenticating during runtime analysis (project-specific)
# e.g. "Set localStorage item 'fake_store_is_authenticated' to 'true'"
login_instructions = ""
[outputs]
# Filenames for the output documents
# test-plan.md is generated by the testskill.planner agent
# page-analysis.md is generated by the testskill.page-analyzer agent
# test_result_report is generated by the testskill.verifier.md
test_plan_filename = "test-plan.md"
page_analysis_filename = "page-analysis.md"
test_result_report = "test-results.md"
html_report_filename = "test-results.html"
transcript_filename = "transcript.jsonl"
[patterns_and_practices]
# Maximum number of statements and expressions allowed in a single test
max_test_statements = 10
# Maximum number of assertions (expect statements) allowed in a single test
max_assertions = 3
# Maximum number of statements allowed in the Act phase of a test
max_act_phase_statements = 2
# Maximum number of lines for inline JSON/object literals in a test.
# Include only fields that are explicitly needed for the test's point. Everything else (unrelated defaults) should come from a data factory.
max_json_lines_in_test = 2
[flaky]
# How many times the test must pass consecutively to be considered stable
stability_pass_count = 10
# Max parallel workers to simulate saturation (escalation strategy)
saturated_workers = 2
# Artificial network delay in ms to add when simulating slow responses
artificial_delay_ms = 500
# CPU throttling rate for Chrome DevTools Protocol (1 = no throttle, 4 = 4x slower)
cpu_throttle_rate = 4
[canonical_example]
# A real test file that demonstrates all best practices.
# Test writers should read this before writing their first test.
# e.g. "src/pages/Cart/Cart.page.test.ts"
path = ""
# e.g. "When API returns a few products, then they are all visible in the cart"
title = ""