Quantcast
Channel: Quality Center / ALM Practitioners Forum topics
Viewing all articles
Browse latest Browse all 5491

Updating Run Result to customized status as "Pass with Comments"

$
0
0

Hi,

 

I have following Run Status defined for a test case, in the Test Lab

- Passed

- Failed

- Pass with Comments

- N/A

- Not completed

 

I am implementing a rule for Run Status: When test steps have status as "Passed" or "Pass with Comments", the Run Status should be displayed as "Pass with Comments".

 

I have written below code under "Run_AfterPost"

 

Sub Run_AfterPost
	On Error Resume Next
' =========== START -- Code for Req 24 =====================
	dim com, com1, td, td1, temp, temp1, rec, rec1
	set td = TDConnection
	set com = td.Command
	com.CommandText = "SELECT RN.RN_STATUS AS Run_Status FROM RUN RN JOIN CYCLE CY ON CY.CY_CYCLE_ID = RN.RN_CYCLE_ID WHERE RN.RN_RUN_ID = " & Run_Fields("RN_RUN_ID").Value
	set rec = com.Execute
	temp  = rec.FieldValue(Run_Status)

	set td1 = TDConnection
	set com1 = td1.Command
	com1.CommandText = "SELECT ST.ST_STATUS AS Step_Status FROM STEP ST JOIN RUN RN ON RN.RN_RUN_ID = ST.ST_RUN_ID JOIN CYCLE CY ON CY.CY_CYCLE_ID = RN.RN_CYCLE_ID WHERE ST.ST_STATUS = 'Pass with Comments' AND RN.RN_RUN_ID = " & Run_Fields("RN_RUN_ID").Value
	set rec1 = com1.Execute
	temp1 = rec1.FieldValue(Step_Status)

	Select Case temp
		Case "Passed"

			Select Case temp1
				Case "Pass with Comments"
				Run_Fields.Field("RN_STATUS").Value = "Pass with Comments"
			End Select
	End Select
' =========== END -- Code for Req 24 =====================
	On Error GoTo 0
End Sub

 

This is not working and RN_STATUS remains "Passed".

Can anyone help?

 

Thanks in advance. 

 

Regards

Aboli


Viewing all articles
Browse latest Browse all 5491

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>