Sub-commands and Arguments
Common arguments to all sub-commands:
-qor--quietSet verbosity level to 0-vor--verboseIncrease verbosity level
Overview of sub-commands:
config
Print config of the current project
init
Initialize project to run the testsuite with autofonce
list
Print testsuite of the current project
new
Create a new test by running a command
promote
Promote tests results as expected results
run
Run testsuite of the current project
autofonce config
Print config of the current project
DESCRIPTION
List the tests, with their numeric identifier, their name and their location in the testsuite files.
USAGE
autofonce config [OPTIONS]
Where options are:
-E TESTSUITE.shor--env TESTSUITE.shEnv file for all tests-I DIRAdd DIR to search path for tests-T TESTSUITE.ator--at TESTSUITE.atPath of the file containing the testsuite-t TESTSUITEor--testsuite TESTSUITEName of the testsuite to run (as specified in ‘autofonce.toml’)
autofonce init
Initialize project to run the testsuite with autofonce
DESCRIPTION
To run tests with autofonce, tests typically require some environment variables to be set. For that, autofonce uses a file named autofonce.toml in the project (or .autofonce). autofonce will also use this file to create a directory _autofonce/ where tests are run and results are kept.
This command can be used to create the file autofonce.toml in the current directory.
Yet, in some cases, autofonce knows the project in which you are and can provide you with an example of autofonce.toml for that particular project.
You can use the following command to list known projects:
$ autofonce init --list
You can then select the project using:
$ autofonce init -p gnucobol
autofonce will also inspect the path to see if it recognize the name of a project it knows. In such cases, you won’t need to provide the project name, as it is automatically detected.
USAGE
autofonce init [OPTIONS]
Where options are:
-for--force-updateForce creation/update if file already exists-lor--list-knownList known projects with environment files-p PROJECTor--project PROJECTSet project name to infer config
autofonce list
Print testsuite of the current project
DESCRIPTION
List the tests, with their numeric identifier, their name and their location in the testsuite files.
USAGE
autofonce list ID [OPTIONS]
Where options are:
IDExec ending at test ID-Aor--match-allRun tests matching all keywords instead of only one-E TESTSUITE.shor--env TESTSUITE.shEnv file for all tests-For--failedRun only previously failed tests (among selected tests)-I DIRAdd DIR to search path for tests-N KEYWORDor--not KEYWORDSkip tests matching KEYWORD-T TESTSUITE.ator--at TESTSUITE.atPath of the file containing the testsuite--failures REASONRun failed tests with given failure--ge IDor--after IDExec starting at test ID-i IDor--ids IDRun only test ID-k KEYWORDor--keywords KEYWORDRun only tests matching KEYWORD--le IDor--before IDExec ending at test ID-t TESTSUITEor--testsuite TESTSUITEName of the testsuite to run (as specified in ‘autofonce.toml’)
autofonce new
Create a new test by running a command
DESCRIPTION
Runs the command, captures its retcode, stdout and stderr and generates the corresponding autoconf testsuite file.
USAGE
autofonce new ARGUMENTS [OPTIONS]
Where options are:
ARGUMENTSList of arguments-c FILECapture file in AT_CAPTURE_FILE(…)-f FILEStore file in AT_DATA(…)-k KEYWORDStore keyword in AT_KEYWORDS(…)--name NAMEStore name in AT_SETUP(…)-o FILEor--output FILEName of generated file
autofonce promote
Promote tests results as expected results
DESCRIPTION
After an unsucessful testsuite run, use this command to promote the results of tests to expected status.
USAGE
autofonce promote ID [OPTIONS]
Where options are:
IDExec ending at test ID-1or--j1Use Sequential scheduling of tests-Aor--match-allRun tests matching all keywords instead of only one-E TESTSUITE.shor--env TESTSUITE.shEnv file for all tests-For--failedRun only previously failed tests (among selected tests)-I DIRAdd DIR to search path for tests-N KEYWORDor--not KEYWORDSkip tests matching KEYWORD-Sor--keep-allKeep all directories of tests-T TESTSUITE.ator--at TESTSUITE.atPath of the file containing the testsuite--applyApply promotion (default is to diff)--auto-run INTPromote and run until all tests have been promoted--diffDiff promotion (default)--diff-args ARGSPass these args to the diff command-eor--stop-on-failureStop on first failure--failures REASONRun failed tests with given failure--fake .EXTApply promotion to create new files with extension .EXT--ge IDor--after IDExec starting at test ID-i IDor--ids IDRun only test ID-j NJOBSSet maximal parallelism-k KEYWORDor--keywords KEYWORDRun only tests matching KEYWORD-lor--print-seqPrint results immediately (default is to print a summary at the end)--le IDor--before IDExec ending at test ID--no-cleanDo not clean _autofonce/ dir on startup--not-exitDo not promote exit code-o TESTSUITEor--output TESTSUITEPath of the output file (default: _autofonce/results.log)--print-allPrint also expected failures-sor--keep-moreKeep directories of skipped and expected failed-t TESTSUITEor--testsuite TESTSUITEName of the testsuite to run (as specified in ‘autofonce.toml’)
autofonce run
Run testsuite of the current project
DESCRIPTION
Run the testsuite.
autofonce expects the existence of either autofonce.toml or .autofonce.
autofonce.toml is required to configure the tests that will be run, depending on the project. Check the following command for more information:
$ autofonce init --help
Before running the tests, you may want to list the test in the current testsuite with:
$ autofonce list --help
To run tests, autofonce will create a directory _autofonce/ in the directory containing the file autofonce.env.
Every test is run independantly in a test directory with its number in the _autofonce/ directory. The test directory is removed if the test does not fail, or if it was expected to fail. Use the –keep-more argument to keep directories of tests that have been skipped or were expected to fail. Use the –keep-all argument to keep all directories.
You can select which tests to run, by selecting a range of tests using –after TEST or –before TEST, by selecting individual tests identifiers using –id NUM or by selecting keywords using –keyword KEYWORD.
autofonce will only display failed tests on its output. You can use the argument –print-all to display all tests that were not OK, or just read the generated file _autofonce/results.log.
USAGE
autofonce run ID [OPTIONS]
Where options are:
IDExec ending at test ID-1or--j1Use Sequential scheduling of tests-Aor--match-allRun tests matching all keywords instead of only one-E TESTSUITE.shor--env TESTSUITE.shEnv file for all tests-For--failedRun only previously failed tests (among selected tests)-I DIRAdd DIR to search path for tests-N KEYWORDor--not KEYWORDSkip tests matching KEYWORD-Sor--keep-allKeep all directories of tests-T TESTSUITE.ator--at TESTSUITE.atPath of the file containing the testsuite--auto-promote INTPromote and run until all tests have been promoted--diff-args ARGSPass these args to the diff command-eor--stop-on-failureStop on first failure--failures REASONRun failed tests with given failure--ge IDor--after IDExec starting at test ID-i IDor--ids IDRun only test ID-j NJOBSSet maximal parallelism-k KEYWORDor--keywords KEYWORDRun only tests matching KEYWORD-lor--print-seqPrint results immediately (default is to print a summary at the end)--le IDor--before IDExec ending at test ID--no-cleanDo not clean _autofonce/ dir on startup--not-exitDo not promote exit code-o TESTSUITEor--output TESTSUITEPath of the output file (default: _autofonce/results.log)--print-allPrint also expected failures-sor--keep-moreKeep directories of skipped and expected failed-t TESTSUITEor--testsuite TESTSUITEName of the testsuite to run (as specified in ‘autofonce.toml’)