MicroFocus / ADM-FT-ToolsLauncher

Other
12 stars 8 forks source link

Relative path in .mtb file fails to run UFT tests #81

Open metaph3r opened 2 years ago

metaph3r commented 2 years ago

Tool FTToolsLauncher_net48.exe

Describe the bug When using relative paths in .mtb file FTToolsLauncher fails to run UFT tests. When launching FTToolsLauncher it recognizes the tests but UFT fails to start. When using absolut paths it works. Also with relativ paths in fttoolslauncher.params it works.

Folder structure

.\fttoolslaucher.params
.\bin\FTToolsLauncher_net48.exe
.\test\uft\uft-sample.mtb
.\test\uft\uft-sample-test-1
.\test\uft\uft-sample-test-2

Contents of fttoolslauncher.params

# Basic parameters
runType=FileSystem
resultsFilename=results.xml
resultTestNameOnly=true

# File System parameters
fsTimeout=3600
fsReportPath=test\\reports
Test1=test\\uft\\uft-sample.mtb

# Rerun parameters
onCheckFailedTest=false
testType=Rerun only failed tests

Contents of uft-sample.mtb

[Files]
NumberOfFiles=2
File1=test\\uft\\uft-sample-test-1
File2=test\\uft\\uft-sample-test-2

Output log with relative paths in uft-sample.mtb

C:\Develop\git\combaufi-testautomation>bin\FTToolsLauncher_net48.exe -paramfile fttoolslauncher.params
Micro Focus Automation Tools - FTToolsLauncher 1.0.30.1919

Tool is started
Launcher timeout is 00::01:00:00
Controller Polling Interval: 30 seconds
PerScenarioTimeout: 10675199::02:48:05
FileSystemTestRunner timeout is 01:00:00
Results base directory (for all tests) is: test\reports
2 tests found:
test\\uft\\uft-sample-test-1
test\\uft\\uft-sample-test-2
============================================================================
29.04.2022 14:41:53 Running test: test\\uft\\uft-sample-test-1 ...
29.04.2022 14:41:53 Report path is generated under base directory: C:\Develop\git\combaufi-testautomation\test\reports\uft-sample-test-1_9
29.04.2022 14:41:53 Launching testing tool ...
Test result: Error
UFT One could not run.
29.04.2022 14:42:08 Test completed in 16 seconds: test\\uft\\uft-sample-test-1
29.04.2022 14:42:08 Running test: test\\uft\\uft-sample-test-2 ...
29.04.2022 14:42:08 Report path is generated under base directory: C:\Develop\git\combaufi-testautomation\test\reports\uft-sample-test-2_7
29.04.2022 14:42:08 Launching testing tool ...
Test result: Error
UFT One could not run.
29.04.2022 14:42:10 Test completed in 2 seconds: test\\uft\\uft-sample-test-2
The summary results file is created at: C:\Develop\git\combaufi-testautomation\results.xml
================================================
Run status: Job failed, total: 2, succeeded: 0, failures: 0, errors: 2, warnings: 0, others: 0
Error  : test\\uft\\uft-sample-test-1[1]
Error  : test\\uft\\uft-sample-test-2[2]
================================================
The reported status is: Failed
The final status is: Failed
The launcher tool exited with error code: -1

Output log with relative paths in fttoolslauncher.params

C:\Develop\git\combaufi-testautomation>bin\FTToolsLauncher_net48.exe -paramfile fttoolslauncher.params
Micro Focus Automation Tools - FTToolsLauncher 1.0.30.1919

Tool is started
Launcher timeout is 00::01:00:00
Controller Polling Interval: 30 seconds
PerScenarioTimeout: 10675199::02:48:05
FileSystemTestRunner timeout is 01:00:00
Results base directory (for all tests) is: test\reports
2 tests found:
C:\Develop\git\combaufi-testautomation\test\uft\uft-sample-test-1
C:\Develop\git\combaufi-testautomation\test\uft\uft-sample-test-2
============================================================================
29.04.2022 14:47:05 Running test: C:\Develop\git\combaufi-testautomation\test\uft\uft-sample-test-1 ...
29.04.2022 14:47:05 Report path is generated under base directory: C:\Develop\git\combaufi-testautomation\test\reports\uft-sample-test-1_1
29.04.2022 14:47:05 Launching testing tool ...
Running test: C:\Develop\git\combaufi-testautomation\test\uft\uft-sample-test-1
Test result: Passed
29.04.2022 14:47:38 Test completed in 33 seconds: C:\Develop\git\combaufi-testautomation\test\uft\uft-sample-test-1
29.04.2022 14:47:38 Test report is generated at: C:\Develop\git\combaufi-testautomation\test\reports\uft-sample-test-1_1
-------------------------------------------------------------------------------------------------------
29.04.2022 14:47:38 Running test: C:\Develop\git\combaufi-testautomation\test\uft\uft-sample-test-2 ...
29.04.2022 14:47:38 Report path is generated under base directory: C:\Develop\git\combaufi-testautomation\test\reports\uft-sample-test-2_1
29.04.2022 14:47:38 Launching testing tool ...
Running test: C:\Develop\git\combaufi-testautomation\test\uft\uft-sample-test-2
Test result: Passed
29.04.2022 14:48:31 Test completed in 54 seconds: C:\Develop\git\combaufi-testautomation\test\uft\uft-sample-test-2
29.04.2022 14:48:31 Test report is generated at: C:\Develop\git\combaufi-testautomation\test\reports\uft-sample-test-2_1
-------------------------------------------------------------------------------------------------------
The summary results file is created at: C:\Develop\git\combaufi-testautomation\results.xml
================================================
Run status: Job succeeded, total: 2, succeeded: 2, failures: 0, errors: 0, warnings: 0, others: 0
Passed : C:\Develop\git\combaufi-testautomation\test\uft\uft-sample-test-1[1]
Passed : C:\Develop\git\combaufi-testautomation\test\uft\uft-sample-test-2[2]
================================================
The reported status is: Passed
The final status is: Passed
The launcher tool exited with code: 0

There is a difference in the output when listing the found tests

relative paths in .mtb file

2 tests found:
test\\uft\\uft-sample-test-1
test\\uft\\uft-sample-test-2

relative paths in .params file

2 tests found:
C:\Develop\git\combaufi-testautomation\test\uft\uft-sample-test-1
C:\Develop\git\combaufi-testautomation\test\uft\uft-sample-test-2

It seems in the first case the path is not properly dereferenced.

To Reproduce Steps to reproduce the behavior:

  1. run bin\FTToolsLauncher_net48.exe -paramfile fttoolslauncher.params

Expected behavior Tests are properly executes with relative paths in .mtb file.

Screenshots If applicable, add screenshots to help explain your problem.

OS and testing tools (please complete the following information):

Additional context Add any other context about the problem here.