CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/negative-test-generator

Generates negative / error-path test cases that mirror happy-path tests - for each happy-path test, produces companions exercising input validation rejection, missing required fields, type mismatches, authorization failures, rate-limit errors, and adversarial payloads from the malicious-payload-bank. Emits cases as parameterized tests in the project's runner format. Use when a feature has happy-path coverage but the rejection / error / unauthorized paths are untested.

97

Quality

97%

Does it follow best practices?

Impact

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

criteria.jsonevals/scenario-3/

{
  "context": "Type-mismatch coverage across every field of a partial-update handler. Predicted baseline failure: the agent reproduces the one bug named in the task - the string itemsPerPage - and covers value-level rejections it can see in the code, but does not systematically walk every field for its wrong-type case. theme, notificationsEnabled and tags are typically left with value coverage only, and the array element-type branch is almost always missed. The skill's value is enumerating the field list and applying the same category to each rather than following the narrative in the ticket.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Test file created",
      "description": "A file src/updateSettings.test.js exists and contains at least one test.",
      "max_score": 4
    },
    {
      "name": "Wrong-type case for every field",
      "description": "All four fields - theme, notificationsEnabled, itemsPerPage, tags - each have a case supplying a value of the wrong type and asserting WRONG_TYPE on that field. Score proportionally: four fields covered is full marks, three is three quarters, two is half, one or none scores zero.",
      "max_score": 30
    },
    {
      "name": "Array element type covered",
      "description": "A case supplies tags as a genuine array containing a non-string element and asserts WRONG_ELEMENT_TYPE. Covering only 'tags is not an array' scores zero on this criterion - the element branch is a separate rejection the handler implements.",
      "max_score": 14
    },
    {
      "name": "Field and code both asserted",
      "description": "Each rejection asserts both which field failed and which code was returned. Asserting only ok is false, or only the code without the field, scores at most half: with a shared WRONG_TYPE code the field name is what identifies the defect.",
      "max_score": 18
    },
    {
      "name": "Value-level rejections covered separately from type rejections",
      "description": "UNSUPPORTED_VALUE for an unknown theme and OUT_OF_RANGE for itemsPerPage outside 5 to 100 are each covered, using values of the correct type so the value branch is reached rather than short-circuited by the type check.",
      "max_score": 12
    },
    {
      "name": "Malformed patch covered",
      "description": "At least one case supplies a patch that is null, an array, or a non-object and asserts MALFORMED_PATCH.",
      "max_score": 10
    },
    {
      "name": "One test per case",
      "description": "MUST NOT collapse the field sweep into one test with many assertions. Cases are separate tests or generated per-field by a table-driven loop producing individually named cases. A single mega-test scores zero: the first failing field masks the rest.",
      "max_score": 12
    }
  ]
}

SKILL.md

tile.json