| 5009 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
' Unit Test Log
|
|
|
5 |
' Displayed as Tab within a Package Version
|
|
|
6 |
'
|
|
|
7 |
' Globals:
|
|
|
8 |
' parRtag_id,parPv_id
|
|
|
9 |
'=====================================================
|
|
|
10 |
%>
|
|
|
11 |
<%
|
|
|
12 |
Option explicit
|
|
|
13 |
' Good idea to set when using redirect
|
|
|
14 |
Response.Expires = 0 ' always load the page, dont store
|
|
|
15 |
%>
|
|
|
16 |
<!--#include file="common/conf.asp"-->
|
|
|
17 |
<!--#include file="common/globals.asp"-->
|
|
|
18 |
<!--#include file="common/formating.asp"-->
|
|
|
19 |
<!--#include file="common/qstr.asp"-->
|
|
|
20 |
<!--#include file="common/common_subs.asp"-->
|
|
|
21 |
<!--#include file="common/common_dbedit.asp"-->
|
|
|
22 |
<!--#include file="_tabs.asp"-->
|
|
|
23 |
<!--#include file="_action_buttons.asp"-->
|
|
|
24 |
<!--#include file="common/_package_common.asp"-->
|
|
|
25 |
<%
|
|
|
26 |
'------------ ACCESS CONTROL ------------------
|
|
|
27 |
%>
|
|
|
28 |
<!--#include file="_access_control_general.asp"-->
|
|
|
29 |
<%
|
|
|
30 |
'------------ Variable Definition -------------
|
|
|
31 |
Dim biQry
|
|
|
32 |
Dim utQry
|
|
|
33 |
Dim rsQry
|
|
|
34 |
'------------ Constants Declaration -----------
|
|
|
35 |
'------------ Variable Init -------------------
|
|
|
36 |
'----------------------------------------------
|
|
|
37 |
' Get a set of Build Instances for the current package
|
|
|
38 |
' Populates biQry
|
|
|
39 |
Sub getBuildInstances
|
|
|
40 |
Dim query
|
|
|
41 |
query = _
|
|
|
42 |
"select bi.BUILD_ID, bi.PV_ID, bi.RTAG_ID,pv.pkg_id," &_
|
|
|
43 |
" SUBSTR(pj.PROJ_NAME, 0, 60) as PROJ_NAME, " &_
|
|
|
44 |
" pj.PROJ_ID, " &_
|
|
|
45 |
" SUBSTR(rt.RTAG_NAME, 0, 60) as RTAG_NAME, " &_
|
|
|
46 |
" TO_CHAR(bi.TIMESTAMP, 'Dy DD-Mon-YYYY HH24:MI:SS') as TIMESTAMP, " &_
|
|
|
47 |
" DECODE(bi.reason, 'N', 'New Version', 'R', 'Ripple', 'Unknown') as REASON" &_
|
|
|
48 |
" from BUILD_INSTANCES bi, " &_
|
|
|
49 |
" projects pj, " &_
|
|
|
50 |
" RELEASE_TAGS rt, " &_
|
|
|
51 |
" packages p, " &_
|
|
|
52 |
" PACKAGE_VERSIONS pv" &_
|
|
|
53 |
" where bi.PV_ID = pv.pv_id " &_
|
|
|
54 |
" and pv.PKG_ID = p.PKG_ID" &_
|
|
|
55 |
" and bi.RTAG_ID = rt.RTAG_ID" &_
|
|
|
56 |
" and rt.proj_id = pj.proj_id" &_
|
|
|
57 |
" and bi.PV_ID = :PV_ID" &_
|
|
|
58 |
" order by bi.BUILD_ID desc"
|
|
|
59 |
|
|
|
60 |
Set biQry = nothing
|
|
|
61 |
|
|
|
62 |
OraDatabase.Parameters.Add "PV_ID", parPv_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
63 |
Set biQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
|
|
|
64 |
OraDatabase.Parameters.Remove "PV_ID"
|
|
|
65 |
End Sub
|
|
|
66 |
|
|
|
67 |
' Get a set of test results for a specified build instance
|
|
|
68 |
' Populates utQry
|
|
|
69 |
Sub getTestResults(nBuildId)
|
|
|
70 |
Dim query
|
|
|
71 |
query = _
|
|
|
72 |
"select * from " &_
|
|
|
73 |
" TEST_RUN tr" &_
|
|
|
74 |
" where tr.BUILD_ID = :BUILD_ID" &_
|
|
|
75 |
" order by PLATFORM desc,TYPE desc"
|
|
|
76 |
|
|
|
77 |
Set utQry = nothing
|
|
|
78 |
|
|
|
79 |
OraDatabase.Parameters.Add "BUILD_ID", nBuildId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
80 |
Set utQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
|
|
|
81 |
OraDatabase.Parameters.Remove "BUILD_ID"
|
|
|
82 |
End Sub
|
|
|
83 |
|
|
|
84 |
%>
|
|
|
85 |
<html>
|
|
|
86 |
<title><%=Title(Request("rtag_id"))%></title>
|
|
|
87 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
88 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
89 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
|
|
90 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
|
|
91 |
<script language="JavaScript" src="images/common.js"></script>
|
|
|
92 |
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
|
|
|
93 |
|
|
|
94 |
<!-- DROPDOWN MENUS -->
|
|
|
95 |
<!--#include file="_menu_def.asp"-->
|
|
|
96 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
|
|
97 |
</head>
|
|
|
98 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
|
|
|
99 |
<!-- MENU LAYERS -------------------------------------->
|
|
|
100 |
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
|
|
|
101 |
<!----------------------------------------------------->
|
|
|
102 |
</div>
|
|
|
103 |
<!-- HEADER -->
|
|
|
104 |
<!--#include file="_header.asp"-->
|
|
|
105 |
<!-- BODY ---->
|
|
|
106 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
107 |
<tr>
|
|
|
108 |
<td valign="top" width="1" background="images/bg_bage.gif">
|
|
|
109 |
<!-- LEFT -->
|
|
|
110 |
<!--#include file="_environment.asp"-->
|
|
|
111 |
</td>
|
|
|
112 |
<td width="1" bgcolor="#999999"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
|
|
|
113 |
<td valign="top" width="100%">
|
|
|
114 |
<!-- MIDDLE -->
|
|
|
115 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
116 |
<tr>
|
|
|
117 |
<td width="1%" background="images/bg_action_norm.gif"><IMG height=35 src="images/spacer.gif" width=15></td>
|
|
|
118 |
<td width="100%" background="images/bg_action_norm.gif"><%Call RenderActionBar(parRtag_id,parPv_id)%></td>
|
|
|
119 |
<td width="1%" background="images/bg_action_norm.gif"><IMG height=1 src="images/spacer.gif" width=15></td>
|
|
|
120 |
</tr>
|
|
|
121 |
<tr>
|
|
|
122 |
<td background="images/bg_lght_gray.gif"><IMG height="45" src="images/spacer.gif" width=1></td>
|
|
|
123 |
<td background="images/bg_lght_gray.gif"><%Call RenderStatus(parRtag_id,parPv_id)%></td>
|
|
|
124 |
<td background="images/bg_lght_gray.gif"> </td>
|
|
|
125 |
</tr>
|
|
|
126 |
<tr>
|
|
|
127 |
<td background="images/bg_lght_gray.gif"> </td>
|
|
|
128 |
<td valign="bottom" background="images/bg_lght_gray.gif">
|
|
|
129 |
<table width="100" border="0" cellspacing="0" cellpadding="0">
|
|
|
130 |
<tr>
|
|
|
131 |
<td><IMG height="1" src="images/spacer.gif" width="0" alt="tab-left-margin" ></td>
|
|
|
132 |
<td>
|
|
|
133 |
<!-- TABS ------------------------------------->
|
|
|
134 |
<%Call Generate_Tab_Menu ( TABarray1, "Unit Test", "orange" )%>
|
|
|
135 |
</td>
|
|
|
136 |
</tr>
|
|
|
137 |
</table>
|
|
|
138 |
</td>
|
|
|
139 |
<td background="images/bg_lght_gray.gif"> </td>
|
|
|
140 |
</tr>
|
|
|
141 |
<tr>
|
|
|
142 |
<td background="images/lbox_bg_orange.gif"><IMG height=35 src="images/spacer.gif" width=1></td>
|
|
|
143 |
<td background="images/lbox_bg_orange.gif">
|
|
|
144 |
<!-- TAB ACTION BUTTONS ------------------------------------->
|
|
|
145 |
</td>
|
|
|
146 |
<td background="images/lbox_bg_orange.gif"> </td>
|
|
|
147 |
</tr>
|
|
|
148 |
<tr>
|
|
|
149 |
<td></td>
|
|
|
150 |
<td valign="top">
|
|
|
151 |
<!-- DETAILS ------------------------------------------------->
|
|
|
152 |
<br>
|
|
|
153 |
<span class="body_colb">Build and Unit Test Results</span><br>
|
|
|
154 |
<table class="full_table">
|
|
|
155 |
<tr class="form_field_hdr">
|
|
|
156 |
<td nowrap">Project </td>
|
|
|
157 |
<td nowrap">Release </td>
|
|
|
158 |
<td nowrap">Time </td>
|
|
|
159 |
<td nowrap">Reason </td>
|
|
|
160 |
</tr>
|
|
|
161 |
<%
|
|
|
162 |
Call getBuildInstances
|
|
|
163 |
%>
|
|
|
164 |
<%If biQry.RecordCount < 1 Then%>
|
|
|
165 |
<tr class="form_item_grey" >
|
|
|
166 |
<td nowrap> </td>
|
|
|
167 |
<td nowrap> </td>
|
|
|
168 |
<td nowrap> </td>
|
|
|
169 |
<td nowrap> </td>
|
|
|
170 |
</tr>
|
|
|
171 |
<%End If%>
|
|
|
172 |
<%While ((NOT biQry.BOF) AND (NOT biQry.EOF))%>
|
|
|
173 |
<tr class="form_item_grey" >
|
|
|
174 |
<td nowrap><%=biQry("proj_name")%></td>
|
|
|
175 |
<td nowrap><%=biQry("rtag_name")%></td>
|
|
|
176 |
<td nowrap><%=biQry("timestamp")%></td>
|
|
|
177 |
<td nowrap><%=biQry("reason")%></td>
|
|
|
178 |
</tr>
|
|
|
179 |
<tr>
|
|
|
180 |
<!-- Display the Unit Test Results -->
|
|
|
181 |
<td colspan="4">
|
|
|
182 |
<table class="full_table">
|
|
|
183 |
<tr>
|
|
|
184 |
<td width="1%" class="form_field_hdrgap" nowrap"> </td>
|
|
|
185 |
<td>
|
|
|
186 |
<table class="full_table">
|
|
|
187 |
<%
|
|
|
188 |
Call getTestResults(biQry("BUILD_ID"))
|
|
|
189 |
If utQry.RecordCount < 1 Then
|
|
|
190 |
%>
|
|
|
191 |
<tr class="form_item_grey" >
|
|
|
192 |
<td nowrap>No Test Results for build <%=biQry("BUILD_ID")%></td>
|
|
|
193 |
</tr>
|
|
|
194 |
<%Else%>
|
|
|
195 |
<tr class="form_field_hdr">
|
|
|
196 |
<td width="1%" nowrap">Platform </td>
|
|
|
197 |
<td width="1%" nowrap">Type </td>
|
|
|
198 |
<td width="95%" nowrap">Test Name </td>
|
|
|
199 |
<td width="1%" nowrap">Duration </td>
|
|
|
200 |
<td width="1%" nowrap">Outcome </td>
|
|
|
201 |
</tr>
|
|
|
202 |
<%End If%>
|
|
|
203 |
<%While ((NOT utQry.BOF) AND (NOT utQry.EOF))%>
|
|
|
204 |
<tr class="form_item_grey" >
|
|
|
205 |
<td nowrap><%=utQry("platform")%></td>
|
|
|
206 |
<td nowrap><%=utQry("type")%></td>
|
|
|
207 |
<td nowrap><%=utQry("test_name")%></td>
|
|
|
208 |
<td nowrap><%=utQry("time_taken")%></td>
|
|
|
209 |
<td nowrap><%=utQry("test_outcome")%></td>
|
|
|
210 |
</tr>
|
|
|
211 |
<%
|
|
|
212 |
utQry.MoveNext
|
|
|
213 |
WEnd
|
|
|
214 |
utQry.Close
|
|
|
215 |
Set utQry = nothing
|
|
|
216 |
%>
|
|
|
217 |
</table>
|
|
|
218 |
</tr>
|
|
|
219 |
</table>
|
|
|
220 |
</td>
|
|
|
221 |
<!-- End Display the Unit Test Results -->
|
|
|
222 |
</tr>
|
|
|
223 |
<%
|
|
|
224 |
biQry.MoveNext
|
|
|
225 |
WEnd
|
|
|
226 |
biQry.Close
|
|
|
227 |
Set biQry = nothing
|
|
|
228 |
%>
|
|
|
229 |
</table>
|
|
|
230 |
<!------------------------------------------------------------>
|
|
|
231 |
<br>
|
|
|
232 |
|
|
|
233 |
<!-- END DETAILS ------------------------------------------------->
|
|
|
234 |
</td>
|
|
|
235 |
<td> </td>
|
|
|
236 |
</tr>
|
|
|
237 |
</table>
|
|
|
238 |
<!-- END MIDDLE -------->
|
|
|
239 |
</td>
|
|
|
240 |
</tr>
|
|
|
241 |
</table>
|
|
|
242 |
|
|
|
243 |
<!-- FOOTER -->
|
|
|
244 |
<!--#include file="_footer.asp"-->
|
|
|
245 |
|
|
|
246 |
</body>
|
|
|
247 |
</html>
|
|
|
248 |
<%
|
|
|
249 |
Call Destroy_All_Objects
|
|
|
250 |
%>
|