I am very new, and I have been unable to find a fix to this issue that was within my abilities.
I have built very simple automation to navigate to a site, make some clicks, close, and do it again. However, I am running this automation through a rotating proxy, and the speed of the proxies can vary. The majority of the time, this test finishes in about 30-45 seconds, but it will run for several minutes if it gets a slow proxy or some type of failure on the WebUI.navigateToUrl step.
It would be great if I were able to goto the next test case within the suite upon a particular step taking longer than ** number of seconds, but I would be fine if the automation simply timed out a test case after 60 seconds and moved to the next test case.
I appreciate all of you. You all feel like family after hours and hours of reading this forum.
Hope I have a clearly understanding about your situation. My thought that you want to run a set N TCs in a Test Suite, if Test Case X (X is a sub-set of N) having its execution time is longer than Y, it will be stopped automatically and go to next Test Case (X +1). If the assumption is correct, you are able to apply below logic:
Before the script running, add a Test Step to get current execution time
Identify the time out of Test Case, example: 60 seconds
Create one variable, add your Time Out to the time in Step#1
Make a loop, while current time is still less than the time in Step#3, execute the code with your main purposes
The loop will be broken until the time is exceeded, put the condition: KeywordUtils.MarkFailed(“Some note here”)
With that approach, you are able to control how long that a Test Case will be executed
I appreciate you, loc.nguyen, but you went way over my head with your fix. I have very little skill, and this is my first attempt at automating a few clicks on a website.
I’m jealous of you guys and girls that can make a computer really work for you.
kazurayam, I did not feel it was necessary to post the code. It is a bunch of different cases, and they all act similarly. They simply navigate to a url, make some clicks, close, and repeat.
The entire issue is whether they get a good proxy from the rotating proxy service. If they do, they complete in around 30 seconds. If they don’t every step is very slow: 210 seconds to load the url instead of 8 seconds, 45 seconds to make a click instead of .8 seconds, etc.
I was kind of hoping I was messing up a global setting, bc timing out a test case after a certain amount of time, and either starting it over or moving onto the next test case within the suite, seems like something that might be needed often.
I have tested the “Default page load timeout” of Katalon Studio. I believe it works fine as long as the server-side (including proxies) are functining OK.
I guess your Proxy server is functioning bad, and Katalon Studio can not hide its badness. For example, let me assume that one of your proxy keeps connection unclosed for some reason (bug? mistakes in settings). It is possible that a HTTP connection can be kept alive endlessly. In such situation the renderer (browser) will continue waiting until the HTTP connection to be closed by the proxy. The Katalon’s “Default page load timeout” in the Project > Settings" will be helpless.
As long as you are sitting behind the malfuntioning proxies, your automated UI tests will never be productive. Katalon Studio can do nothing to live with them.
Bad proxy makes an organisation dull boy. You should fix the proxy first. You can inform the network administrators of your organisation of the difficulty you have, and ask them to get rid of the super-slow proxy box out of the rotation, can’t you?
I have also seen you helping people with the navigatetourl error on firefox when using the software’s proxy function.
I am having the same issue. It works perfectly when not using the proxy, but it will not even naviagate to the url with the proxy on. It just sits at a new firefox tab, with no input in the address bar.
How about other types of browsers? Chrome, Edge, Safari?
Is your problem specific to a certain version of Katalon Studio? Which version do you use? How did it work with older version?
You are saying that navigateToUrl() took long time. Are you aware exactly which URL is responding slowly (or not responding at all)? You should investigate it. You should be able to point out “any request to this URL via Proxy is too slow”. Given this information, your network administrators may listen to you. Without such concrete information, I am afraid, they would be not be interested.