You are on page 1of 5

Set td=createobject("TDApiOle80.TDConnection.1") td.InitConnectionEx "http://esauslic2.vignette.com/TDBIN" td.ConnectProjectEx "CONTENT", "Content82","guest" , "" Set fso = CreateObject("Scripting.

FileSystemObject") Const ForAppending = 8 sGetCurrentDateTime = fn_GetDateTimeText() xlsFileLoc="D:\WEM82\Testmetrics\Properties.xlsx" htmlFileLoc="D:\WEM82\Testmetrics\Temp\TestCaseMetrics_"&sGetCurrentDateTime&".h tml" Dim resultsArr(5,3) resultsArr(1,0)="Level resultsArr(2,0)="Level resultsArr(3,0)="Level resultsArr(4,0)="Level resultsArr(5,0)="Grand resultsArr(0,1)="Yes" resultsArr(0,2)="No" resultsArr(0,3)="Total" top = "" testset = "" resultsArrRowLen=ubound(resultsArr,1) resultsArrColLen=ubound(resultsArr,2) Set objexcel = createobject("excel.application") Set objWorkbook = objExcel.WorkBooks.Open(xlsFileLoc) Set sheetName = objWorkbook.Worksheets("Sheet1") columncount = sheetName.usedrange.columns.count rowcount = sheetName.usedrange.rows.count 'Initializing to all default values (0) For a=1 to resultsArrRowLen For b=1 to resultsArrColLen resultsArr(a,b)=0 Next Next Set txtfile= fso.OpenTextFile(htmlFileLoc, ForAppending, True) txtfile.WriteLine "<HTML><TITLE>WEM Test Case Metrics</TITLE><BODY><CENTER><H3>< FONT face=""Arial"">Test Case Metrics By Feature</FONT></H3><BR><TABLE ALIGN=""C enter"" BORDER=""1"" WIDTH=40% BORDERCOLOR=""#000033""><TR BGCOLOR=""#99CCFF"">< TD rowspan=""2""><FONT face=""Arial""><small><B>Priority / <BR>Automation</B></s mall></FONT></TD>" '#####Header printing ########### For i=1 to resultsArrRowLen txtfile.WriteLine "<TD align=""Center"" colspan="&resultsArrColLen&"><FONT face= ""Arial""><small><B>"&resultsArr(i,0)&"</B></small></FONT></TD>" next txtfile.WriteLine "</TR><TR BGCOLOR=""#99CCFF"">" for i=1 to resultsArrRowLen '###Loop thourgh L0-GrandTotal # For j=1 to resultsArrColLen '###looping through Yes, No, Total values ## # txtfile.WriteLine "<TD align=""Center""><FONT face=""Ari 0" 1" 2" 3" Total"

al""><small><B>"&resultsArr(0,j)&"</B></small></FONT></TD>" next next txtfile.WriteLine "</TR>" '#####End of Header printing ########### i=1 For j = 1 to rowcount ' Print sheetName.cells(j,i) txtfile.WriteLine "<TR BGCOLOR=""#BEDDFF""><TD><FONT face=""Arial""><small>< B>"&sheetName.cells(j,i)&"</B></small></FONT></TD>" GetAllNodes (sheetName.cells(j,i+1)) For k=1 to resultsArrRowLen For l=1 to resultsArrColLen txtfile.WriteLine "<TD align=""Center""><FONT face=""Arial"" ><small><B>"&resultsArr(k,l)&"</B></small></FONT></TD>" resultsArr(resultsArrRowLen,l) = resultsArr(resu ltsArrRowLen,l) + resultsArr(k,l) Next Next txtfile.WriteLine "</TR>" Next Set sheetName = Nothing Set objWorkbook = Nothing Set objexcel = Nothing 'This is for printing Total value txtfile.WriteLine "<TR BGCOLOR=""#99CCFF""><TD><FONT face=""Arial""><small><B>TO TAL</B></small></FONT></TD>" For k=1 to resultsArrRowLen For l=1 to resultsArrColLen 'Here we want only yes, no & total s o loop only 3 times txtfile.WriteLine "<TD align=""Center""><FONT face=""Ari al""><small><B>"&resultsArr(k,resultsArrColLen)&"</B></small></FONT></TD>" Next Next 'txtfile.WriteLine"<TD align=""Center""><FONT face=""Arial""><small><B>"&totl0na ut&"</B></small></FONT></TD><TD align=""Center""><FONT face=""Arial""><small><B> "&totl0yaut+totl0naut&"</B></small></FONT></TD><TD align=""Center""><FONT face=" "Arial""><small><B>"&totl1yaut&"</B></small></FONT></TD><TD align=""Center""><FO NT face=""Arial""><small><B>"&totl1naut&"</B></small></FONT></TD><TD align=""Cen ter""><FONT face=""Arial""><small><B>"&totl1yaut+totl1naut&"</B></small></FONT>< /TD><TD align=""Center""><FONT face=""Arial""><small><B>"&totl2yaut&"</B></small ></FONT></TD><TD align=""Center""><FONT face=""Arial""><small><B>"&totl2naut&"</ B></small></FONT></TD><TD align=""Center""><FONT face=""Arial""><small><B>"&totl 2yaut+totl2naut&"</B></small></FONT></TD><TD align=""Center""><FONT face=""Arial ""><small><B>"&totl3yaut&"</B></small></FONT></TD><TD align=""Center""><FONT fac e=""Arial""><small><B>"&totl3naut&"</B></small></FONT></TD><TD align=""Center""> <FONT face=""Arial""><small><B>"&totl3yaut+totl3naut&"</B></small></FONT></TD><T D align=""Center""><FONT face=""Arial""><small><B>"&totl0yaut+totl1yaut+totl2yau t+totl3yaut&"</B></small></FONT></TD><TD align=""Center""><FONT face=""Arial"">< small><B>"&totl0naut+totl1naut+totl2naut+totl3naut&"</B></small></FONT></TD><TD align=""Center""><FONT face=""Arial""><small><B>"&totl0yaut+totl1yaut+totl2yaut+ totl3yaut+totl0naut+totl1naut+totl2naut+totl3naut&"</B></small></FONT></TD>" txtfile.WriteLine "</TR></TABLE><BR></BODY></HTML>"

txtfile.Close SystemUtil.Run "iexplore.exe", htmlFileLoc, , , 3 'Browser("micclass:=Browser").Sync '################## Function to calculate Time stamp ############ Public Function fn_GetDateTimeText Dim sDateTime sDateTime = now Set re = New RegExp re.Global = True re.Pattern = "[/:\s]" fn_GetDateTimeText =re.Replace(sDateTime,"_") End Function '########### Function to GET all Nodes ############# Function GetAllNodes (top) Set tstMgr = td.TreeManager Set tsttr = tstMgr.NodeByPath(top) Set tstNodes = tsttr.NewList() tstCount = tstNodes.Count If tstCount > 0 Then 'Initializing to all 0 values For a=1 to resultsArrRowLen For b=1 to 3 resultsArr(a,b)=0 Next Next For intIndex = 1 To tstNodes.Count Set tstNode = tstNodes.Item(intIndex) getTC(tstNode.Path) If tstNode.Path <> "" Then GetAllNodes tstNode.Path End If Set tstNode = Nothing Next End If Set tstNodes = Nothing Set tstMgr = Nothing End Function ' ########### Function to GET TCs by Automated yesORno ############# Public Function getTC(testset) Set tcMgr = td.TreeManager Set tctr = tcMgr.NodeByPath(testset) Set tcFact = tctr.TestFactory Set tcList = tcFact.NewList("") If tcList.Count<>0 Then For Each tc in tcList priority = tc.Field("TS_USER_01") aut = tc.Field("TS_USER_04")

col=2 If (aut = "Yes" ) Then 'its Yes. If inprogress a lso required we get new condition here col=1 End If row=1 Select Case priority Case "Level 0" row=1 Case "Level 1" row=2 Case "Level 2" row=3 Case "Level 3" row=4 End Select resultsArr(row,col)=resultsArr(row,col)+1 resultsArr(row,3)=resultsArr(row,3)+1 ' 3 value points to total in array row wise Next End If Set Set Set Set End Function tcList = Nothing tcFact = Nothing tctr = Nothing tcMgr = Nothing

'resultsArray ' NodeJS ' Level ' Level ' Level ' Level ' Grand

Structure Yes, No, Total, Junit, Selenium, 0 1 2 3 Total

Running test on IE running on grid

Test cleanup (run 2nd time should get same result) global data variable - IP testData (shouldnt reuse for grid, take care when creating something & user logi n if working on role base tests) node time out namingConventions (high priority)? setSpeed? TC from bugs ? full business scenario Script for checking the spaces Report enhancements checking errors in logs based on time

https://tech.lds.org/ssc/guide/step1.jsp http://www.hpenterprisesecurity.com/vulncat/en/vulncat/index.html

Software Security Center (SSC) uses Fortify Analysis Pdt Tools Static code analyser (SCA) (more Program Traace analyser) Security Scope Fortify Runtime Application Protection (previously called Real time Analyser) Audit workbench Required Appserver, Database, Rulepack server.

Others: http://www.webmonkey.com/2010/02/JavaScript_Tutorial https://gist.github.com/absker/5818008 http://www.bugzilla.org/docs/4.4/en/html/installation.html http://www.thegeekstuff.com/2010/05/install-bugzilla-on-linux/ http://www.bugzilla.org/docs/2.16/html/stepbystep.html#bundlebugzilla

You might also like