Command-Line Options

Warning: so-called contract initializers are mentioned in the --help but are not currently supported.

The full list of options (for the nominal mode) is obtained with --help:

$ techelson --help
techelson v0.7.0

USAGE:
    ../bin/techelson [OPTIONS] -- [FILES]*
    ../bin/techelson [OPTIONS] testgen [TESTGEN_OPTIONS] [-- DIR]?

OPTIONS:
    -h, --help
            prints this help message
    -v, --verb <int>?
            increases or sets verbosity [default: 1]
    -q
            decreases verbosity
    -s, --step (on|true|True|no|off|false|False)?
            (de)activates step-by-step evaluation [default: false]
    --skip (on|true|True|no|off|false|False)?
            if true, all steps will automatically advance (and `--step` will be set to
            false) [default: false]
    --contract <string> ',' <string>?
            adds a contract to the test environment. The second optional argument is the
            contract's initializer.

MODES:
    testgen
        activates and controls test generation
    run `../bin/techelson <MODE> --help` to obtain help on a specific mode. For example: `../bin/techelson testgen --help`

Modes

Modes available:

Techelson's modes are triggered by simply passing the name of the mode as an argument. For instance,

$ techelson --contract rsc/simpleExample/contracts/simpleExample.tz testgen -n 2
done generating tests for contract SimpleExample
Running test `SimpleExampleTest1`

running test script...
   timestamp: 1970-01-01 00:00:00 +00:00

applying operation CREATE[uid:0] (@address[1], "blake2b:11a6ffbc9fb85", None, false, false, 638557938255190utz) "SimpleExample"
   timestamp: 1970-01-01 00:00:00 +00:00
   live contracts: none
=> live contracts: SimpleExample (638557938255190utz) address[1]

running test script...
   timestamp: 1970-01-01 00:00:00 +00:00

applying operation TRANSFER[uid:1] address[0]@SimpleExampleTest1 -> address[1] 120584798270008utz True
   timestamp: 1970-01-01 00:00:00 +00:00
   live contracts: SimpleExample (638557938255190utz) address[1]

running TRANSFER[uid:1] address[0]@SimpleExampleTest1 -> address[1] 120584798270008utz True
   timestamp: 1970-01-01 00:00:00 +00:00
=> live contracts: SimpleExample (759142736525198utz) address[1]

running test script...
   timestamp: 1970-01-01 00:00:00 +00:00

Done running test `SimpleExampleTest1`
Running test `SimpleExampleTest2`

running test script...
   timestamp: 1970-01-01 00:00:00 +00:00

applying operation CREATE[uid:0] (@address[3], "blake2b:", (Some "blake2b:"), true, true, 290035844265409utz) "SimpleExample"
   timestamp: 1970-01-01 00:00:00 +00:00
   live contracts: none
=> live contracts: SimpleExample (290035844265409utz) address[3]

running test script...
   timestamp: 1970-01-01 00:00:00 +00:00

applying operation TRANSFER[uid:1] address[2]@SimpleExampleTest2 -> address[3] 520090578679187utz True
   timestamp: 1970-01-01 00:00:00 +00:00
   live contracts: SimpleExample (290035844265409utz) address[3]

running TRANSFER[uid:1] address[2]@SimpleExampleTest2 -> address[3] 520090578679187utz True
   timestamp: 1970-01-01 00:00:00 +00:00
=> live contracts: SimpleExample (810126422944596utz) address[3]

running test script...
   timestamp: 1970-01-01 00:00:00 +00:00

applying operation TRANSFER[uid:2] address[2]@SimpleExampleTest2 -> address[3] 845034275504874utz False
   timestamp: 1970-01-01 00:00:00 +00:00
   live contracts: SimpleExample (810126422944596utz) address[3]

running TRANSFER[uid:2] address[2]@SimpleExampleTest2 -> address[3] 845034275504874utz False
   timestamp: 1970-01-01 00:00:00 +00:00
=> live contracts: SimpleExample (1655160698449470utz) address[3]

running test script...
   timestamp: 1970-01-01 00:00:00 +00:00

Done running test `SimpleExampleTest2`

You can have techelson print the options for mode <mode> with techelson <mode> --help.

Test Generation

Given a contract, this mode is in charge of generating a testcase automatically. The relevant chapter of this book is Test Generation.

$ techelson testgen --help
Generates testcases for some contract(s). If a directory is provided, the testcases will
be dumped there. Otherwise techelson will just run the testcases it generated.

USAGE:
    ../bin/techelson [OPTIONS] testgen [TESTGEN_OPTIONS] [-- DIR]?

TESTGEN_OPTIONS:
    -h, --help
            prints this help message
    -n, --count <int>
            sets the number of testcases to generate [default: 1]