Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
Jenkins ver. 2.138.4
Plugin: Micro Focus Application Automation Tools ver. 5.6.2
ALM 12.53 patch 2
UFT ONE 15.0.2
Description
The plugin runs a different test set if it is located on a subfolder but the test set has the same name of another one located to a parent folder.
It seems that in https://github.com/hpsa/hpe-application-automation-tools-plugin/blob/master/HpToolsLauncher/Runners/AlmTestSetsRunner.cs at line 421 the condition lack of another check.
It should be change from:
if (ts.Name.Equals(tsName, StringComparison.InvariantCultureIgnoreCase))
to
if (ts.Name.Equals(tsName, StringComparison.InvariantCultureIgnoreCase) && (ts.TestSetFolder.NodeID == tsFolder.NodeID))
Is it possible to fix it in version 5.6.2 of the plugin?
Thank you,
Massimo.
Attachments
Issue Links
- is related to
-
JENKINS-62173 Unable to find Test Set using path
-
- Closed
-
Activity
Hi, the problem is that, if I understand well, the version you suggest to use is not compatible with our jenkins installation. So I asked if it is possible to fix it in the 5.6.2 version of the plugin.
Thank you,
Massimo.
Hi,
I see the last version of the plugin use this code https://github.com/jenkinsci/hpe-application-automation-tools-plugin/blob/latest/HpToolsLauncher/Runners/AlmTestSetsRunner.cs and the problem is still the same. It is in the is the GetTargetTestSet function at line 580 . This function lacks in the tsFolder argument to use to check the correct ID.
So the installation of the last plugin version will not be useful.
Please correct as I suggest in my previous reply.
Best Regards,
Massimo.
Hello Massimo,
Can we set up a meeting, in order to discuss this issue?
Please contact Dorin Bodgan (dorin.bogdan@microfocus.com) from UFT team, to discuss your suggestion.
Best Regards,
Hilda
Hi guys,
thank you for the meeting.
I suggest to put these update to the the AlmTestSetsRunner.cs class:
Line 1179 change in:
targetTestSet = GetTargetTestSet(testSetList, testSuiteName, tsFolder);
Line 571, declare the function as this:
public ITestSet GetTargetTestSet(List testSetList, string testSuiteName, ITestSetFolder tsFolder)
Line 580 change in:
if (tempName.Equals(testSuiteName, StringComparison.InvariantCultureIgnoreCase) && testSet.TestSetFolder.NodeID == tsFolder.NodeID)
Please let me know if it is all clear.
Best Regards,
Massimo.
Hi motuetu,
Please retest using the following steps:
1. Locate and backup the existing (old) file HpToolsLauncher.exe
2. Download and extract the new one from HpToolsLauncher.zip .
3. Run a few the scenarios and let us know the results (including any errors)
Thanks,
Dorin.
Hi Dorin,
thank you for your response. I tried the new HpToolsLaucher.exe but nothing has changed.
I attach a zip file (password will send via mail to you) with a word document that explain the behaviour.
Best Regards,
Massimo.
[^JPlgInProblem_Explaination.zip]
Hi motuetu,
Thank you for details.
Is is possible to have the logs printed in the Console too ?
The QA team just reproduced the issue, but only when the TestSet with the smaller ID is in the child subfolder.
Please give us some time to investigate then will come back with the findings.
Best regards,
Dorin.
Hi Dorin,
here the log of the pipeline. Same password of the previous.
best regards,
Massimo.
Hi motuetu,
1. Please locate the file hp-application-automation-tools-plugin.jar on your Jenkins server and make a copy / backup.
By default it should be inside of the folder:
/var/lib/jenkins/plugins/hp-application-automation-tools-plugin/WEB-INF/lib/
If it's not there, then it can be found using the command:
$ find / -name hp-application-automation-tools-plugin.jar
2. Stop the Jenkins service (How to Stop / Start Jenkins)
3. Get the HpToolsLauncher_20210511.zip and extract the exe file into the folder found above.
4. Now you have to insert the new exe into that jar archive, using one of 3 methods:
4.1. Open the jar using 7-Zip or WinRAR and replace the old exe with the new one.
4.2. Open the command prompt, set the folder found at point 1 as current directory:
> cd /var/lib/jenkins/plugins/hp-application-automation-tools-plugin/WEB-INF/lib
and run the statement:
> jar uf hp-application-automation-tools-plugin.jar HpToolsLauncher.exe
4.3. Or, provide us the jar file and we will try to update it for you.
Check the content of the jar (to make sure it contains the new HpToolsLauncher.exe) using the command (check the Timestamp value):
$ jar tvf hp-application-automation-tools-plugin.jar
5. Start the Jenkins service (How to Stop / Start Jenkins)
6. Rebuild the desired pipeline job and check the results.
In the Console Output you should see printed at some point the IDs of the duplicate TestSets, like in this example:
[Run from ALM Pipeline] $ "C:\Jenkins\workspace\Run from ALM Pipeline\HpToolsLauncher.exe" -paramfile props11052021214823297.txt "Started..." Timeout is set to: -1 Run mode is set to: RUN_LOCAL ID = 155822, TestSet = UFT_Calc, TestSetFolder = SubFolder ID = 165111, TestSet = UFT_Calc, TestSetFolder = Jenkins_UFT ============================================================================ Starting test set execution Test set name: UFT_Calc, Test set id: 165111 Test 1: [1]Paint will run on host: MYD-HVM03172 Test 2: [1]Calculator will run on host: MYD-HVM03172 "Scheduler started at:11/05/2021 21:48:34 -------------------------------------------------------------------------------------------------------
Please let us know the final status.
Kind regards,
Dorin.
Hi Dorin,
Jenkins Master is a Linux Server. My collegue that manage jenkins asks for instruction for a linux server.
Can you please give me what they need?
thank you, Massimo.
Hi motuetu,
Please check the updates from my previous comment.
Until the Linux server is updated, you can make a quick test on that Windows computer, without using Jenkins.
Copy the new HpToolsLauncher.exe under "C:\Jenkins_OS_Test\workspace\ISP-TDNR\ChooseAndLogin\" and run the command:
C:\Jenkins_OS_Test\workspace\ISP-TDNR\ChooseAndLogin\HpToolsLauncher.exe -paramfile props11052021093353885.txt
Note: The HpToolsLauncher.exe will be overwritten automatically each time when run the job from Jenkins.
Best regards,
Dorin.
Hi Dorin,
I understand. Well I update HpToolsLauncher.exe on a UFT client machine and try to run the command as you suggest but always give me an error because it cannot find value on the almUsername key however it is set.
Do you know why it cannot retrieve the almUserName key?
For my collegues that manage jenkins what I have to tell them?
Best regards,
Massimo.
Hi motuetu,
The previous command example (with props11052021093353885.txt) is copied from the log files from PipelineConsoleLog.zip
So, the command is using the same properties that worked for you 2 days ago, from the client machine WSVATS0016.
If you are using other machine please choose a props###.txt file from its workspace, and also the proper path to the workspace.
Please tell the colleague that manages the Jenkins sever to follow the steps from the big comment (with 6 steps).
Your local test is independent of Jenkins and does not affect it.
Dorin.
Hi Dorin,
I see that the error expose from the new HpToolsLauncher was on how the key was searched. Infact it searched the key "almUsername" instead of "almUserName" that the plugin usually looking for.
The output was this one:
C:\jenkins_OS\workspace\ISP-TDNR\ChooseAndLogin\HpToolsLauncher.exe -paramfile props0305202111072587499.txt
"Started..."
Timeout is set to: 3600
Run mode is set to: RUN_LOCAL
Unable to retrieve test set folder: Node not found.
ID = 88181, TestSet = ALM Scenario Sicurezza, TestSetFolder = 02 SEC
ID = 35081, TestSet = ALM Scenario Sicurezza, TestSetFolder = System TDNR
============================================================================
Starting test set execution
Test set name: ALM Scenario Sicurezza, Test set id: 35081
I don't know why it gives me the row that I evidence in Bold but it seems to execute correct testset.
Then I tried to rename the testset in the subfolder and it runs correctly the testset in the correct path.
I tried to run the same propfile but I changed the name of the testset inside the parent path and it give me an error:
C:\jenkins_OS\workspace\ISP-TDNR\ChooseAndLogin\HpToolsLauncher.exe -paramfile props0305202111072587499.txt
"Started..."
Timeout is set to: 3600
Run mode is set to: RUN_LOCAL
Unable to retrieve test set folder: Node not found.
ID = 88181, TestSet = ALM Scenario Sicurezza_4SR, TestSetFolder = 02 SEC
ID = 35081, TestSet = ALM Scenario Sicurezza_L, TestSetFolder = System TDNR
Could not find TestSet ALM Scenario Sicurezza
Null target test set
============================================================================
Starting test set execution
Eccezione non gestita: System.NullReferenceException: Riferimento a un oggetto non impostato su un'istanza di oggetto.
in HpToolsLauncher.AlmTestSetsRunner.RunTestSet(String tsFolderName, String tsName, String testParameters, Double timeout, QcRunMode runMode, String runHost, Boolean isFilterSelected, String filterByName, List`1 filterByStatuses, TestStorageType testStorageType)
in HpToolsLauncher.AlmTestSetsRunner.Run()
in HpToolsLauncher.Launcher.Run()
in HpToolsLauncher.Program.Main(String[] args)
Thank you and best regards,
Massimo.
Hi motuetu,
If you have unexpected runtime errors that crash the tool, please choose the best version that fits for you:
HpToolsLauncher_20210511.zipis compiled with option ”x86”.
HpToolsLauncher_Mixed.zipis compiled with option ”Mixed Platform”.
HpToolsLauncher_AnyCPU.zip is compiled with option ”Any CPU”.
HpToolsLauncher_x64.zipis compiled with option ”x64”.
Dorin.
Hi motuetu,
Regarding the ”Node not found” error, it seems that JENKINS-62173 might need to be reopened.
The QA team is aware too, and will have it in attention.
Dorin.
Hi motuetu,
Regarding the error "Could not find TestSet ALM Scenario Sicurezza".
I suppose that you ran that test from command line.
If yes, please make sure that props0305202111072587499.txt contains the desired TestSet path and name (and not the old one mentioned in error).
Dorin.
Hi Dorin,
the error occurs if you pass a testset name that does not exist. So I think it must be managed this event.
My collegue give me another information: our jenkins is on container so they would like to know how to do the operation you wrote me for the update of the jar.
I'm going to organize a meeting with them so they can explain better the jenkins infrastructure. Let me know your availability.
Thank you and Best regards,
Massimo.
Hi Dorin,
my collegues can update the jar file and then I tried a run but it shows this error:
[ChooseAndLogin] $ C:\Jenkins_OS_Test\workspace\ISP-TDNR\ChooseAndLogin\HpToolsLauncher.exe -paramfile props14052021135612537.txt
"Started..."
The parameter 'almUsername' is required to run a test from QC.
empty runner;
as I told you before the plugin expects these arguments:
almUserName
almPassword
almDomain
almProject
almRunHost
almRunMode
almServerName
almTestSets
almTimeout
so I think it's necessary to update the code using correct string in cammelCase.
best regards,
Massimo.
Hi motuetu,
Usually we do not fix old versions, so I updated and provided you the last tool version.
But it seems it's not compatible with the old plugin, so I will try to update the version 5.6.2 and come back.
Thank you for understanding.
Hi motuetu,
Please check HpToolsLauncher_5.6.2.zip and let us know the results.
If you still see the error please provide the props file (without password).
Dorin.
Hi Dorin,
I tried only to modify the the code replace almUserName with almUsername and the error is this one:
WARNING: Unknown parameter(s) found for class type 'com.microfocus.application.automation.tools.run.RunFromAlmBuilder': almUsername
and then this error stack:
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:460)
at com.microfocus.application.automation.tools.model.RunFromAlmModel.CreateProperties(RunFromAlmModel.java:151)
at com.microfocus.application.automation.tools.model.RunFromAlmModel.getProperties(RunFromAlmModel.java:134)
at com.microfocus.application.automation.tools.run.RunFromAlmBuilder.perform(RunFromAlmBuilder.java:179)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
No propsfile has been created.
Do you want we'll use the HpToolsLauncher.exe inside the HpToolsLauncher_5.6.2.zip you provide me?
Let me know.
Best Regards,
Massimo.
Hi motuetu,
In version 5.6.2 of the plugin, the ”almUserName” was the right property name (in java and C# related projects).
Later, the property was renamed as ”almUsername” (in both java and C# code).
So for 5.6.2 please use HpToolsLauncher_5.6.2.zipand let us know the results.
When test HpToolsLauncher.exe from command-line, then make sure the ”props###.txt” file contains ”almUserName” and not ”almUsername”.
If necessary, for Jenkins server I can provide you the entire ”jar” file (hp-application-automation-tools-plugin.jar) corresponding to version 5.6.2.
Dorin.
Hi,
if you can provide me the jar with the fix I will appreciate. Let me know.
Thank you,
Massimo.
Hi Dorin,
we verify and try few times and it seems it works fine.
Can you please confirm me that this fix will be done also in the newest versions of the plugin?
Best regards,
Massimo.
Hi Dorin,
thank you. Just do understand better, the fix will be also for the 6.8 version or only for the next.
thank you,
Massimo.
Hi motuetu,
The version 6.8 was released about 2 months ago, at the end of March.
This fix will be included in 6.9, which will be released at the end of this month.
Dorin.
Hello,
The main issue was fixed in the latest plugin version 6.9. Now it will run the correct Test Set from ALM.
We are going to reopen case JENKINS-62173, because of the second issue: "Unable to retrieve test set folder: Node not found." message in console output
We are aware of this problem, and we will fix it in the next release.
Thank you.
Can you please try to use the latest plugin (6.8) and check if the issue still exists?