This page is not a part of an official Int4 documentation.
Knowledge Articles

Removing Extra Line Separators from Reference Payloads Using ASTER Scripts in Int4 Suite

Removing Extra Line Separators from Reference Payloads Using ASTER Scripts

Problem

When manually importing reference flat files (e.g. EDI files), extra spaces or line breaks can be accidentally added. These appear as additional line separators at the beginning of reference payloads when using "Show Symbols" in the comparison view.

image-20260206-141923.png


Prerequisites

  • An ASTER script that removes the special character at the beginning of the line (prepared in advance or provided by your team).

  • Access to the Int4 Suite Fiori home screen and the relevant automation object.

Steps

Step 1: Identify the issue

  1. Open the test case comparison in Int4 Suite.

  2. Click Show Symbols.

  3. Confirm that extra line separators appear at the beginning of the reference payloads.

Step 2: Create the ASTER script

  1. Go to the home screen of Int4 Suite.

  2. Click on Scripts.

  3. Click Create (new script).

  4. Set the script type to ASTER Script.

  5. Click Create.

  6. Import or paste the prepared ASTER script that removes the leading special character.

    PAYLOAD = IF(_DESIGN_MODE_,
       GET_TC_OUTPUTS()[1],
       GET_TC_OUTPUTS()[1]
    );
    
    IF(LEN(PAYLOAD) == 0, 
        PAYLOAD = GET_TC_PAYLOAD("L")
    );
    
    
    CLEAN_PAYLOAD = RREPLACE("[\r\n]+", "", PAYLOAD);
    
    RETURN CLEAN_PAYLOAD
    
    
    
    
    
  7. Click Save.

Step 3: Assign the script to the automation object

  1. Navigate to the automation object used by your test case.

  2. Click Edit next to Payload Processing.

  3. Click Create.

  4. Choose Reference Output Payload with ASTER Script as the method.

  5. Select the previously created ASTER script as the parameter.

  6. Click Save.

Step 4: Re-execute and verify

  1. Go back to the test case.

  2. Execute the test case.

  3. Open the test case Details.

  4. Click Show Symbols.

  5. Confirm that the extra line separators at the beginning of the reference payload are no longer present.

Notes

  • This approach modifies the reference output payload dynamically during test execution. You do not need to edit each payload file individually.

  • Only apply this fix if you are certain the extra characters were added accidentally and the receiving system does not require them.