Ask a Question

Getting Error: Unable to navigate to the URL/page while launching tests

SOLVED
Phanindra
Occasional Contributor

Getting Error: Unable to navigate to the URL/page while launching tests

I am unable to execute my tests when launched through a Jenkins job. Please find the environment details below:

TestComplete (Server): 14.81.217.7 x64
TestExecute (VM): 14.81.217.11

Chrome Version (Server): 91.0.4472.77
Chrome Version (VM): 91.0.4472.77

License Details:
TestComplete 14: node-locked
TestExecute 14: floating, 1 seat

Job Details:
Run interactive user session is turned ON and running a specific project suite.

Node Details:
Launch method: Launch agent by connecting it to the master
Internal data directory: remoting

Scenario 1:
Launch the VM through RDP session from the server machine and run the Jenkins job by keeping the VM session active then my tests will run. I can see the tests running through TestComplete chrome plugin.

Scenario 2:
Disconnect the VM and then run the jenkins job, after few minutes jenkins job will be marked as failure and I see following logs:
==========================

Started by user admin
Running as SYSTEM
Building remotely on DESKTOP-73F1U9C in workspace C:\jenkins\agent\workspace\test

[TestComplete] The test execution started (Packnet/Packnet).
[TestComplete] Found TestComplete/TestExecute installations:
Type: TE, Version: 14.81.217.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 14\x64\bin\TestExecute.exe"
Type: TELite, Version: 14.81.217.50, Path: "C:\Program Files (x86)\SmartBear\TestExecuteLite 14\x64\bin\TestExecuteLite.exe"
[TestComplete] Selected TestComplete/TestExecute installation:
Type: TE, Version: 14.81.217.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 14\x64\bin\TestExecute.exe"
[TestComplete] [WARNING] The node is connected via Java Web Start (JNLP). In this mode, the "Run interactive user session" property of the TestComplete Test step is ignored. TestComplete (or TestExecute) will work in the current user session.
[TestComplete] Launching the test runner.
$ '"C:\Program Files (x86)\SmartBear\TestExecute 14\x64\bin\SessionCreator.exe"' ExecuteProcess '/c:""C:\Program Files (x86)\SmartBear\TestExecute 14\x64\bin\TestExecute.exe"" "C:\PackNet_Automation_POC\Packnet.pjs" /run /SilentMode /ForceConversion /ns /exit "/ExportLog:C:\jenkins\agent\workspace\test\1622818571792.tclogx" "/ExportLog:C:\jenkins\agent\workspace\test\1622818571792.htmlx" "/ErrorLog:C:\jenkins\agent\workspace\test\1622818571792.txt" "/ExportLog:C:\jenkins\agent\workspace\test\1622818571792.mht" "/project:Packnet" /DoNotShowLog /JenkinsTCPluginVersion:2.6.2'
[TestComplete] Test runner exit code: 2.
[TestComplete] [WARNING] Error: Unable to navigate to the http://localhost/packnet/#/Login page..
[TestComplete] [WARNING] Errors occurred during the test execution.
[TestComplete] Marking the build as UNSTABLE.
[TestComplete] The test execution finished (Packnet/Packnet).
Build step 'TestComplete Test' changed build result to UNSTABLE
Finished: UNSTABLE

==========================

I have manually launched the Jenkins agent through jnlp file and kept the console open to run my tests.

 

Appreciate your response on this.

 

Thanks!

Phani

8 REPLIES 8
mikef
Staff

Hi @Phanindra 

 

In the Jenkins job configuration, do you have "Use Interactive Session" checked? Try turning that off and letting it run as the local user. Let me know if that works.

 

thanks

 

Phanindra
Occasional Contributor

@mikef Sure I will give a try and let you know. Thanks for the response.

Phanindra
Occasional Contributor

@mikef please find the attached word document. I am still facing the same issue.

Hi @Phanindra 

 

It looks like an issue with how your Jenkins slave is setup as a service then. You can follow the Jenkins docs for that here : https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+as+a+Windows+service#InstallingJenkinsasa... 

 

  1. When you have the JNLP slave agent running, are you able to run tests on the node?
  2. Is there perhaps some authentication step that needs to occur?
  3. Can you record/run a test on any other URL?

Thanks

Phanindra
Occasional Contributor

@mikef I have set up my Jenkins slave node based on this document. You can go through these attached videos for your reference.

Phanindra
Occasional Contributor

@mikef Please find the answers inline

 

When you have the JNLP slave agent running, are you able to run tests on the node?

- yes when I launch the slave agent running and open that VM through RDP connection then I can run my tests (please watch 2nd video)

 

Is there perhaps some authentication step that needs to occur?

- There is no need or problem with system authentication since the bowser and mongodb command prompt are already launched on that VM.

 

Can you record/run a test on any other URL?

- I have tried with other sample links like google, yahoo and ebay links, it works perfectly fine when I have my VM open through RDP but if I close the RDP session and run the jobs then again it will fail with the same reason.

 

It sounds like the remove machine may be locking when you disconnect. Take a look at the following docs to see if these help: 

 

  1. https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/keeping-computer-unlock...
  2. https://support.smartbear.com/testcomplete/docs/testing-with/running/on-locked-computers.html

 

Phanindra
Occasional Contributor

@mikef I was able to resolve this issue though this link:

 

https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/in-minimized-window.htm...

 

I have marked your comment as the solution since one of the links which you suggested leads to my link which I have mentioned above. Thanks a lot for your review comments, those things helped me a lot to learn the tool. Have a good day!

 

Thanks!

Phanindra

cancel
Showing results for 
Search instead for 
Did you mean: