Логотип Regression Testing

Regression Testing

Спільнота
nahid-sparktales
regression-testing

Turn a fixed bug into a test that fails on the old code and passes on the new one. Assert behavior at the cheapest useful level and compare old behavior without reverting unrelated work or leaving scratch files. Use after a fix or when recurring defects lack coverage; not for a new feature's test strategy or an environmental/cosmetic failure.

Огляд

Видавецьnahid-sparktales
Репозиторійagent-dispatcher
Назва навичкиregression-testing
Зірки
58
Форки
5
Файли в пакеті
1
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 1

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: nahid-sparktales. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Regression Testing у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/quality/regression-testing
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nahid-sparktales/agent-dispatcher.git /tmp/agent-dispatcher
mkdir -p .claude/skills
cp -r /tmp/agent-dispatcher/skills/quality/regression-testing .claude/skills/regression-testing
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Regression Testing в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Regression Testing, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Regression Testing не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Regression testing

A test written after the fix, run once, green, proves only that the code currently passes it. It becomes a regression test at the moment you watch it fail against the old code — until then it may be asserting nothing at all.

When this fires

  • A bug has been fixed and the fix is about to be reported as done.
  • A defect has recurred, so the previous fix had no test or the test did not cover the real case.
  • A test exists for a fix but was never observed failing without it.

It does not fire for new-feature coverage, for test strategy, or before the cause is understood — a test pinning a symptom you cannot explain pins the wrong thing.

Procedure

  1. Restate the defect as a behavioural assertion. Given this input and this state, the system should do this. If that sentence cannot be written, the diagnosis is not finished (systematic-debugging), and the test will end up asserting the implementation instead.
  2. Decide whether a test is the right tool at all. See When not to write one below. Write nothing rather than something that will be deleted as noise in a month.
  3. Pick the cheapest level that can actually observe the defect. Unit when the cause lives in one function; integration when it lives in the wiring between two; end-to-end only when the bug is invisible below the full stack. A slow test at the wrong level catches the bug once and taxes every run afterwards.
  4. Assert the observable contract, not the patch. Assert the returned value, the persisted row, the rendered output, the raised error. A test that asserts a mock was called, or pokes a private helper the fix introduced, will pass forever and catch nothing — including the same bug arriving by another route.
  5. Make the assertion specific to this defect. "Does not raise" passes for a function that returns nothing useful. Assert the value, the message, the count, the order — whatever the bug got wrong.
  6. Run it against the old code and watch it fail. Prefer an isolated in-memory old implementation or inline python3 -B -c 'CODE' check. Do not stash/revert the user's working tree merely to demonstrate failure. If a scratch copy is necessary and permitted, use a uniquely owned temporary-directory context with cleanup in finally, and verify its absence afterward. Never use a shared fixed /tmp name or a project sibling. Read the failure. This is the step that makes it a regression test rather than an assertion. The failure message should name the defect; if it says "expected true, got false", improve it now, because the next person to see it will be debugging under time pressure.
  7. Restore the fix and run it green. Both observations, in that order, are the deliverable.
  8. Make it deterministic. No real clock, no network, no sleeps, no dependence on test order or on a fixture another test mutates. Run it several times and on its own as well as in the suite. A flaky regression test gets skipped, then deleted, and the bug comes back unguarded.
  9. Name it for the behaviour, not the ticket. test_expired_token_is_rejected, with the issue link in a comment. test_bug_4417 tells a future reader nothing about what broke.
  10. Put it where the suite already keeps tests of that kind, then run the whole file and the suite once. A new test that quietly breaks an existing one through a shared fixture is a new bug, not coverage.

When not to write one

  • The failure was environmental — an expired certificate, a bad deploy value, a full disk. The guard belongs in configuration validation, a startup check or monitoring. A unit test asserting the certificate is valid tests nothing about the code.
  • The assertion would restate the implementation line for line — a corrected constant or a copy string, where the test is the same edit written twice and fails on every legitimate change.
  • The bug is timing-dependent and only reproduces occasionally. A test that fires one run in fifty is a future flake. Prefer a deterministic reproduction — injected clock, controlled scheduler, forced ordering — or assert the invariant that the race violates. If neither is reachable, say so rather than committing a coin flip.
  • The bug is in a dependency. Test your workaround and its trigger condition, not their defect.
  • The code is being deleted or rewritten within the change — the test would be born stale.

In each case the report says a regression test was deliberately not written, and why. That is a decision; silence looks like an oversight.

Checklist

  • The defect is stated as a behavioural assertion
  • The level chosen is the cheapest one that can observe it
  • The assertion is on observable behaviour, not on the fix's internals
  • The test was run against the old code and seen to fail
  • The failure message names the defect
  • The test passes with the fix restored
  • It is deterministic — run repeatedly, alone and in the suite
  • The full suite still passes
  • Or: no test was written, and the reason is recorded

Failure handling

  • It passes against the old code — it is not testing the defect. Go back to step 1; usually the assertion is on the wrong layer or too loose.
  • It fails against the old code for the wrong reason — an import error, a missing fixture. That is not a reproduction. Fix the harness and look again.
  • Old behavior cannot be compared within scope — report that limitation. Do not expand filesystem scope merely to obtain red/green proof. Reconstruct it in memory or use the permitted owned-directory procedure above; never edit shared/deployed code to force failure.
  • Cleanup fails or is denied — report the exact owned path as unresolved. Do not claim only the requested files were changed. A clean project diff does not cover temporary writes.
  • Reproducing it needs a real outward-facing or destructive action — a live payment, a real email, production data, a shared account. Stop and ask. Use a sandbox, a fixture or a recorded interaction; never wire a test to send real messages or mutate real records.
  • The suite has no place for this kind of test — say so and propose where it should live. Inventing a parallel test setup nobody runs is worse than no test.

Evidence to report

The test's path and name; the command that runs it; the failure output from the run against the old code, quoted; the passing output with the fix; and confirmation the rest of the suite still passes. A test that was created and one that was executed and one that was proven to fail without the fix are three different claims — report which you have. Where no test was written, report the reason in its place.

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Regression Testing?

Turn a fixed bug into a test that fails on the old code and passes on the new one. Assert behavior at the cheapest useful level and compare old behavior without reverting unrelated work or leaving scratch files. Use after a fix or when recurring defects lack coverage; not for a new feature's test strategy or an environmental/cosmetic failure.

Навіщо використовувати Regression Testing у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Regression Testing — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Regression Testing у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/quality/regression-testing. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Regression Testing?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Regression Testing?

Зі скількома забажаєте. У TypingMind ви можете використовувати Regression Testing із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Regression Testing?

Так. На GitHub цю навичку публікує nahid-sparktales за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇