Spring CLI not found 'test' command

803 Views Asked by At

I have installed spring-2.2.4.RELEASE on Windows 10 but when I try to execute test via "spring test", command line shows "'test' is not a valid command. See 'help'." and I type help command the followings are what I saw:

Available commands are:

  run [options] <files> [--] [args]
    Run a spring groovy script

  grab
    Download a spring groovy script's dependencies to ./repository

  jar [options] <jar-name> <files>
    Create a self-contained executable jar file from a Spring Groovy script

  war [options] <war-name> <files>
    Create a self-contained executable war file from a Spring Groovy script

  install [options] <coordinates>
    Install dependencies to the lib/ext directory

  uninstall [options] <coordinates>
    Uninstall dependencies from the lib/ext directory

  init [options] [location]
    Initialize a new project using Spring Initializr (start.spring.io)

  encodepassword [options] <password to encode>
    Encode a password for use with Spring Security

  shell
    Start a nested shell

Yes, there is no test command but I google every spring cli test tutorial they all apply 'test' command for cli groovy test. So questions are:

  1. Windows version of Spring CLI doesn't support 'test'command?
  2. Do I miss some installations?
  3. Or 2.2.4 version just support another way to execute test not by 'test' command Furthermore, if I execute run command it also run test groovy script, is there anyway to exclude test once startup applications?

Thank you

1

There are 1 best solutions below

0
Andy Wilkinson On BEST ANSWER

Support for testing in the CLI (the test command) was removed in Spring Boot 2.0. The recommendation is that “once an app gets to the stage of requiring a test suite, it should be converted to a Maven or Gradle project”.