Absent Member.
Absent Member.
3263 views

Html results to display in Silk Central

In my tests I call a batch file that executes some java code and generates an html report. How can I take the results of that html report and output it in my silk central results? 

Tags (1)
0 Likes
7 Replies
Absent Member.
Absent Member.

Hi vb22,

If you want the resulting file to have an impact of the test status of your execution you will need to generate an output.xml file from your java code. What you will then do is upload this to the SCTM_EXEC_RESULTSFOLDER.

If you upload an output.xml file to this location during an execution it will then be processed by Silk Central.

Below you will find an example output.xml file, as to what kind of structure your file needs to take:

<ResultElement TestItem="ProcesExecutorScript">

 <ErrorCount>1</ErrorCount>

 <WarningCount>1</WarningCount>

 <Incident>

   <Message>some unexpected result</Message>

   <Severity>Error</Severity>

   <Detail>

     <TestName>Calculator</TestName>

     <Info>java.lang.numberformatexception</Info>

   </Detail>

 </Incident>

</ResultElement>

This file will then be processed by Silk Central and mark this run as failed.

You will still be able to upload your HTML file to the run as an attached file, by passing this to the results folder, but it will not have an impact on your result.

Thanks,

Matthew

0 Likes
Absent Member.
Absent Member.

Is there any way I can add that html file to my timeline? The one accessed from runs>runID>timeline

0 Likes
Absent Member.
Absent Member.

Hi vb22,

It is currently not possible to display the contents of your HTML file in the timeline, just a link to the document.

If this is something you would like to see included in Silk Central, what I would suggest is to log a feature enhancement request using our uservoice:

borland.uservoice.com/.../163509-silk-central-feature-requests

This will allow other users to vote on your feature if they would like to see this included within Silk Central as well.

Thanks,

Matthew

0 Likes
Absent Member.
Absent Member.

Or my log.txt?

Tags (1)
0 Likes
Absent Member.
Absent Member.

What about my log.txt file? Can I append or replace it with the contents of my html file?

0 Likes
Absent Member.
Absent Member.

Hi vb22,

To add any lines to the log.txt that you want to display, you can use the echo command in your batch file so that this will be output to the log.txt file.

Echo 'Text Here'

This will display 'Text Here' in the log.txt file.

You are not able to add the contents of your HTML output which is generated through the java script but you can use the Echo command, to add any needed comments here.

I have added an image how this would look on your timeline with the link to the HTML document and the Echo output:

Thanks,

Tags (2)
0 Likes
Absent Member.
Absent Member.

Sorry for the confusion in the posts. Thanks for your help!

0 Likes
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.