Forum Discussion

dgubert86's avatar
Occasional Contributor
10 years ago

Post log to Jira automatically

How I can post log to Jira automatically? 

8 Replies

  • Philip_Baird's avatar
    Community Expert
    Hi, the Script Extension Alexei refers to uses the (now marked for deprecation) Jira SOAP/RPC Web Service API.


    The other caveat to it is that it also uses functions such as WebServices::CreateWebServiceInfo() which requires the Web Service Testing Plug-Ins be installed, as detailed here.

    The new Jira REST Web Service API offer the resource /rest/api/2/issue/{issueIdOrKey}/attachments as documented here.

    The only issue around it is the following:


    "This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. Most client libraries have classes that make dealing with multipart posts simple. For instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST."


    and the example provided isn't that useful.


    It should be possible to write a small .Net or Java library that can be accessed via the CLR or Java Bridge that can POST to this resource.


    Having never tried it, I am not sure if the multipart POST can be done using the XMLHttpRequest object provided by the Test Complete Scripting interface.



    Phil Baird

  • Philip_Baird's avatar
    Community Expert
    Hi Denis, from where do you want to post the log? from a Script after a test run? or somewhere else?


    Phil Baird
  • TanyaYatskovska's avatar
    SmartBear Alumni (Retired)
    Hi Denis,


    Currently, it's possible to post the test results to Jira only from TestComplete's GUI. We have a suggestion in our DB to implement the possibility of the automatic export - I've increased its rating based on your question. 


    In the meantime, you can try to implement this by using Adrian's suggestion.


    • rome_castillo's avatar
      Occasional Contributor

      Hi Tanya,


      Just wondering if the feature to automatically post to Jira has been implemented in the latest TestComplete (10.5)?  If not, I would like to request this feature as well.



      • kcoffrin's avatar


        Good Morning:

        Just wondering if the feature/update for automatically sending a bug report via a Log File has been added to Test Complete 11?  Any progress update on this would be great!



  • AlexKaras's avatar
    Champion Level 3
    Hi Denis,

    In addition to the replies by Tanya and Adrian, the functionality mentioned by Tanya is implemented via Script Extension that can be found in the <TestComplete>\Bin\Extensions\ScriptExtensions\JiraSupport.tcx file. This is a Zip archive with the .tcx extension. Go through the script extensions section in TestComplete help and use the mentioned extension as a code sample. I hope that you'll be able to implement what you need.

    (Well, maybe this script extension is implemented on the base of the Jira Cli mentioned by Adrian, I just don't know...)