TestCafe Sudio setting different timeout, when recording - testing

The problem is specific to the recording. I found timeouts settings in the browser properties of the TestCafe Studio and they work when I press "Run Test" button. However, whenever I press "Record test" the editor seems to ignore my settings and I get the request timeout error:
Failed to complete a request to 'address.com' within the timeout period. The problem may be related to local machine's network or firewall settings, server outage, or network problems that make the server inaccessible.
I tried changing the recording settings, but they don't seem to work either.
The site is up and working, just takes a while to load.

Indeed, TestCafe Studio does not support the same settings in recording mode as in run mode.
As a workaround, temporarily place the await t.wait(timeout) function at the beginning of the test.

Related

Recording Tests in TestCafe using PIV Card Technbology

Using TestCafe, when running a test suite that already exists, and includes a signin function that clicks through and works successfully using PIV Card authentication and code that was written manually all works well. However, in the essence of speed, I was hoping to record tests using the TestCafe Studio software to get it done quicker than manually doing it.The issue we are running into, if I click "record a new test" on an existing test script, it attempts to run through the existing signin code, (which works if you run it as a normal test executing and not recording), it fails on logging in. I believe it's due to the nature of PIV. I was wondering, is it possible with testcafe studio, a setting perhaps that might maintain state of a logged in session rather than killing it at each test start? I'm already logged in with my PIV when I start the test, but it's appearing to log me out at the start of each session. Anyone have experience with this and know what I can do to make it remember me when I run a new test?
If I correctly understand your usage scenario, you are running tests using a user profile, which is already logged in. Unfortunately, TestCafe Studio does not have a mechanism for launching recording with profiles, as well as launching a browser with any options in general.
I can suggest you the following workaround:
Turn off the code responsible for the login when recording the script.
Use the await t.debug() function instead of login.
When the test starts, wait for the debug panel to appear in the browser and unlock the page:
Sign in manually.
Click Resume on the debug panel.
Write down your script.
Replace await t.debug() with a login function.

Manually setting QUARANTINE_THRESHOLD and DISCONNECT_THRESHOLD in testcafe does not work

I changed the QUARANTINE_THRESHOLD and DISCONNECT_THRESHOLD in test_run_controller.ts file to 1 million each and built successfully however, my test still fails after around 1000-10000 restarts with the error :
ERROR The Chrome 89.0.4389.90 / Linux 0.0 browser disconnected. This problem may appear when a browser hangs or is closed, or due to network issues.
Is there something else that may be forcing testcafe to quit? or is the issue in browser perhaps?
Thank you
According to the error, your browser hangs for some reason. The problem could be in the way you organize your tests. It's likely that you have some code that leads to memory leaks, and after 1000-10000 restarts, your machine does not have enough RAM to run the browser.
Please clarify why you need to restart your tests 1000-10000 times.
I changed the QUARANTINE_THRESHOLD and DISCONNECT_THRESHOLD in
test_run_controller.ts file
We are working on the quarantine mode configuration, so you will have the capability to change quarantine options out of the box.

IE lan settings revert back when rpt open it during recording http proxy

I am beginning to use Rational Performance Tester to do some load/performance testing and I stuck at the first step - recording a script. I am using IE 11 and I am disabling internet by going to Internet Options>Content>Lan Settings. Then I try to open some website and it won't open - which is good (expected behaviour). Then I run my RPT to do the recording and the Internet options revert back and 'Automatic Configuration' check box get checked (unwanted behaviour). The HTTP proxy recorder say that it is accepting connection at (some number) port but open connections stay 0. The bytes in the recording window do not move with any click, thus nothing being recorded. Thanks in advance!
I have only tried it in IE 11. Don't have access to any other browser (company policy)
There is no coding required.
I expect open connections to move above 0
This issue was solved when I had admin rights to the machine and application - run IBM RPT as administrator. Thus I was able to record the http traffic and successfully play it back using the load agents.

When macbook is locked, selenium safari tests initiated by Jenkins on the mac wont run

I have made sure that the mac does not sleep by adjusting the settings in the system preferences. Jenkins will start the test on a schedule, the browser comes up but the test fails because the page is blank.
The same test works with no problem if the mac is unlocked or the screen save is not up.
I cannot leave the mac unlocked because the test runs at night and its a security issue.
Has anyone encountered this issue? And have a solution. Please share.
Attaching some logs. This image will give an idea of what I am describing.
You can try to run tests on locked computer when:
you set your display never turn off, when you lock your computer
you made sure, that computer never goes in hibernate or sleeping mode
If it will not work you can use two more possibilities:
run your tests on headless browser. Here is a pretty good explanation how to do it.
run your tests on a remote screen via VNC or RDP
EDIT:
You can try not lock the screen, but instead start the screensaver, and require the screensaver to immediately require a password.

Saucelabs tests block on browser allow dialog

My web app uses IndexedDB and I'm testing on SauceLabs. Some months back my tests ran but now they block on a browser dialog that says "http://gbserver3.cs.unc.edu/" wants to: store files on this device", with an Allow button.
This is Win7 and Chrome or Firefox. Likely others too.
How can I dismiss or prevent this dialog?
Update: I have discovered that if I don't ask for quota I don't get the popup and my tests succeed. I'd still like to learn how to get rid of that dialog.
we are using Nightwatch.js in our project and we were facing the same issue.
What actually did the trick was using --unlimited-storage switch when launching the browser.
(List of other command line switches for Chromium can be found here)