I am looking to fetch the results folder from silk central so that I can place my qtp results in the same folder and thereby upload them to silk central. I know that the parameter #sctm_test_results_dir
can be used in Java with System.getproperty
and it works if my test is a Silk4J
test. I have an executable jar file with steps to zip the results and place in the #sctm_test_results_dir
directory and I call this JAR file from QTP
. But the value returned for the results dir is null
. It works fine if I try it as a keyword driven silk4j test though. Any help is appreciated.
The below code is the JAR file which I call from QTP using
Systemutil.Run "cmd",""/K "&str01,""
... where str01
is:
"cd c:\ "&chr(38)&chr(38)&chr(32)&"java -jar " &chr(34) & JarFilePath & chr(34) & chr(32) & SrcPath
JAR file :
String Destpath=System.getenv("#sctm_test_results_dir");
// ^ returns null
System.out.println("Sourcepath :"+Sourcepath);
System.out.println("DestinationPath :"+Destpath);
zip_pack(Sourcepath,Destpath+"\\test_z001.zip");
// ^ function to zip contents
System.out.println("Zip complete");`
Thanks!