Karate has excellent support for calling external processes via the command-line. You can block and wait for output or you can even fork a process on a separate thread and listen to the output from the test.
The best documentation is present in this answer on Stack Overflow
Using cURL to simulate non-standard HTTP request Karate and SSH