Skip to main content

Error exporting test artifacts in Katalon Studio

When exporting test artifacts in Katalon Studio, the following error can occur:

Error exporting test artifacts
Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "com.katalon.platform.api.model.TestCaseEntity.getScriptFile()" is null

Each test case in Katalon Studio should consist of:

  • A metadata file (*.tc, in XML format)

  • A script file (*.groovy)

The error arises when one or more test cases are missing the script file (*.groovy). This can happen due to merge conflicts, unexpected errors, or other issues that caused the file to be lost or corrupted.

  1. Identify the broken test case(s).
    The error occurs because Katalon Studio is trying to export a test case, but the script file (*.groovy) is missing. To identify the problematic test case(s), apply the binary search technique:
    1. Export half of the test case folders.
    2. If the error occurs, narrow down the problem by exporting half of the previously selected folders.
    3. If no error occurs, export the second half of the folders.
    4. Repeat this process until you identify the folder containing the broken test case(s).
  2. Once the broken test case(s) are identified, there are two ways to resolve the issue:
    • Remove the test case

    Completely delete both the metadata file (*.tc) and the script file (*.groovy) for the broken test case.

    • Recreate the test case

    Delete both the *.tc and *.groovy files, and then recreate the test case using Katalon Studio.

Was this page helpful?