Skip to main content
Version: legacy

[WS] Set HAR File Generation

Requirements

  • Katalon Studio version 8.2.0 onwards.

Description

Katalon Studio generates HAR files for each Web Service request by default. From version 8.2.0 onwards, you can use the setHarFileGeneration keyword to enable or disable HAR file generation either at the test case or test suite level.

Keyword name: WS.setHarFileGeneration

Parameters

ParameterParameter Type MandatoryDescription
enablebooleanRequiredEnable or disable HAR file generation.
flowControlFailureHandlingOptionalSpecify failure handling schema to determine whether the execution should be allowed to continue or stop.
Note:
  • If Katalon Studio could not save the setting, throw: StepFailedException.

Returns

Parameter TypeDescription
boolean
  • true: enable HAR file generation.
  • false: disable HAR file generation.

Example

  • Disable HAR file generation:

    import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS 
    'Do not generate har file when sending a request.'
    WS.setHarFileGeneration(false)
  • Enable HAR file generation:

    import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS 
    'Generating har file when sending a request. This is the default setting.'
    WS.setHarFileGeneration(true)

    To check whether the HAR file generation option is enabled or not, see [WS] Get HAR File Generation.