PICT generates test cases and test configurations. https://github.com/microsoft/pict
I want to run the executable pict.exe
through a java program. I tried using Runtime.getRuntime.exec()
, it ran without any errors but no output file was generated.
package com.test.CommandLine;
public class CommandLineTest {
public static void main(String[] args) {
String execPath = "resources\\pict.exe";
String param = "resources\\CarOrderApp.txt > resources\\CarOrderApp.xls";
runPict(execPath, param);
}
public static void runPict(String execPath, String param) {
try {
Process process = Runtime.getRuntime().exec(execPath + " " + param);
}
catch (Exception e) {
System.out.println(e.getMessage() + "\n");
e.printStackTrace();
}
}
}
This is my project Structure: