Tuesday, October 4, 2011

Export QTP Result as a HTML Page

The Quick Test Professional has an in built functionality to Export Test Results in PDF, Excel or HTML file but if the user want to Export the Test Result via descriptive programming and user defined function than the below code will be helpful.

This below simple code for "Export QTP Result as a HTML Page" is modifiable and developed with VB Script.

Function Declaration :
Public Function GenerateHTMLReport(ByVal inputXML, ByVal inputXSL, ByVal outputFile)
   sXMLLib = "MSXML.DOMDocument"
   Set xmlDoc = CreateObject(sXMLLib)
   Set xslDoc = CreateObject(sXMLLib)
   xmlDoc.async = False
   xslDoc.async = False

   xslDoc.load inputXSL

   xmlDoc.load inputXML

   outputText = xmlDoc.transformNode(xslDoc.documentElement)

   Set FSO = CreateObject("Scripting.FileSystemObject")
   Set outFile = FSO.CreateTextFile(outputFile,True)
   outFile.Write outputText
   outFile.Close
   Set outFile = Nothing
   Set FSO = Nothing
   Set xmlDoc = Nothing
   Set xslDoc = Nothing
   Set xmlResults = Nothing

 End Function

Use of Function :
Dim sResultsXML, sDetailedXSL
sResultsXML is for define full path of the Result.xml file.
sDetailedXSL is for QTP inbuilt PDetails.xsl file for format the Result.xml file.

For Example :
sResultsXML = "C:\Temp\TempResults\Report\Results.xml"
sDetailedXSL = "C:\Program Files\HP\QuickTest Professional\dat\PDetails.xsl"

Function Call :
GenerateHTMLReport sResultsXML, sDetailedXSL, "Path for save the Exported HTML file"

Monday, October 3, 2011

Visual Studio 2011 and .NET Framework 4.5 developer

There is a Fantastic news from the Microsoft for developer because microsoft recently announced the Visual Studio 2011 and .NET Framework 4.5 developer preview in Anaheim, California. There are some new features at this movement with Visual Studio 2011 and .NET Framework 4.5 developer preview are as under

1.) Visual Studio 2011 developer preview Features

- Develop Metro style Apps for Windows 8
- Enhancements for Game Development
- Code Clone Analysis
- Code Review Workflow
2.) .NET Framework 4.5 developer preview Features

- State machine support in Windows Workflow
- Improved support for SQL Server and Windows Azure in ADO.NET
- ASP.NET has increased investments in HTML5, CSS3, device detection, page optimization, as well as new functionality with MVC4