-
Notifications
You must be signed in to change notification settings - Fork 395
Closed
Labels
area/documentationBelongs to documentationBelongs to documentationtype/enhancementIs an enhancement requestIs an enhancement request
Milestone
Description
I would like to run a basic integration test that starts the interactive or non-interactive shell to verify that the spring application is able to properly start up.
In spring shell 3.x I did:
@Test
void nonInteractiveShellStarts() {
ShellTestClient.InteractiveShellSession session = client.interactive().run();
await().atMost(Duration.ofSeconds(2)).untilAsserted(() -> ShellAssertions.assertThat(session.screen()).containsText("shell"));
session.write(session.writeSequence().text("help").carriageReturn().build());
await().atMost(Duration.ofSeconds(2)).untilAsserted(() -> ShellAssertions.assertThat(session.screen()).containsText("...")); // check that all commands are registered
}
In spring shell 4.x I tried:
@Test
void interactiveShellStarts(@Autowired ShellTestClient client) throws Exception {
client.sendCommand("help"); // throws command not found
}
How could I do a basic smoke test to see if the spring shell starts properly and all my commands are registered and shown with the 'help' command?
Metadata
Metadata
Assignees
Labels
area/documentationBelongs to documentationBelongs to documentationtype/enhancementIs an enhancement requestIs an enhancement request