application, report, custom, result, test, scriptless, script-less, scripted, step, view, stepview

Method CustomReport

1 of 2 declarations

Add a custom report into Test Results

Watch this video to learn how to use this method

Have a problem with playback?

Usage

Function CustomReport( 
        ResultStatus Status,
        String ReportTitle,
        Object ReportText,
        Boolean CaptureBitmap [Optional]
)

Step

CustomReport

Zap.Variable("status")

Report title

Report text

true

Status

ReportTitle

ReportText

CaptureBitmap

Parameters

Status

Type: ResultStatus

Report Status: Passed, Failed, Warning or Information

ReportTitle

Type: String

Title for the report

ReportText

Type: Object

Additional information to add into the report

CaptureBitmap (optional)

Type: Boolean

Default value: False

Attach screenshot for the report

Returns

No return value

Example

VBScript

Application("Demo").CustomReport status, "test title", "report text"
'To attach screenshot to report set CaptureBitmap option parameter to true
Application("Demo").CustomReport status, "test title", "report text", true

JavaScript

Application("Demo").CustomReport(status, "test title", "report text");
// To attach screenshot to report set CaptureBitmap option parameter to true
Application("Demo").CustomReport(status, "test title", "report text", true);

Comment

Save report status to variable using ZAP Utility step and set it as parameter to CustomReport method

ZAP Utility

...Statuses.Failed

Zap.Variable("status")

Step

CustomReport

Zap.Variable("status")

Report title

Report text

true


Method CustomReport

2 of 2 declarations

Add a custom report into Test Results

Watch this video to learn how to use this method

Have a problem with playback?

Usage

Function CustomReport( 
        Boolean Passed,
        String ReportTitle,
        Object ReportText,
        Boolean CaptureBitmap [Optional]
)

Step

CustomReport

true

Report title

Report text

true

Status

ReportTitle

ReportText

CaptureBitmap

Parameters

Passed

Type: Boolean

Report as failed or passed - True = Passed, False = Failed

ReportTitle

Type: String

Title for the report

ReportText

Type: Object

Additional information to add into the report

CaptureBitmap (optional)

Type: Boolean

Default value: False

Attach screenshot for the report

Returns

No return value

Example

VBScript

Application("Demo").CustomReport true, "test title", "report text"
'To attach screenshot to report set CaptureBitmap option parameter to true
Application("Demo").CustomReport true, "test title", "report text", true

JavaScript

Application("Demo").CustomReport(true, "test title", "report text");
// To attach screenshot to report set CaptureBitmap option parameter to true
Application("Demo").CustomReport(true, "test title", "report text", true);

Comment

Create Custom report and attach screenshot to the report

Step

CustomReport

true

Report title

Report text

true

Contact Us

Tower Place 100

3340 Peachtree Rd NE #1800 

Atlanta, GA 30326 USA

(404) 814-5227