Command-line reference
This page describes some key concepts before you use CHKware.
There are two parts to CHKware tool.
- The command line tool
chk, that you can run.chksupported sub-commands are listed below. - The specification files those contains configuration in YAML based dsl. These files have extension
.chk.
Supported sub-commands
chk http [Options] [FILE].chk [VARIABLEn=VALUEn]This sub command runs a file written in http specification file format.
After you execute this command
chkshould make request by given request format, and display the response. You can also customize the response withexposekey. see usage and documentation.
Options
--result, -roptional: When you put this option, the you'll see only the result.--no-format, -nfoptional: When you put this option, the result will not be formatter.
Arguments
[FILE].chkrequired: File that you want to execute.[VARIABLEn=VALUEn]optional: Pass variables from command-line. format: variableName1=value1[space]variableName2=value2
chk testcase [Options] [FILE].chkThis sub command runs a file written in testcase specification file format.
After you execute this command
chkshould re-usehttputility to request as per given structure on the file, execute test assertions, and display the result of the assertions. See example.
Options
--result, -roptional: When you put this option, the you'll see only the result.--no-format, -nfoptional: When you put this option, the result will not be formatter.
Arguments
[FILE].chkrequired: File that you want to execute.[VARIABLEn=VALUEn]optional: Pass variables from command-line. format: variableName1=value1[space]variableName2=value2
Specification files
Test specification files are written in YAML, having file extension .chk. So, before you start writing any specification file, you MUST have a proper knowledge of YAML, see YAML cheatsheet. We are using this specific extension (.chk) so these files do not make you confuse in typical project layout.
In the future evolution path of CHKware we are going to introduce more and more specification options and specification types and versions.