Attaching TestComplete Logs to QC Execution Logs

Applies to TestComplete 15.63, last modified on April 23, 2024

During the test run, TestComplete (TestExecute) posts information about all the actions it performs to the test log. By default, if your Quality Center project is configured to create a defect when a test fails, Quality Center attaches the TestComplete test log to the created defect. However, you can also modify your Quality Center workflow script to attach TestComplete test logs to Quality Center execution logs:

  • In Quality Center, open the project template.

  • Select Tools | Customize from Quality Center’s main menu.

  • Select the Workflow section and open Script Editor.

  • In Script Editor, open the script that you use to run TestComplete tests and modify it:

    • Find the following line:

      ScriptFile.WriteLine("result = RunInTestComplete(GetPjs(UnZip(TAttach)),theTest.Name)")

      Change the line as follows:

      ScriptFile.WriteLine("result = RunInTestComplete(GetPjs(UnZip(TAttach)),theTest.Name,CurrentRun)")
    • Find the following line:

      ScriptFile.WriteLine("Function RunInTestComplete(PathToPjs,projectName)")

      Change it as follows:

      ScriptFile.WriteLine("Function RunInTestComplete(PathToPjs,projectName,CurrentRun)")
    • Find the following line:

      ScriptFile.WriteLine("Set LastResult = IntegrationObject.GetLastResultDescription")

      Insert the following script lines before the line (keep the line unchanged):

      ScriptFile.WriteLine("Set Attachment = CurrentRun.Attachments.AddItem(NULL)")
      ScriptFile.WriteLine("Attachment.FileName = fileNameLog")
      ScriptFile.WriteLine("Attachment.Type = 1 '(TDATT_FILE) or 2 (TDATT_INTERNET) for URL")
      ScriptFile.WriteLine("Attachment.Description = ""TestComplete Log""")
      ScriptFile.WriteLine("Attachment.Post")
  • Save the changes.

See Also

Attaching TestComplete Logs to QC Test Runs
TestComplete Connector for HP Quality Center - How To
TestComplete Connector for HP Quality Center

Highlight search results