Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

How do I make Silk Central Test Manager display correct result status from third party tests?

How do I make Silk Central Test Manager display correct result status from third party tests?

Problem:

How do I make Silk Central Test Manager display correct result status from third party tests?

Resolution:

When Silk Central Test Manager retrieves the results files from the working folder on the assigned execution server if reads the output.xml file automatically to ascertain the error count / warning count and other information. While the output.xml file is created automatically for SilkTest or Performer testcases we will need to create it ourselves for other test type such as WSH or Perl. The user must pass in the error or warning count etc as part of the scripts error-handling. Below (and attached) is the code that will need to be appended to your scripts for Silk Central Test Manager to detail the results correctly. The user will have to pass in the error counts and warning counts.

The output.xml file has to be in the following format

The Perl Script

#!c:\perl\bin\perl.exe use Fcntl;
#The Module sysopen (THERESULTS, "output.xml", O_RDWR|O_EXCL|O_CREAT, 0755);

#Create the output.xml file

$nooferror = 3;
$noofwarning = 4;
#output.xml must be in the correct format

printf THERESULTS "\n";
printf THERESULTS "\n";
printf THERESULTS "$nooferror\n";

#Number of error encountered in you"re the script
printf THERESULTS "$noofwarning\n";
#Number of warning encountered in you"re the script

printf THERESULTS "false\n";
printf THERESULTS "\n";
printf THERESULTS "some_message_text_\n";

#Message to appear in Results -> Messages

printf THERESULTS "Error\n";
#Message Severity printf THERESULTS "

\n";
printf THERESULTS "

\n"; close (THERESULTS);
sysopen (THEERRORS, "error.txt", O_RDWR|O_EXCL|O_CREAT, 0755);

#Create a Result.txt file. Here you can document errors that occurred

printf THEERRORS "Error - unable to open file\n";
printf THEERRORS "Error - Window is Not Found\n";
close (THEERRORS);

The information passed to Silk Central Test Manager is detailed here.

The Windows Scripting Host Script

WScript.Echo "starting"

Dim outFile
Dim errCnt
Dim noofwarning

outFile = "output.xml"
resultsOut = "results.txt"
errCnt = 1

" retrieve that from your test results

noofwarning = 2 Set FSO = CreateObject("Scripting.FileSystemObject")
Set oTX = FSO.OpenTextFile(outFile, 2, True, 0)

#Create the output.xml file
#output.xml must be in the correct format
oTX.WriteLine("")
oTX.WriteLine("")
oTX.WriteLine("" & errCnt & "")
#Number of error encountered in you"re the script
oTX.WriteLine("" & noofwarning & "")
#Number of warning encountered in you"re the script
oTX.WriteLine("false")
oTX.WriteLine("")
oTX.WriteLine("some_message_text_")
#Message to appear in Results -> Messages
oTX.WriteLine("Error ")
#Message to appear in Results -> Messages
oTX.WriteLine("")
oTX.WriteLine("")
oTX.Close()

Set FSO2 = CreateObject("Scripting.FileSystemObject")
Set oTX2 = FSO.OpenTextFile(resultsOut, 2, True, 0)

#Create a Result.txt file. Here you can document errors that occurred
oTX2.WriteLine("Error - unable to open file")
oTX2.WriteLine("Error - Window is Not Found")
oTX2.Close()


The information passed to Silk Central Test Manager is detailed here.


The PERL Script
PerlResults.pls

The WSH Script
outputXmlWriteExample.vbs


Related documents:


Old KB# 24663

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:47
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.