Hello everyone i need some help using jenkins and ranorex,
I use Jenkins on a physical machine "Z".
I use SVN to store my ranorex data on Z server.
I create my ranorex test on a physical machine "A" using mostly action process, validation and scripts C#.
I use A server as slave to run my test from jenkins with the ranorex runner.
On this server i have a batch running java jenkins jobs. The connection between Z and A is fine.
My test "01" work when i am running it on my server A using the ranorex execution.
The purpose of this test is to open an exe app, click on enter, and check if i am on start page using validate action text = "home"
I have commited the solution in SVN.
On jenkins i have created a job to run the job on server A using MSbuild for my ranorex project sln.
And Using Batch "Ranorex\Aquarelle\bin\Debug\Aquarelle.exe /testsuite:Aquarelle_PlanEx_MAR_V6.rxtst /testcase:PBASE /ju /reportlevel:Debug"
If i am on RDP on the server A the jenkins jobs work fine.
Now if i close my RDP without having anything visual, starting again the same test my job failed with this error " 2023/02/22 14:16:24.203][Info ][Validation]: Validating AttributeEqual (Text='A c c u e i l') on item 'Grid.Verfi_Txt_Accueil'.
[2023/02/22 14:17:27.591][Failure][Validation]: Attribute 'Text' of element for item 'AquarelleRepository_V6.Grid.Verfi_Txt_Accueil' does not match the specified value (Failed to find item 'AquarelleRepository_V6.Grid.Verfi_Txt_Accueil'. No element found for path '//container[@name='grid']/container[@name='rectMainContainer']/container[10]//text[@name='label']' within 1m.).
[2023/02/22 14:17:27.650][Error ][Module]: Module execution was aborted because a validation step has failed. Attribute 'Text' of element for item 'AquarelleRepository_V6.Grid.Verfi_Txt_Accueil' does not match the specified value (Failed to find item 'AquarelleRepository_V6.Grid.Verfi_Txt_Accueil'. No element found for path '//container[@name='grid']/container[@name='rectMainContainer']/container[10]//text[@name='label']' within 1m.).<br/>Failed to find item 'AquarelleRepository_V6.Grid.Verfi_Txt_Accueil'.<br/>No element found for path '//container[@name='grid']/container[@name='rectMainContainer']/container[10]//text[@name='label']' within 1m. "
I think the progress can't access to enter button, and so can't valide the next condition on home page where text = "home"
I have put Log screenshot to check what ranorex see, and it return blackscreen.
Do you have any clue about this kind of trouble ?
No element found for path, tests failed when it's run by jenkins
No element found for path, tests failed when it's run by jenkins
Last edited by Alpha13 on Tue Apr 18, 2023 2:55 pm, edited 3 times in total.
Re: Different results when i run test from jenkins and physical server
Hi,
have you tried to keep your RDP user session alive? Otherwise Jenkins cannot access the machine.
Described here under section 'Guidelines for testing via remote desktop protocol (RDP)': https://www.ranorex.com/help/latest/ran ... g-and-faq/
Just scroll down to paragraph 'Keep user session alive after closing remote desktop connection' and you can find the proper script.
You can either close the RDP connection with the mentioned script or build it in the Jenkins pipeline.
have you tried to keep your RDP user session alive? Otherwise Jenkins cannot access the machine.
Described here under section 'Guidelines for testing via remote desktop protocol (RDP)': https://www.ranorex.com/help/latest/ran ... g-and-faq/
Just scroll down to paragraph 'Keep user session alive after closing remote desktop connection' and you can find the proper script.
You can either close the RDP connection with the mentioned script or build it in the Jenkins pipeline.
Re: Different results when i run test from jenkins and physical server
Thanks for you're answer i will try this solution
Edit :
The best way i found to resolve this is the batch option to keep the session open : ( mentionned in the link you provided)
for /f "skip=1 tokens=3 usebackq" %%s in (
`query user %username%`
) do (
%windir%\\System32\\tscon.exe %%s /dest:console
)
It's not very great cause if you forgot to execute it you're jenkins tests can crash but right now it worked
Edit :
The best way i found to resolve this is the batch option to keep the session open : ( mentionned in the link you provided)
for /f "skip=1 tokens=3 usebackq" %%s in (
`query user %username%`
) do (
%windir%\\System32\\tscon.exe %%s /dest:console
)
It's not very great cause if you forgot to execute it you're jenkins tests can crash but right now it worked
Re: Different results when i run test from jenkins and physical server
Hello team,
Quick update cause i still have tests failed when it's runned by Jenkins.
I have managed the blackscreen issue installing LogonExpert 10.2.2 to keep the session unlock when i close the rdp
When i execute the test with the rdp open the reconition is working
But when i close the rdp and i let jenkins run all of my tests it fail. I don't understand what cause those problems.
Error examples : [language=][2023/04/18 13:44:22.094][Info ][Validation]: Validating AttributeEqual (Text='Bilbo') on item 'Aquarelle.Verif_Nom_Bilbo'.
[2023/04/18 13:45:22.744][Failure][Validation]: Attribute 'Text' of element for item 'AquarelleRepository_V6.Aquarelle.Verif_Nom_Bilbo' does not match the specified value (Failed to find item 'AquarelleRepository_V6.Aquarelle.Verif_Nom_Bilbo'. No element found for path 'container[@name='main']/?/?/container[@name='grid']/container[@name='rectMainContainer']//table[@name='tableView']/?/?/?/text[@caption='Bilbo']' within 30s.).
[2023/04/18 13:45:22.787][Error ][Module]: Module execution was aborted because a validation step has failed. Attribute 'Text' of element for item 'AquarelleRepository_V6.Aquarelle.Verif_Nom_Bilbo' does not match the specified value (Failed to find item 'AquarelleRepository_V6.Aquarelle.Verif_Nom_Bilbo'. No element found for path 'container[@name='main']/?/?/container[@name='grid']/container[@name='rectMainContainer']//table[@name='tableView']/?/?/?/text[@caption='Bilbo']' within 30s.).<br/>Failed to find item 'AquarelleRepository_V6.Aquarelle.Verif_Nom_Bilbo'.<br/>No element found for path 'container[@name='main']/?/?/container[@name='grid']/container[@name='rectMainContainer']//table[@name='tableView']/?/?/?/text[@caption='Bilbo']' within 30s.
[2023/04/18 13:45:22.828][Failure][Test]: Test Module 'NouveauContact' completed with status 'Failed'.[/language]
What can i give you to make some investigation ?
Quick update cause i still have tests failed when it's runned by Jenkins.
I have managed the blackscreen issue installing LogonExpert 10.2.2 to keep the session unlock when i close the rdp
When i execute the test with the rdp open the reconition is working
But when i close the rdp and i let jenkins run all of my tests it fail. I don't understand what cause those problems.
Error examples : [language=][2023/04/18 13:44:22.094][Info ][Validation]: Validating AttributeEqual (Text='Bilbo') on item 'Aquarelle.Verif_Nom_Bilbo'.
[2023/04/18 13:45:22.744][Failure][Validation]: Attribute 'Text' of element for item 'AquarelleRepository_V6.Aquarelle.Verif_Nom_Bilbo' does not match the specified value (Failed to find item 'AquarelleRepository_V6.Aquarelle.Verif_Nom_Bilbo'. No element found for path 'container[@name='main']/?/?/container[@name='grid']/container[@name='rectMainContainer']//table[@name='tableView']/?/?/?/text[@caption='Bilbo']' within 30s.).
[2023/04/18 13:45:22.787][Error ][Module]: Module execution was aborted because a validation step has failed. Attribute 'Text' of element for item 'AquarelleRepository_V6.Aquarelle.Verif_Nom_Bilbo' does not match the specified value (Failed to find item 'AquarelleRepository_V6.Aquarelle.Verif_Nom_Bilbo'. No element found for path 'container[@name='main']/?/?/container[@name='grid']/container[@name='rectMainContainer']//table[@name='tableView']/?/?/?/text[@caption='Bilbo']' within 30s.).<br/>Failed to find item 'AquarelleRepository_V6.Aquarelle.Verif_Nom_Bilbo'.<br/>No element found for path 'container[@name='main']/?/?/container[@name='grid']/container[@name='rectMainContainer']//table[@name='tableView']/?/?/?/text[@caption='Bilbo']' within 30s.
[2023/04/18 13:45:22.828][Failure][Test]: Test Module 'NouveauContact' completed with status 'Failed'.[/language]
What can i give you to make some investigation ?