Debugging a Custom Action
You need to download the TestHarness.Java file, and download and extract the Config Folder file.
To debug a custom action
Do in the following order listed to create necessary test artifacts:
Create a test case and include the custom action that you want to debug at the appropriate step. For more information, refer to https://qualitia.atlassian.net/wiki/spaces/T2/pages/2681539278
From the test case editor, click Run to dry run the test case to verify whether the custom action is hit.
Create a test suite that contains the test case. For more information, refer to Creating a Suite.
Create an offline suite using the test suite. For detailed instructions, refer to Creating an Offline Package.
To add the required files for debugging the custom action:
Open the custom action you want to debug in the Eclipse project.
Add the TestHarness.Java file for the custom action in the Eclipse project.
Add the Config Folder in the Eclipse project.
In the config folder, open the startupSettings.json file, and specify the location of the offline suite for “SuitesDir”.
For example: "SuitesDir":"D:/Qualitia Offline/Suite1"
Insert a breakpoint at an appropriate line number in the custom action.
Start debugging the TestHarness.Java file.
The test suite execution starts.
When the custom action is executed, the execution stops at the breakpoint you have inserted.
You can go ahead and debug the custom action.
To specify Java system properties before executing the test suite.
From the config folder in the custom action of Eclipse, open the QualitiaSystemProperties.json.
In the QualitiaSystemProperties.json file, enter the key-value pairs in the following format:
{"key1": "value1",
"key2": "value2",
.
.
"keyN": "valueN"}
Save the file.