Skip to main content

CLI testing

SHAFT provides terminal, Docker, SSH, and file actions with the same reporting model used by browser and API tests.

Open the terminal actions reference for executable examples and result handling.

SHAFT.CLI terminal = new SHAFT.CLI();
String output = terminal.performTerminalCommand("echo Hello SHAFT");

SHAFT.Validations.assertThat().object(output).contains("Hello SHAFT");