Overview
Tests that include the file like XMLtoTEXT extension may fail if the extension is incorrectly configured on a Download action. When the extension is set to run before the file is downloaded, it has no file to process. As a result, the converted text is never generated, causing subsequent steps to fail.
Symptoms
XMLtoTEXT output file is missing or empty.
Test steps that rely on converted text fail.
No explicit error is thrown by the XMLtoTEXT extension.
Download action completes successfully, but XMLtoTEXT processing does not occur.
What is the difference between Pre-hook and Post-hook?
Pre-hook: Runs before the primary action starts (before the file download begins).
Post-hook: Runs after the primary action completes (after the file is downloaded).
XMLtoTEXT requires an existing file and therefore must run as a Post-hook.
Can XMLtoTEXT be used as a Pre-hook?
No. XMLtoTEXT can only process files that already exist. When used as a Pre-hook on a Download action, the file does not yet exist, so the extension cannot function.
How to Fix the Issue
Follow these steps to correctly configure the XMLtoTEXT extension:
Open the Download action in your test.
Navigate to the Mappings tab.
Locate the Map Extensions section.
If xmltotext is listed under Pre-hook, remove it.
Under Post-hook, click Add Extension.
Select xmltotext from the list.
Save your changes and re-run the test to verify the fix.
Limitations
The XMLtoTEXT extension can only process files that already exist.
If mapped as a Pre-hook on a Download step, the extension runs before the file is created.
The extension will not throw an explicit error—it simply produces no output, leading to failures in dependent test steps.
Best Practice
As a general guideline, any extension that needs to read, parse, or modify a downloaded file should always be configured as a Post-hook. This ensures the file is fully available before the extension attempts to access it.