Ask a Question

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

SOLVED
ykrrishna
Occasional Contributor

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.

7 REPLIES 7
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.


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
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 ! 🙂

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


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
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
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!!

ykrrishna
Occasional Contributor

If I have understood correct, all you have to do is to update the Run status of a test set represented by a TestRunId in QA Complete.

 

To my knowledge, it can be done simply with the TestRunId. You can see the object StatusCode.

https://support.smartbear.com/qacomplete/docs/developer/api/soap/reference/test-management/testrunre...

 

You can update the status with SOAP Request and send it to the QA Complete API with any of the per-defined values like

  • Awaiting Run – The step is not performed yet.

  • Passed – The step is performed successfully.

  • Failed – The step is failed.

  • Blocked – The step cannot be performed, because one of the previous critical steps failed.

 

This should do the trick. And, if you still need to know the TestReslutId, the Test Result Id corresponds to each TestCase (TestRunItem) in a Test Run. You can use the TestRunItemId and retrieve the TestRunResultId.

https://support.smartbear.com/qacomplete/docs/developer/api/soap/reference/test-management/testrunre...

 

TestRunItemId can be retreived with the TestRunId. With LoadByCriteria, it will return an array of values that are present in the Test Set represented by the TestRunId.

https://support.smartbear.com/qacomplete/docs/developer/api/soap/reference/test-management/testrunit...

 

I can elaborate further if you still have any doubts.

 

 

 

cancel
Showing results for 
Search instead for 
Did you mean: