Interface ShellTestClient

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
ShellTestClient.DefaultShellClient

public interface ShellTestClient extends Closeable
Client for terminal session which can be used as a programmatic way to interact with a shell application. In a typical test it is required to write into a shell and read what is visible in a shell.
  • Method Details

    • interactive

      Run interactive shell session.
      Returns:
      session for chaining
    • nonInterative

      Run non-interactive command session.
      Parameters:
      args - the command arguments
      Returns:
      session for chaining
    • screen

      ShellScreen screen()
      Read the screen.
      Returns:
      the screen
    • builder

      static ShellTestClient.Builder builder(TerminalSession terminalSession, Shell shell, PromptProvider promptProvider, org.jline.reader.LineReader lineReader, org.jline.terminal.Terminal terminal)
      Get an instance of a builder.
      Parameters:
      terminalSession - the terminal session
      shell - the shell
      promptProvider - the prompt provider
      lineReader - the line reader
      terminal - the terminal
      Returns:
      a Builder