I am trying to figure out how to execute DOS commands, or potentially launch a batch file from a test step. I am submitting JSON files to another application from TAP, but I need to launch the other application first before I can run any of the test steps. I am sure you can do this, but I have not been able to find any reference to this in the documentation, or on Google.
There will be log files updated from my application, and I think I can figure out how to check those files for status of launching the application, but will need to do this as well.
Have you tried something like this? I tend to use it with xcopy and various drives. The issue I have had is the cmd window can’t open in minimized so it’s awkward when spawning a lot of tasks rapidly. One solution is to prepend the command with start and set the minimized option. The problem when doing this is loss of the returned (error level) value.
Step_CommandLine.cs (3.6 KB)
Try using the “Run Program” step which comes by default with OpenTAP, to execute CMD commands with arguments. It also has regex for the output of the command.
You can use the “If Verdict” step for conditions.
This looks like it would give me a lot of control, I may try to adopt this.
Any idea where I could get more details on this. Going through the TAP manual, not seeing anything obvious.