[WS] Set HAR File Generation
Description
Enable or disable HAR file generation either at the test case or test suite level.
Katalon Studio generates HAR files for each Web Service request by default. To learn how to access HAR files, see Extensive logs for Web Service testing.
Keyword name: setHarFileGeneration
Parameters
Parameter | Parameter Type | Required | Description |
---|---|---|---|
enable | Boolean | Yes | Enable or disable HAR file generation. |
flowControl | FailureHandling | Optional | Specify 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 Type | Description |
---|---|
Boolean |
|
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)