Skip to content

Quickstart

Julio Merino edited this page Apr 13, 2015 · 1 revision

Quickstart Guide

Installing Kyua

Visit Installation for details on how to install from binary packages (if available) or from sources.

Writing a test

Kyuafile

  • A Kyuafile is used as input to the kyua command-line utility. The Kyuafile specifies other test programs to run as part of the test suite. The other test programs can be implemented in C, C++, shell script, or any other programming language.
  • This document describes the [[Kyuafile format|http://manned.org/kyuafile.5]].
  • Comments in Kyuafiles start with double hyphens, -- , and continue to the end of the line. (Kyuafiles are Lua scripts.)
  • A Kyuafile must be in the same directory as the test program which it calls. A single Kyuafile may invoke multiple test programs, but all the test programs specified in the Kyuafile must be in the same directory as the Kyuafile.
  • A Kyuafile may include Kyuafiles from other directories. This is how a single Kyuafile can be used to drive test programs in multiple directories.

Writing a plain test

  • A plain test is a simple program which can be written in any programming language. The output of the program does not need to follow any format.
  • A plain test can only have a single test case in one program.
  • Refer to: Writing a plain test

Writing an ATF test

Writing a TAP test

Executing a test suite

To execute a test suite, cd to the directory that contains a Kyuafile and type:

kyua test

More details are in kyua-test(1).

Generating a test report

After executing a test suite, you can generate a test report.

Further References