MicroFocus / ADM-TFS-Extension

MIT License
3 stars 13 forks source link

Parameter almApiKeySecretBasicAuth provided but not recognized #49

Closed cocdsctc closed 2 years ago

cocdsctc commented 2 years ago

There seems to be issues for us in configuring the Pipeline. Our runs produce the error message of ...

D:\RunFromALM\UFTWorking\HpToolsLauncher.exe -paramfile D:\RunFromALM\UFTWorking\props\Props06122021142600SSS.txt Micro Focus Automation Tools - FTToolsLauncher 1.0.30.1919

Tool is started The parameter 'almApiKeySecretBasicAuth' is required to run a test from QC.

[error]result file does not exist

[error]Empty results file

[error]Task Failed

Finishing: Run From ALM

(end of error message)

Our ALM instance is using SSO. I've looked at the file in the props folder, and the variables do appear to be there, they match the values in the task configuration pane (except the secure info being hashed out). A search of "almApiKeySecretBasicAuth" does not seem to give many results.

Are there any other recommended debug steps one could take to ensure the build pipeline can talk to ALM and launch this build?

image

PaulaPaltinisanu commented 2 years ago

Hello,

Thank you for reaching out to us!

I can see you are using our latest extension (3.0.0); can you please share what version of ALM you are using to run this task? @dorin7bogdan, can you please take a look as well?

Thank you, Paula

PaulaPaltinisanu commented 2 years ago

There seems to be issues for us in configuring the Pipeline. Our runs produce the error message of ...

D:\RunFromALM\UFTWorking\HpToolsLauncher.exe -paramfile D:\RunFromALM\UFTWorking\props\Props06122021142600SSS.txt Micro Focus Automation Tools - FTToolsLauncher 1.0.30.1919

Tool is started The parameter 'almApiKeySecretBasicAuth' is required to run a test from QC. ##[error]result file does not exist ##[error]Empty results file ##[error]Task Failed Finishing: Run From ALM

(end of error message)

Our ALM instance is using SSO. I've looked at the file in the props folder, and the variables do appear to be there, they match the values in the task configuration pane (except the secure info being hashed out). A search of "almApiKeySecretBasicAuth" does not seem to give many results.

Are there any other recommended debug steps one could take to ensure the build pipeline can talk to ALM and launch this build?

image

Hello,

We have investigated the issue and, for now, the solution we can provide you with is executing your tests within ALM functional test suites, given the fact the SSO connection can be successfully established for working with our UFT One ALM Lab Management Run task.

Please define these test suites and add your tests afterwards, instead of converting your existing default test suites. In case you need further assistance, please let us know.

Have a great day, Paula

cocdsctc commented 2 years ago

When using the UFT One ALM Lab Management Run task, in SSO mode, it appears as though the task is requiring the ALM Username. Since its in SSO mode, I'm not sure why this would be required as this should be part of the client id / api key secret pair.

We are using ALM version 15.5.1 with SSO using SAML

When running with System Diagnostics we see the below...

[debug]VstsTaskSdk 0.11.0 commit 7ff27a3e0bdd6f7b06690ae5f5b63cb84d0f23f4

[debug]INPUT_VARALMSERV: 'https://ALMSERVER:8443/qcbin'

[debug]INPUT_VARSSOENABLED: 'true'

[debug] Converted to bool: True

[debug]INPUT_VARCLIENTID: 'apikey-mmoe****'

[debug]INPUT_VARAPIKEYSECRET: '*****'

[debug]INPUT_VARUSERNAME (empty)

[debug]Caught exception from task script.

[debug]Error record:

[debug]Get-Value : Required: 'varUserName' input

When toggling the task configuration to SSO mode, there is no text input for Username, just Client ID. Is there a workaround?

dorin7bogdan commented 2 years ago

Hi Gerry, Please confirm that you are using the latest version of the UFT One ALM Lab Management Run task, that is 3.* and not older. This can be checked in the configuration page on top of the other ALM settings.

The reported behavior might be an issue that must be fixed as soon as possible. Please put a dummy value in the Username field and retry the test. Thank you.

cocdsctc commented 2 years ago

Confirmed. It is 3. I flipped it over to 2. to clear the values, then back to 3.* to re-input my values, but still getting the 'varUserName' message.

dorin7bogdan commented 2 years ago

Ok, thank you. please check the update to the previous comment and let us know the result.

cocdsctc commented 2 years ago

I should have been more specific earlier. We are using ALM Quality Center version 15.5.1, and I see that (in the ALM Help Center) that : "Functional test execution is available only for users with ALM Edition" Are we not able to use this extension?

dorin7bogdan commented 2 years ago

Hi Gerry, Thank you for details, indeed, as you mentioned, there are some ALM-side limitations: https://admhelp.microfocus.com/alm/en/15.5-15.5.1/online_help/Content/UG/c_func_perf_test_execution_overview.htm Since it is a more complex issue, we have to contact the ALM team to see if they can help with more information and available options. From the Azure DevOps extension's point of view there is not much to do at this point.

Regarding the bug from standard task "UFT One ALM Run" (about almApiKeySecretBasicAuth), there is an internal defect already reported by the QA team in order to allow running Default Test Sets, but we are not allowed to provide any time estimation, and this functionality depends of the ALM project too, where most likely, some changes will be required.

dorin7bogdan commented 2 years ago

Hi Gerry, Please use the attached HpToolsLauncher.exe with "UFT One ALM Run" and Default TestSet and SSO credentials. HpToolsLauncher_new.zip

Then let us know the results.

cocdsctc commented 2 years ago

That file gets a bit further, it will log on to ALM and attempt to start the HPToolsLauncher.exe

(log info from RunFromALM task)

Tool is started Running a new launcher process in available user session. Launcher tool path: D:\RunFromALM\UFTWorking\HpToolsLauncher.exe The new launcher process is started in session: 1. PID: 3524 The following output comes from the new launcher process. ##################### Start - Output from PID 3524 #####################

[error]result file does not exist

[error]Empty results file

[error]Task Failed

(end of log info)

When I log on to the server itself hosting the process, there is a windows error dialog, attached below.... HpToolsLauncher

Our server is Win Server 2019. We've also configured the service to run as local user, and to run using a system account.

But the Task does get to the point where its trying to launch the process. System Diagnostics can be supplied if interested.

dorin7bogdan commented 2 years ago

From D:\RunFromALM\UFTWorking folder, please try to run the tool from command line, like:

HpToolsLauncher.exe -paramfile .\props\Props06122021142600SSS.txt

I copied Props06122021142600SSS.txt from your first comment. If not working then you might need an exe compiled for a specific .Net version and x86 / x64 processor, running on that server.

cocdsctc commented 2 years ago

We ran from the command line as directed, appears to log to the project and tries to get the Test Set. It is not able to locate the default test set. We have tried quite a few things to get it to recognize the default test set, but the launcher can't quite locate the default test set.....

D:\RunFromALM\UFTWorking>HpToolsLauncher.exe -paramfile .\props\Props08122021095729SSS.txt Micro Focus Automation Tools - FTToolsLauncher 1.1.1.9320

Tool is started Timeout is set to: infinite (-1) Run mode is set to: RUN_PLANNED_HOST ID = 0, TestSet = default, TestSetFolder = Unattached Could not find TestSet default The summary results file is created at: D:\RunFromALM\UFTWorking\res\Report_86913\Results08122021095729SSS.xml No tests were run, exit with code -1 The launcher tool exited with error code: -1

cocdsctc commented 2 years ago

Interestingly, if we point to another test set, the folder and test set id are picked up. However, the test set is not found:

D:\RunFromALM\UFTWorking>HpToolsLauncher.exe -paramfile .\props\Props08122021095729SSS.txt Micro Focus Automation Tools - FTToolsLauncher 1.1.1.9320

Tool is started Timeout is set to: infinite (-1) Run mode is set to: RUN_PLANNED_HOST ID = 1001, TestSet = TFS, TestSetFolder = Transit Could not find TestSet TFS The summary results file is created at: D:\RunFromALM\UFTWorking\res\Report_86913\Results08122021095729SSS.xml No tests were run, exit with code -1 The launcher tool exited with error code: -1

Note that our Test Set type is "Default" and not "Functional". I was wondering if launcher is looking for a test set of type "Functional", in which case it would not find it.

dorin7bogdan commented 2 years ago

The expected Test Set type is "Default" so it is good. Can you provide the props file please? (without credentials). If you need we can schedule an online support session by tomorrow. What hours are you available at? Please let us know how to contact you.

cocdsctc commented 2 years ago

Props08122021095729SSS.txt Props file is attached (credentials replaced) I can be directly contacted at gn@c.***, we can discuss a time tomorrow for sure. It would be appreciated very much!

dorin7bogdan commented 2 years ago

Ok, thank you. I sent you an email.

dorin7bogdan commented 2 years ago

Hi Gerry, In the meantime, please rerun the command using this version: HpToolsLauncher2.zip Make sure to put a valid path into the TestSet1 property (like Root\ \Transit\ \TFS without spaces between slashes) in the props file.

In this version I added a logging statement and removed a fix related to a bug that occurs when another TestSet with the same name exists in a subfolder of the current TestSet's parent folder.

Then please copy and provide the Console Output here. We need to see especially the line starting with "GetTargetTestSet: ....." and eventually a few lines before and after. Also, please attach the props file and a screenshot of the ALM Test Lab folder structure from the root to the TestSet used in props.

PaulaPaltinisanu commented 2 years ago

Hello,

Due to the lack of activity, this issue will closed. If you happen to encounter any problems, please raise a new issue.

Thank you!