Overview
Placeholder issue — requirements will be refined in a future update.
Add the ability to execute external executable scripts (shell scripts, binaries, etc.) from inside a command handler component, triggered as part of a test suite run.
Background
Spring Shell 4.0.2 (used by this project) does not provide built-in script execution support — that feature was removed in the 3.x/4.x rewrite. However, Java's ProcessBuilder can be used directly inside a command handler method to launch external processes. This approach is:
- Thread-safe:
ProcessBuilder and Process instances live on the call stack; no shared mutable state in the singleton bean
- GraalVM native-image compatible:
ProcessBuilder is a JDK core class with no reflection or dynamic proxy requirements
Potential use cases (to be refined)
- Pre/post hooks around a test suite run (e.g. seed a database, start a mock server, clean up)
- Inline script steps within a test case sequence
- External validation scripts triggered by assertion results
Notes
- Must not affect thread safety of existing singleton beans
- Must remain GraalVM native-image compatible (no runtime reflection)
- Script execution behaviour (blocking vs. async, stdout/stderr capture, exit-code handling) to be decided during requirements refinement
Overview
Add the ability to execute external executable scripts (shell scripts, binaries, etc.) from inside a command handler component, triggered as part of a test suite run.
Background
Spring Shell 4.0.2 (used by this project) does not provide built-in script execution support — that feature was removed in the 3.x/4.x rewrite. However, Java's
ProcessBuildercan be used directly inside a command handler method to launch external processes. This approach is:ProcessBuilderandProcessinstances live on the call stack; no shared mutable state in the singleton beanProcessBuilderis a JDK core class with no reflection or dynamic proxy requirementsPotential use cases (to be refined)
Notes