Reputation: 41
I need to build a test bench by sending appropriate inputs to an application. However, once I launch the application, it takes control and does not return to the command prompt (unless an exit command is executed from the application). In that case is there any technique by which I can send a command to that application from the Perl script and interpret the output from that application?
My operating system is Windows.
Upvotes: 0
Views: 109
Reputation: 8304
If there is anyway to write or redirect the application output to a file, you can always open that file to process/interpret the output. If you are talking about a command-line application, it should be easy to redirect the terminal output to a file using the '>' and '>>' characters. It may not be as easy with a GUI app, though.
Upvotes: 0
Reputation: 1771
If it's a GUI application, take a look at the Win32::GuiTest module. It sends events to GUI applications - simulating user input.
For a command line application, I would normally recommend the Expect module. Unfortunately, Expect doesn't work under Windows.
Upvotes: 1