Forum Discussion

ykrrishna's avatar
ykrrishna
Occasional Contributor
8 years ago

Updating Test Step details of a Run item in QAComplete with API triggered from Testcomplete Script

I am using TestComplete Project with Python language for Running my automated scripts.

 

With this I am triggering a Run with the test set ID in QAComplete and fetching the Test Run details and carrying on my execution.

 

After the completion, i can update the entire test item (test case) as per link https://support.smartbear.com/viewarticle/90201/ which in turn passes all the test steps and updates the status of the entire run as well.

 

But, I now require to do the following with the test steps which I have no progress so far,

 

1) Updating the passed test steps with screenshots

I could see no classification of the object attachment for each step (Which is possible of course manually) in the provided API doc.

 

2) When a test step fails, I have to fail that particular step alone, instead of failing the entire case, which in turn fails all the steps within it.

 

For updating the status of the test step, i found the link https://support.smartbear.com/viewarticle/90099/ but in this when i try to load the xml of a test run item (test case) I cannot fetch the tag of Actual Results, "<actualresults></actualresults>" in the response received. However, if i try to manipulate the xml manually and send it as a request, the API accepts it and gives out a 200 response, but no changes are reflected in the QAComplete run status.

 

I have a feeling that am missing something, but not sure what it is. So looking for help from you Experts

 

Thanks in advance.

 

PS: Happy to share any additional info required to solve the issue.

  • Nastya_Khovrina's avatar
    Nastya_Khovrina
    SmartBear Alumni (Retired)

    Hi Krishna,

     

    1. To add an attachment to a Test Step you need to user the Attachments_Add Operation: https://support.smartbear.com/viewarticle/90347/

    Use EntityCode = Teststeps

     

    2. If a Test has a failed Test Step, the status of this Test can be only "Failed". To update a Test Step use the TestSteps_Update Operation: https://support.smartbear.com/viewarticle/90211/

     

    If you have additional questions, please share your xml requests and provide more details.

    • ykrrishna's avatar
      ykrrishna
      Occasional Contributor

      Nastya_KhovrinaThanks for the Reply. The issue is solved now. I did however use the same PIS suggested by you.

       

      The gap was identified as I was trying to update all the steps in a test cases at the same instant, which later I realized as illogical !!!

       

      Thanks for your time ! :)

    • SruthePrakash's avatar
      SruthePrakash
      New Contributor

      Hi,

       

      I want to attach screenshot against each test step of a testcase in QAComplete and i tried using Attachments_Add.

       

       

      If "TestSteps" is passed in "EntityCode" for Attachments_Add, what will be passed in FKId?

       

      Also, How to be sure that the Test Step to Test Case Link is done properly, so that the screenshots are appropriately attached? 

       

      Assuming "TestStep number" is being passed to "FKId", where to specify the teststep's corresponding testcase id?

       

      // <Attachment>
              <FKId>3</FKId>
              <EntityCode>TestSteps</EntityCode>
              <FileName>doc.pdf</FileName>

      </Attachment> //

       

      • Nastya_Khovrina's avatar
        Nastya_Khovrina
        SmartBear Alumni (Retired)

        Hi,

         

        - What will be passed in FKId?

        Please see the description of the FKId field (Attachment Object):

        FKId: integer

        The ID of the QAComplete item (a release, defect and so on) that contains the attachment. For defects, this is the defect’s BugID property; for releases - the release’s Id and so on.

         

        So, you need to specify an ID of a Test Step in this field.

         

        - Where to specify the teststep's corresponding testcase id?

        There is no way to specify it.

  • aarti9489's avatar
    aarti9489
    New Contributor

    I want to know about below scenario,

     

    1. I want to update Test Run Result (TestRunResults_Update Operation) but stuck into one point which ll not allow me to go ahead. I am trying to achieve this by using QAComplete SOAP API with this link "https://support.smartbear.com/viewarticle/90239/" .   To achieve this I need "TestRunResultId " :  integer (The unique identifier of the test run result.) , I am not able to see TestRunResultId in QAC. Can you please help me with this, Where can I get or how I can get that Id??
    2. PFA attachment which contains similar diff Id (like Test Id, Test Run Id, Test Run Item Id, etc. )

    Your response in this regard is greatly appreciated!!

  • aarti9489's avatar
    aarti9489
    New Contributor

    I have below question,

    1. I want to update Test Run Result (TestRunResults_Update Operation) but stuck into one point which ll not allow me to go ahead. I am trying to achieve this by using
    QAComplete SOAP API with this link "https://support.smartbear.com/viewarticle/90239/" .   To achieve this I need "TestRunResultId " :  integer (The unique identifier of the test run result.) , I am not able to see TestRunResultId in QAC. Can you please help me with this, Where can I get or how I can get that Id??
    2. PFA attachment which contains similar diff Id (like Test Id, Test Run Id, Test Run Item Id, etc. )

    Your response in this regard is greatly appreciated!!