How to concatenate parameters in windows batch

(%Major% =10, %MINOR%=5)

set “allBuild=%Major%%MINOR%”

echo %allBuild%

(you get “105”)

set “allBuild=%Major%.%MINOR%”

echo %allBuild%

(you get “10.5”)




QTP/UFT Reporter Filter

Reporter.Filter= value
The value contains one of the following built-in variables.
1-rfEnableAll- Report all steps. The default setting
2-rfEnableErrorsAndWarnings- Only report error(failed)and warning steps.
3-rfEnableerrorsOnly- Only report error steps.
4-rfDisableAll- Does not report any steps.
The following code shows how to suppress a single checkpoint’s Pass/Fail status:
‘Store the Old filter value’
‘Disable reporting of all events’
Set op=Browser(“Browser”).Page(“page”)
if chkStatus Then
Msgbox “Passed”
Msgbox “Failed”
End if.


see here too:

How to use HTML in Report output


when using the Reporter.ReportEvent method, all we can insert is simple text strings.

No HTML code would pass through (you’ll get a string with HTML tags in the output XML).

But there is a way to use HTML in the report, so the Result Viewer (or other viewers) would show it.

first, we need to write function that make it possible:

Function HTMLReport(strStatus, strStepName, strMessage)
Set objDict = CreateObject(“Scripting.Dictionary”) ‘ a dictionary object
objDict(“Status”) = strStatus ‘ set the object properties
objDict(“PlainTextNodeName”) = strStepName
objDict(“StepHtmlInfo”) = strMessage ‘here is where the HTML code goes
objDict(“DllIconIndex”) = 206
objDict(“DllIconSelIndex”) = 206
objDict(“DllPAth”) = “C:\Program Files\Mercury Interactive\QuickTest Professional\bin\ContextManager.dll” ‘of course, you need the right path of the bin folder

objDict(“DllPAth”) = Environment(“ProductDir”) &  “\bin\ContextManager.dll”

Reporter.LogEvent “User”, objDict, Reporter.GetContext ‘report the custom HTML
End Function

now, all we need is to call that function with the appropriate parameters:

strHTML  = “<TABLE border=1><TR><TH>This is <b>QTPQA</b> blog!</TH></TR>”
strHTML = strHTML & “<TR><TD>Sunday</TD></TR>”
strHTML = strHTML & “<TR><TD>Monday</TD></TR>”
strHTML = strHTML & “<TR><TD>Tuesday</TD></TR>”
strHTML= strHTML & “</TABLE>”

‘and the call to the function:

HTMLReport micPass, “HTML Report Example”, strHTML

and this is what you get:

HTML in Report

Have fun!