The Nikita API is simple and concise. It also powerful and comes with a lot of functionalities. This section detail the subtleties of the API organized by topics. A lot of effort were made to illustrate each topic with clear examples.
Before going through the documentation, you must be familiar with the core concept of Nikita described in the tutorial.
The topics of this section are organized by relevance, the first ones being considered as the most relevant ones.
- Call and user defined handlers
Nikita gives you the choice between calling your own function, which we call handlers, or calling an registered function by its name.
- Sync and async execution
The status is an information indicating whether an action had any impact or not. It's meaning may differ from one action to another, for example: touching a file, modification of a configuration file, checking if a port is open, ...
- Local and remote (SSH) execution
Actions are designed to run transparently either locally or remotely through SSH. The tests are themselves written to run in both modes.
- Conditions and assertions
Conditions and assertions are a set of options available to every handlers to control and guaranty their execution.
- Debugging and Logging
Nikita provides multiple mechanisms to report, dive into the logs and intercept instructions. Most of them can be instantaneously activated and you are provided with simple building blocks to quickly write your own.
- Events API
A Nikita session extends the native Node.js Events API. It provides a facility to listen to internal notification and know the current state of the program.
- Control Flow
Nikita run every actions sequentially. This behavior ensures there are no conflict between two commands executed simultaneously. Moreover, this sequential nature is aligned with SSH which execute one command at a time over a given connection.
- Error handling
Nikita implements error management by following familiar Node.js conventions. The handling of errors different slightly between synchronous and asynchronous functions.