Class ShellTestClient

java.lang.Object
org.springframework.shell.test.ShellTestClient

public class ShellTestClient extends Object
Client for shell session which can be used as a programmatic way to interact with a shell application. In a typical test, it is required to send a command to the shell as if a user typed it and then verify the shell output.
Author:
Janne Valkealahti, Mahmoud Ben Hassine
  • Constructor Details

  • Method Details

    • sendCommand

      public ShellScreen sendCommand(String input) throws Exception
      Execute a command and write its result to the shell screen.
      Parameters:
      input - the raw input command
      Returns:
      the shell screen after command execution
      Throws:
      Exception - if an error occurred during command execution