Skip to main content

Command-line reference

This page describes some key concepts before you use CHKware.

There are two parts to CHKware tool.

  1. The command line tool chk, that you can run. chk supported sub-commands are listed below.
  2. 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 chk should make request by given request format, and display the response. You can also customize the response with expose key. see usage and documentation.

Options

  • --result, -r optional: When you put this option, the you'll see only the result.
  • --no-format, -nf optional: When you put this option, the result will not be formatter.

Arguments

  • [FILE].chk required: File that you want to execute.
  • [VARIABLEn=VALUEn] optional: Pass variables from command-line. format: variableName1=value1[space]variableName2=value2

  • chk testcase [Options] [FILE].chk

    This sub command runs a file written in testcase specification file format.

    After you execute this command chk should re-use http utility to request as per given structure on the file, execute test assertions, and display the result of the assertions. See example.

Options

  • --result, -r optional: When you put this option, the you'll see only the result.
  • --no-format, -nf optional: When you put this option, the result will not be formatter.

Arguments

  • [FILE].chk required: 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.