hop icon indicating copy to clipboard operation
hop copied to clipboard

[Bug]: Error in selecting the unit test pipeline

Open CarlosJuncher03 opened this issue 2 months ago • 5 comments

Apache Hop version?

2.16

Java version?

17

Operating system

Windows

What happened?

Title Unit test pipeline selection entry disappears from dropdown after restarting Apache Hop

Description When configuring a pipeline unit test, the corresponding test pipeline appears correctly in the selection list and can be executed without any issues. However, after closing and reopening Apache Hop, the previously created unit test no longer appears in the unit test pipeline selection dropdown.

The metadata still exists and can be found in the metadata browser, and if I manually type the pipeline name in the unit test field, the process runs normally. The problem seems to affect only the UI selection list (dropdown), not the underlying metadata or execution.

Steps to Reproduce

Open Apache Hop.

Create a pipeline and a corresponding pipeline unit test.

Configure the unit test so that the test pipeline appears in the “unit test pipeline” (or equivalent) selection field.

Run the unit test – it executes successfully.

Close Apache Hop.

Reopen Apache Hop and open the same project / metadata.

Open the unit test configuration again and check the pipeline selection dropdown.

Expected Behavior The previously created unit test pipeline should still appear in the selection dropdown after restarting Apache Hop.

Actual Behavior The entry for the unit test pipeline disappears from the dropdown after restarting Apache Hop, even though the metadata still exists. If I manually type the pipeline name in the field, the unit test executes normally.

Environment (example, adjust to your case)

Apache Hop version: [e.g. 2.16.0]

OS: [e.g. Windows 11 / Linux Ubuntu 22.04]

Java version: [e.g. OpenJDK 17]

Image Image

Issue Priority

Priority: 2

Issue Component

Component: Hop Gui

CarlosJuncher03 avatar Dec 03 '25 14:12 CarlosJuncher03

@CarlosJuncher03 can you please correct the issue title and translate it to english? Thank you for your kind cooperation

sramazzina avatar Dec 03 '25 21:12 sramazzina

Sorry for the mistake, the title has been corrected

CarlosJuncher03 avatar Dec 03 '25 22:12 CarlosJuncher03

Unit tests created from the "Create a new unit test" (unfortunately) use a ./pipeline-name.hpl syntax instead of the full path or ${PROJECT_HOME}. The unit test in your screenshot shows the full pipeline path. Check the path for unit tests create through the "Create a new unit test" option and fix your path accordingly. There's room for improvement in the unit testing UI there, but that should get you going.

bamaer avatar Dec 04 '25 08:12 bamaer

It looks like there's some edge case on Windows (folders, spaces, backslashes?) where the relative path is not being calculated vs the Project. A relative path is the only one that makes sense in this context. What does the value for ${PROJECT_HOME} show in this scenario?

mattcasters avatar Dec 08 '25 15:12 mattcasters

Regarding this issue, I noticed the following behavior:

When I set a folder path in front of the ${PROJECT_HOME} variable in the Unit tests base path configuration (as shown in the first screenshot), Hop resolves the test pipeline path as an absolute path.

Image Image

However, if I leave the value as only ${PROJECT_HOME} (without an additional folder), Hop correctly resolves it as a relative path, beginning with ./.

Image

So it seems that adding any additional folder after ${PROJECT_HOME} triggers absolute path resolution, while leaving the variable alone results in the expected relative path behavior.

CarlosJuncher03 avatar Dec 08 '25 18:12 CarlosJuncher03