Created On:  29 May 2012

Problem:

When using the 'Insert an Image' button, the image is not uploaded to the SCTM server.  Therefore when generating a report, the image is not displayed.  How can we add an image in a Test Step description that will be visible in the Manual Test Definition Document?

Resolution:

This is a known issue because of the following reasons:

1) SilkCentral Test Manager does not support pasting images in Test Steps using the drag and drop functionality.  Using Firefox as an example, it is possible to drag and drop images into Test Steps.  This is due to a feature of Firefox that embeds the image data into the generated HTML code, which Internet Explorer and other browsers current do not achieve.

The recommended and supported method to add images to a Test Step is to use the 'Insert an Image' button and then specify the image url.

Note: In order for other users of SCTM to be able to view the image in the Test Step, the image must be stored on a webserver or a shared location.  For a local SCTM user, this is not required and images can for example be stored on the C drive.

Therefore, to insert an image into a Test Step description, use the following steps:

          a) Create a new step in a Manual Test
          b) In the Action description area of the step, click the 'Insert an Image' button and add the image by url (e.g C:\Images\2.3.JPG).


          c) Perform the same step for the Expected Results.
          d) Click OK to save the step.
          e) You should see the image in both the editable area of the Action Description and the Expected Result, however,
              in the display area, only a part of the image might be showing until you expand the column to accommodate the size of the image.



2) We are also aware of the issue with the display of the inserted image in the Manual Test Definition Document.  This issue is resolved by updating the SQL query of the Manual Test Definition Document and using the updated Manual Tests report template (Manual Tests_updated.rptdesign).  In the steps below, we have made a copy of the Manual Test Definition Document report.

To be able to display the inserted image in the report:

          a) Download the attachment 'Manual Tests_updated.rptdesign'
          b) Upload this report to the reports template area of SCTM in Administration | Report Templates, name the new template 'Manual Tests Updated'.
          c) Go to Reports and create a new report.
          d) Copy the SQL statement below and paste it into the Advanced Query of the report created in Step 3.

SELECT td.TestName AS "Test Definition Name",
  td.Description AS "Test Definition Description",
  td.PlannedTime AS "Planned Time",
  ms.Name AS "Step Name",
  ms.Description AS "Step Descr",
  ms.Result AS "Step Result Info",
  td.TestID ManualTestDefID,
  ms.StepID_pk AS StepID

  FROM (SELECT t.NodeID_pk AS TestID, t.Name AS TestName, t.Description, t.PlannedTime,
        CASE WHEN td.IsDataDrivenInstance=1 THEN t.ParentNodeID_fk
          ELSE (CASE WHEN t.CloneNodeID_fk is not Null THEN t.CloneNodeID_fk
                  ELSE t.NodeID_pk END)
        END AS DefinitionID, td.*
        FROM TM_TestPlanNodes t
           INNER JOIN TM_TestDefinitions td
             ON (t.NodeID_pk = td.TestPlanNodeID_pk_fk) AND td.TestType = '_ManualTestType'
        WHERE t.ProjectID_fk=${$PROJECTID}
  ) td
  INNER JOIN TM_ManualSteps ms ON (td.TestID = ms.TestAssetNodeID_fk)
  WHERE td.IsRegularTestDefinition = 1 AND
  td.TestName LIKE '${testName|%Link Attachments to Requirements%|Manual Test Definition Name}'
  ORDER BY td.TestName, ms.SequenceNumber


          e) Save the report
          f) Go the parameters tab of the report and specify the name of the Manual Test that contains the steps with the image.
          g) Click the Report tab and select the 'Manual Tests Updated' report template to view a HTML version of the report with images.


          h) In order to get a full html version of the report, click the button 'Open in new window';
              you are also able to view a PDF version of the report by clicking 'Show as PDF Document' button.

          Alternatively, you can download and install CutePDF.  Once installed, you will be able to click File | print in the Internet Explorer
          and select CutePDFWriter to print the HTML page containing the report with images to a pdf document.