venkat reddy padala
venkat reddy padala

Reputation: 553

How to Update / Execute Test case result in QC ALM from Excel

I am executing Test cases in QC. It is updating the result in Test Run but not updating the Test Status.

Set RunF = tstInstance.RunFactory
runName = "Run_" & Month(Date) & "-" & Day(Date) & "_" & Hour(Now) & "-" & Minute(Now) &         "-" & Second(Now)
Set NewRun = RunF.AddItem(Null)
NewRun.Status = "Passed"
NewRun.Name = runName
NewRun.Post
NewRun.Post

When I use testInstance.Field("TC_EXEC_STATUS")="Passed" it is updating the test result but adding extra Test run as "FAST_RUN".

Is there anything I am missing that will update test status automatically based on the Test run Stats without adding the extra Fast Run?

Upvotes: 2

Views: 3865

Answers (1)

Marco smdm
Marco smdm

Reputation: 1045

There are different way to do that. I was stuck with the same issue few days back.

This is happening due to a bug in the QC ALM when creating a new run by using the REST API.

Best workaround/way to solve by using REST API is: 1) Create a run with status "Not Completed"

2) Update the run you have just created with value "Passed" --> this will "pass" also the test lab and test plan. All will be correct and the PASS is visible from requirements till test plan :-)

Another way not so clever is:

1) Update directly the test set you want to pass --> this will automatically generate a FAST_RUN under run.

2) You need to find that last run created and update all the information you need (For instance owner, duration and so on.)

Stupid way to solve by using REST API is: 1) Create a run with status "Passed" as it should normally be --> same will be reflected in the requirements (If linked), but not to the Test Plan and Test Lab.

2) Update under "Test Lab" your test --> this will "pass" also the test lab and test plan. Unfortunately you will notice that more than the previous RUN, also a FAST_RUN is created in the "Test Runs".

3) Ignore the FAST_RUN that was created and go ahead.

Discussion you can find in forum: https://community.hpe.com/t5/Quality-Center-ALM-Practitioners/ALM-REST-API-Updating-Test-Instance-Status-without-creating-a/td-p/6727316

Hope this solve the query and question can be close. Please let me know. Have a nice day.

Upvotes: 2

Related Questions