{
  "id": 16674538,
  "title": "92 Green Field Tests Meant Nothing Until I Counted Which Could Lie",
  "url": "https://urgent.news/2026/10/26/92-green-field-tests-meant-nothing-until-i-counted-which-could-lie",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-26T23:22:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/debashish_ghosal/92-green-field-tests-meant-nothing-until-i-counted-which-could-lie-2kic"
  },
  "original_language": "en",
  "account": "The 92 green field tests for agentwatch did not hold significant value until the author analyzed which tests could potentially fail if their assertions turned out to be false. After conducting a census, the author discovered that around 8 of the 94 case assertions could fail if the claims they were checking were proven false. The author then proceeded to examine each case, grouping them into four distinct patterns. This method allowed the author to identify specific fixes for each pattern, ultimately reducing the number of required fixes from 84 individual cases to just four.\n\nPattern A involved cases where the shipped test already covered the plan condition, meaning that the corresponding pytest module already existed. A prime example was the offline verifier test, test_browser_verifier.py. By reusing this existing pytest module, the author saved time and effort while still ensuring the necessary checks were performed.\n\nPattern B concerned drivers that ran but lacked conditional checks. In these cases, the driver executed the real CLI, received the JSON output, and simply printed \"ok: ...\", without verifying the contents of the JSON. The fix for this pattern was straightforward: the author parsed the JSON and asserted the expected contract, deriving the necessary information from the data provided by the driver.\n\nPattern C involved cases where existence was being mistaken for function. Examples included checking the existence of files, parsing JSON files, and importing modules. The author addressed these cases by rewriting the assertions to verify the actual conditions that the tests were meant to check, rather than relying on mere existence.\n\nLastly, Pattern D dealt with cases that required additional tools or dependencies not present in the current environment. These cases were labeled as \"blocked\" and the exact missing tools were identified, ensuring that future attempts to address these cases would be more focused and effective.\n\nIn conclusion, the author's approach of systematically analyzing the green field tests and categorizing them into specific patterns led to a more efficient and targeted hardening process. By identifying and addressing the underlying issues in each pattern, the author was able to transform the green suite from a superficial indicator of running tests to a trustworthy source of truth for the system's behavior. The final tally of 92 PASS, 0 FAIL, 1 declared failure, and 1 N/A demonstrated the effectiveness of this approach, as 90 out of the 92 grounded cases were confirmed to be valid. This process emphasizes the importance of leveraging existing test suites, understanding their capabilities, and making them capable of failing when necessary to ensure the system's true state is accurately represented.",
  "summary": "The v0.2.0 field test for agentwatch ran 94 cases across 15 suites. 92 passed. 0 failed. It was the least trustworthy green I'd ever shipped. Not because anything was failing — because I couldn't say why it was passing. So I did a census. Of the 94 case assertions, how many could fail if the claim they were checking turned out to be false ? The answer was about 8. The census Every case had a step…",
  "key_points": [
    "92 green field tests had limited value initially",
    "8 out of 94 assertions could potentially fail",
    "Systematic analysis reduced required fixes to 4"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}