Skip to content

testgen command ​

Generate a test program for the public procedures of a module: a compile-checked skeleton from facts, completed by the LLM, built and run in a scratch copy of the project, and kept only when it builds, runs and checks something.

bash
fobis testgen MODULE [options]

How to use it, with examples: AI assistance.

All options ​

Arguments: MODULE

OptionValueDefaultDescription
--fobos, -fTEXTSpecify a "fobos" file named differently from "fobos"
--fciAssume fobos inputs as case insensitive
--modeTEXTSelect a mode defined into a fobos file
--src, -sTEXTRoot-directory of source files [default: ./]
--procedure, -pTEXTTest only this public procedure or generic (repeatable).
--maxINTEGERTest at most this many procedures [default: 8 with the model, all with --skeleton].
--skeletonNo model: the compile-checked skeleton (declarations and calls, no checks) only.
--contextPrint what the model would receive, run no model.
--applyWrite the accepted program to the test directory (fobos [test] test_dir, default test/) as test_<module>.f90; an existing file is never overwritten.
--output, -oTEXTWith --apply, write to this path instead.
--retriesINTEGER3Attempts after the first one, each with the errors of the previous.
--timeoutFLOAT60.0Seconds a test program may run.
--formatTEXTtextOutput format: text or json.