[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ARWD0Z563VXR17R8QMHWKE":3,"skill-same:01M7ARWD0Z563VXR17R8QMHWKE":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7ARWD0Z563VXR17R8QMHWKE","unit-testing",null,"Writes, fixes or improves unit tests for rules, calculations, validation and state logic: arrange-act-assert, exact oracles, boundary sets, doubles only at boundaries, controlled clock and randomness. Use when the user says 'write unit tests', 'TDD this' or 'mock this dependency'. Not for HTTP endpoints (use api-testing).","quark-sri\u002Fqestack","quark-sri","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F89900424?v=4","01M7ARN6E370E8C9T165BKJB5G","Srinivas Pasupulati","01M7ARN6F6BCMFYCV5RC5HR9JC",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fquark-sri\u002Fqestack\u002Fblob\u002Fmain\u002Fplugins\u002Fqestack\u002Fskills\u002Funit-testing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: unit-testing\ndescription: \"Writes, fixes or improves unit tests for rules, calculations, validation and state logic: arrange-act-assert, exact oracles, boundary sets, doubles only at boundaries, controlled clock and randomness. Use when the user says 'write unit tests', 'TDD this' or 'mock this dependency'. Not for HTTP endpoints (use api-testing).\"\nlicense: Apache-2.0\nargument-hint: \"[class, function or file]\"\n---\n\n# unit-testing\n\n## Objective\n\nUnit tests are the cheapest place to catch a wrong rule. A good unit test runs in milliseconds, checks one behavior with an exact expected value, and fails when the rule is wrong. This skill writes such tests in the style and with the framework of the project.\n\n## Context\n\n1. Read `.agents\u002Fqa-project-context.md` if it exists. Use its test framework, conventions and test commands.\n2. If it does not exist, find the framework and the conventions in the build files and the existing tests. Suggest `qa-project-context` once. Do not stop the work for it.\n\n## Discovery questions\n\n1. Which behavior must the unit have? Where is it specified (requirement, documentation, an existing test, a ticket)?\n2. Which test framework, assertion library and test double library does the project use already?\n3. Are there test data builders, fixtures or helpers to reuse?\n\n## Principles\n\n1. **Test behavior, not implementation.** Assert on outputs and observable effects, not on private methods or the order of internal calls.\n2. **Exact oracles.** Expected values are literals from the requirement or obvious from the input. Never compute them with the logic under test.\n3. **One behavior in each test.** Arrange, act, assert. The name says the case and the expected result.\n4. **Doubles only at the boundary.** Replace the clock, randomness, the network, the file system and other services. Do not replace the unit under test or simple value objects.\n5. **Deterministic.** No real time, no unseeded randomness, no shared mutable state, no order between tests.\n6. **Boundaries as data.** Use parameterized tests for boundary sets, with one expected value in each row.\n7. **Properties for general rules.** When a rule must hold for all inputs, add a property test next to the examples. Examples cover the requirement, and properties find the cases that nobody listed.\n\n## Workflow\n\n1. Read the requirement and the public interface of the unit. List the rules, the limits and the errors.\n2. Design the cases (see `test-case-designer` and `edge-case-hunter` for high-risk rules): positive, boundary (at, below, above each limit), negative, error.\n3. Find the existing test file and follow its style. Reuse builders and helpers.\n4. Write the tests. Make hidden dependencies controllable (pass a clock, a random source or an interface). If that needs a production change, propose it to the user first.\n5. Run only these tests with the project's command for one file or one test. They must pass on correct code.\n6. **Prove each test can fail.** Break the rule on purpose (or use `mutation-probe`), check that the test fails, then restore the code.\n\n## Stack recipes\n\nRead only the recipe for the stack of the project: [Java](references\u002Fjava.md), [TypeScript and JavaScript](references\u002Ftypescript.md), [Python](references\u002Fpython.md). For rules that must hold for all inputs (round trips, invariants, parsers, calculations), also read [property-based testing](references\u002Fproperty-based.md). For another stack, apply the principles with the project's own framework, and say so.\n\n## Anti-patterns\n\n- **Assertion-free or \"not null\" tests.** They run code and check nothing.\n- **Mocking the unit under test,** or checking only that a mock was called.\n- **Copying the formula into the test.** A shared defect then passes.\n- **Real time or sleeps.** The test fails at midnight, at month end or on a slow machine.\n- **Catch-all in the test.** An exception that the test catches and ignores hides the failure.\n\n## Done when\n\n- Each rule, limit and error of the unit has a test with an exact expected value.\n- The tests pass, run fast, and run alone and in any order.\n- At least one deliberate break of each important rule makes a test fail.\n- The tests follow the project's naming and layout.\n\n## Related skills\n\n- `test-case-designer` and `edge-case-hunter`: the cases.\n- `mutation-probe`: checks that the tests catch faults.\n- `testcase-reviewer`: reviews the result.\n- `api-testing`: for behavior behind an endpoint.\n","# unit-testing\n\n## Objective\n\nUnit tests are the cheapest place to catch a wrong rule. A good unit test runs in milliseconds, checks one behavior with an exact expected value, and fails when the rule is wrong. This skill writes such tests in the style and with the framework of the project.\n\n## Context\n\n1. Read `.agents\u002Fqa-project-context.md` if it exists. Use its test framework, conventions and test commands.\n2. If it does not exist, find the framework and the conventions in the build files and the existing tests. Suggest `qa-project-context` once. Do not stop the work for it.\n\n## Discovery questions\n\n1. Which behavior must the unit have? Where is it specified (requirement, documentation, an existing test, a ticket)?\n2. Which test framework, assertion library and test double library does the project use already?\n3. Are there test data builders, fixtures or helpers to reuse?\n\n## Principles\n\n1. **Test behavior, not implementation.** Assert on outputs and observable effects, not on private methods or the order of internal calls.\n2. **Exact oracles.** Expected values are literals from the requirement or obvious from the input. Never compute them with the logic under test.\n3. **One behavior in each test.** Arrange, act, assert. The name says the case and the expected result.\n4. **Doubles only at the boundary.** Replace the clock, randomness, the network, the file system and other services. Do not replace the unit under test or simple value objects.\n5. **Deterministic.** No real time, no unseeded randomness, no shared mutable state, no order between tests.\n6. **Boundaries as data.** Use parameterized tests for boundary sets, with one expected value in each row.\n7. **Properties for general rules.** When a rule must hold for all inputs, add a property test next to the examples. Examples cover the requirement, and properties find the cases that nobody listed.\n\n## Workflow\n\n1. Read the requirement and the public interface of the unit. List the rules, the limits and the errors.\n2. Design the cases (see `test-case-designer` and `edge-case-hunter` for high-risk rules): positive, boundary (at, below, above each limit), negative, error.\n3. Find the existing test file and follow its style. Reuse builders and helpers.\n4. Write the tests. Make hidden dependencies controllable (pass a clock, a random source or an interface). If that needs a production change, propose it to the user first.\n5. Run only these tests with the project's command for one file or one test. They must pass on correct code.\n6. **Prove each test can fail.** Break the rule on purpose (or use `mutation-probe`), check that the test fails, then restore the code.\n\n## Stack recipes\n\nRead only the recipe for the stack of the project: [Java](references\u002Fjava.md), [TypeScript and JavaScript](references\u002Ftypescript.md), [Python](references\u002Fpython.md). For rules that must hold for all inputs (round trips, invariants, parsers, calculations), also read [property-based testing](references\u002Fproperty-based.md). For another stack, apply the principles with the project's own framework, and say so.\n\n## Anti-patterns\n\n- **Assertion-free or \"not null\" tests.** They run code and check nothing.\n- **Mocking the unit under test,** or checking only that a mock was called.\n- **Copying the formula into the test.** A shared defect then passes.\n- **Real time or sleeps.** The test fails at midnight, at month end or on a slow machine.\n- **Catch-all in the test.** An exception that the test catches and ignores hides the failure.\n\n## Done when\n\n- Each rule, limit and error of the unit has a test with an exact expected value.\n- The tests pass, run fast, and run alone and in any order.\n- At least one deliberate break of each important rule makes a test fail.\n- The tests follow the project's naming and layout.\n\n## Related skills\n\n- `test-case-designer` and `edge-case-hunter`: the cases.\n- `mutation-probe`: checks that the tests catch faults.\n- `testcase-reviewer`: reviews the result.\n- `api-testing`: for behavior behind an endpoint.\n",{"name":5,"license":15,"description":7,"argument-hint":24},"[class, function or file]","main","33cd1b197739d1c9a7a907bc4bb50c00039c2371","plugins\u002Fqestack\u002Fskills\u002Funit-testing",0,"https:\u002F\u002Fgithub.com\u002Fquark-sri\u002Fqestack","https:\u002F\u002Fgithub.com\u002Fquark-sri","2026-11-14 20:45:02",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add quark-sri\u002Fqestack --skill unit-testing",{"tool":38,"command":39},"bunx","bunx skills add quark-sri\u002Fqestack --skill unit-testing",{"tool":41,"command":42},"pnpm","pnpm dlx skills add quark-sri\u002Fqestack --skill unit-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fquark-sri\u002Fqestack\u002Fblob\u002Fmain\u002Fplugins\u002Fqestack\u002Fskills\u002Funit-testing\u002FSKILL.md",true,[46,52,56,60],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fjava.md","REFERENCE","参考文档",1782,"https:\u002F\u002Fgithub.com\u002Fquark-sri\u002Fqestack\u002Fblob\u002Fmain\u002Fplugins\u002Fqestack\u002Fskills\u002Funit-testing\u002Freferences\u002Fjava.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fproperty-based.md",2981,"https:\u002F\u002Fgithub.com\u002Fquark-sri\u002Fqestack\u002Fblob\u002Fmain\u002Fplugins\u002Fqestack\u002Fskills\u002Funit-testing\u002Freferences\u002Fproperty-based.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fpython.md",1719,"https:\u002F\u002Fgithub.com\u002Fquark-sri\u002Fqestack\u002Fblob\u002Fmain\u002Fplugins\u002Fqestack\u002Fskills\u002Funit-testing\u002Freferences\u002Fpython.md",{"path":61,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Ftypescript.md",1677,"https:\u002F\u002Fgithub.com\u002Fquark-sri\u002Fqestack\u002Fblob\u002Fmain\u002Fplugins\u002Fqestack\u002Fskills\u002Funit-testing\u002Freferences\u002Ftypescript.md",[65,72,79,86,93,100],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7ARW7HQKKAWQZ4K8128SBXC","ui-automation","Writes, fixes or structures browser end-to-end tests for critical journeys: role, label or test ID locators, auto-waiting assertions, API data setup, page objects, auth reuse and traces. Use when the user says 'UI test', 'end-to-end test' or 'our UI tests are brittle'. Not for business rules (use unit-testing).","https:\u002F\u002Fgithub.com\u002Fquark-sri\u002Fqestack\u002Fblob\u002Fmain\u002Fplugins\u002Fqestack\u002Fskills\u002Fui-automation\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7ARW22645WR7R6MKTAP1CVP","testcase-reviewer","Reviews automated tests or manual test cases like a senior test architect: scores fidelity, oracles, assertion depth, edge cases and determinism, and finds tests that pass on wrong code. Use when the user says 'review my tests', 'test smells' or 'review AI-written tests'. Not for fault injection (use mutation-probe).","https:\u002F\u002Fgithub.com\u002Fquark-sri\u002Fqestack\u002Fblob\u002Fmain\u002Fplugins\u002Fqestack\u002Fskills\u002Ftestcase-reviewer\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7ARVXYW0WTC5E7J5CR4S0EC","testability-review","Scores how testable a feature, module or design is before tests exist (seams for clock, randomness and network, hidden state, observability) and gives the smallest production change per blocker. Use when the user asks 'is this testable' or 'why is this hard to test'. Not for writing the tests (use unit-testing).","https:\u002F\u002Fgithub.com\u002Fquark-sri\u002Fqestack\u002Fblob\u002Fmain\u002Fplugins\u002Fqestack\u002Fskills\u002Ftestability-review\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7ARVTENW2RDMMKHDTGMYQBM","test-strategy","Writes a test strategy for a product, system or team: quality goals, test levels and their share, environments, data, automation scope, non-functional testing, metrics and a roadmap. Use when the user says 'test strategy' or 'QA strategy'. Not for one sprint or release plan (use test-planning).","https:\u002F\u002Fgithub.com\u002Fquark-sri\u002Fqestack\u002Fblob\u002Fmain\u002Fplugins\u002Fqestack\u002Fskills\u002Ftest-strategy\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7ARVMXVKN1XHB1QQCRNGXP5","test-runner","Finds how a project runs its tests, runs the right subset, and triages each failure as product bug, test defect, environment problem or flaky test, with evidence. Use when the user says 'run the tests' or asks 'which tests fail and why'. Not for pipeline design (use ci-cd-integration).","https:\u002F\u002Fgithub.com\u002Fquark-sri\u002Fqestack\u002Fblob\u002Fmain\u002Fplugins\u002Fqestack\u002Fskills\u002Ftest-runner\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M7ARVGQQH6EAKQXD5GJMD3N6","test-review-panel","Reviews tests or a change with up to 8 independent read-only reviewer personas, then merges their findings into one ranked list. Use when the user says 'review panel' or 'deep test review', asks 'is this change safe to merge', or wants AI-written tests reviewed from all angles. Not for a quick score (use testcase-reviewer).","https:\u002F\u002Fgithub.com\u002Fquark-sri\u002Fqestack\u002Fblob\u002Fmain\u002Fplugins\u002Fqestack\u002Fskills\u002Ftest-review-panel\u002FSKILL.md",[],[]]