Logo di Redamon Testing

Redamon Testing

CommunityPopolare
samugit83
redamon-testing

Come vengono eseguiti davvero i test di RedAmon e come scriverli: il controllo Docker per ogni file, i livelli unit, integration e live, e i casi di errore che fanno sembrare superata una verifica che in realtà non lo è. Attiva questa skill quando: modifichi un file test_*.py, *.test.ts(x) o tests/*.sh; un test ha esito negativo, viene saltato o è contrassegnato come xfailed; ti viene chiesto di «eseguire i test», «farli passare tutti» o controllare la copertura; modifichi redamon.sh cmd_test, tooling/scripts/pytest_isolated.py, un file conftest.py o un file pytest.ini.

Add to TypingMind

Panoramica

Pubblicato dasamugit83
Repositoryredamon
Nome della skillredamon-testing
Stelle
2.5K
Fork
504
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da samugit83 su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Redamon Testing in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/samugit83/redamon/tree/master/skills/redamon-testing
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/samugit83/redamon.git /tmp/redamon
mkdir -p .claude/skills
cp -r /tmp/redamon/skills/redamon-testing .claude/skills/redamon-testing
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Redamon Testing in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Redamon Testing non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Redamon Testing non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

When to Use

  • Writing or fixing a test anywhere in the repo, or deciding where a new test goes.
  • A test is red/skipped/xfailed and you must decide whether it is real.
  • You were asked to run the suite or verify a change "works".

The repo-wide rule "never validate with host pytest, use the Docker gate" lives in the root AGENTS.md CRITICAL RULES; this skill is everything after that: isolation, tiers, and how to write a test that asserts something.


Critical Rules

  • NEVER run pytest across a whole tree in one process. Many tests stub langchain/langgraph into sys.modules and bake tool objects against a fake @tool at import time, so whichever file collects first decides for all of them. You get phantom failures in files you never touched (classically a coroutine was expected, got <MagicMock>). Run ./redamon.sh test, or one file / node id. The gate exists for this: tooling/scripts/pytest_isolated.py runs each FILE in its own subprocess.
  • NEVER "fix" source because a test went red in a multi-file run. Re-run that one file in isolation first; if it passes alone the failure was pollution, not a bug.
  • NEVER print("SKIP..."); return to skip a test. pytest records that as PASSED while asserting nothing. Use self.skipTest(...) inside a TestCase or pytest.skip(...) in a bare function.
  • NEVER read a green gate as "the live checks passed". A self-skipping test that needs a service prints SKIP and exits 0, and the gate containers have no Neo4j, so the live-graph schema checks in recon/tests/test_schema_catalog.py SKIP in every CI run. Their hermetic counterparts in recon/tests/test_graph_writes_documented.py do run. Neither sees everything: the code scan cannot see the ~22 labels written with SET n += $props (the names are built in Python and appear in no file), and the live graph cannot see a feature this deployment never ran. After a schema change, run the live one against a stack before believing it.
  • NEVER rewrite an assertion so it passes. If a test reveals a real bug, mark it @pytest.mark.xfail(strict=True, reason=...) and say so. Tests must not enshrine bugs.
  • NEVER put a recon test in the root tests/ folder. Root tests/ runs in the agent image; recon files there must be listed in _ROOT_RECON_TESTS at redamon.sh:4476 or they run against the wrong image and fail on imports. New recon tests go in recon/tests/.
  • NEVER add a third-party import to a test without checking it is in the section image. Only pytest, pytest-cov, pytest-xdist, pytest-asyncio (requirements-test.txt) are guaranteed; anything else errors the whole file at collection. Prefer unittest.mock and the stdlib.
  • ALWAYS assert behaviour, not execution. For a tool wrapper, assert both the parsed result and the command that was built. Verify the patch target against the source (recon/tests/test_arjun.py broke when subprocess.run became Popen and the mocks kept targeting run).
  • ALWAYS make a test that needs a stack, binary, service or git HEAD skip cleanly. A hard failure on a missing prerequisite is a bug in the test.

Assert the command a wrapper BUILDS (the direction most often skipped)

python
from recon.helpers.nuclei_helpers import build_nuclei_command   # the seam under test

cmd = build_nuclei_command(targets_file="/tmp/t.txt", output_file="/tmp/o.jsonl",
                           docker_image="projectdiscovery/nuclei:latest", dast_mode=True)
assert "-dast" in cmd            # the flag we asked for is present
assert cmd.count("-dast") == 1   # and not duplicated by a second code path

Reference: recon/tests/test_nuclei_two_pass.py. For a wrapper that also parses tool output, mock the tool (patch subprocess.run) and assert both the parsed result and the command from mock_run.call_args.

Where a test goes, and its tier

Tier is auto-assigned by filename in each conftest.py (live checked first). An explicit @pytest.mark.{unit,integration,live} wins, on the file or on a single test - the gate passes the tier to pytest as -m, so an opted-out test inside a unit-named file really is skipped:

Filename containsTierMeaning
live_, _live, _smoke, smoke_liveneeds a stack/service; self-skips
_integration.py, _skill.py, _e2eintegrationcross-layer / heavy deps
anything elseunithermetic; this is the gate
TestingPut it inTier
recon module / tool wrapperrecon/tests/unit
agent graph, nodes, tools, promptsagentic/tests/unit
graph_db, knowledge_base, supply_chain_*, mcproot tests/unit
redamon.sh / compose / deploy shell logictests/*_test.shbash, in the gate (shell section)
webapp React/TSnext to the source *.test.ts(x)vitest

Commands

bash
./redamon.sh test                 # unit gate, every section + webapp vitest; must be 100% green
./redamon.sh test all             # unit + integration (NOT live)
./redamon.sh test coverage        # per-section floor via REDAMON_COV_FLOOR
./agentic/run_tests.sh            # agent section only; per-file isolated
./agentic/run_tests.sh tests/test_foo.py::TestX::test_y   # single node id (already isolated)

An unbuilt image is skipped, not failed - read the section headers before trusting "all green".


Resources

Domande frequenti

Cosa fa la skill IA Redamon Testing?

Come vengono eseguiti davvero i test di RedAmon e come scriverli: il controllo Docker per ogni file, i livelli unit, integration e live, e i casi di errore che fanno sembrare superata una verifica che in realtà non lo è. Attiva questa skill quando: modifichi un file test_*.py, *.test.ts(x) o tests/*.sh; un test ha esito negativo, viene saltato o è contrassegnato come xfailed; ti viene chiesto di «eseguire i test», «farli passare tutti» o controllare la copertura; modifichi redamon.sh cmd_test, tooling/scripts/pytest_isolated.py, un file conftest.py o un file pytest.ini.

Perché usare Redamon Testing su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Redamon Testing è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Redamon Testing in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/samugit83/redamon/tree/master/skills/redamon-testing. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Redamon Testing?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Redamon Testing?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Redamon Testing: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Redamon Testing è gratuita?

Sì. È pubblicata su GitHub da samugit83 con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇