Playwright error: browserType.launch: Timeout 180000ms exceeded at Object.playwrightFixtures.browser.scope [as fn] - playwright

Version: "#playwright/test": "^1.29.2"
Browser: Microsoft Edge
Has anyone else also faced similar issue before? I'm getting below error,
"browserType.launch: Timeout 180000ms exceeded at Object.playwrightFixtures.browser.scope [as fn]"
I have 3 test modules in my project setup, each module have 8 to 9 e2e test cases.
The Playwright test runner is able to execute the first 2 tests in around 343 seconds (see below pic) however, throwing "browserType.launch: Timeout 180000ms" error on executing 3rd test.
How can we fix this issue? do we need to manually adjust the timeout in "project\node_modules#playwright\test\lib\index.js:180:51)
at node_modules#playwright\test\lib\fixtures.js:95:81" file?
By the way, I am getting this error when trying to run the tests in serial mode. The tests runs fine if I execute them individually, however I need to execute them all in one go.

Related

Why Jest tests are SOMETIMES failing on CircleCI?

I have Jest tests that are running against the dockerized Neo4j Database, and sometimes they fail on CircleCI. The error message for all 25+ of them is :
thrown: "Exceeded timeout of 5000 ms for a hook.
#*******api: Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."
Since they fail sometimes, like once in 25 runs, I am wondering if jest.setTimeout will solve the issue. I was able to fail them locally by setting jest.setTimeout(10), but I am not sure how to debug this even more, or whether something else could be an issue here aside from a small timeout (default 5000). I would understand if 1/25 or a few fails, or if all other suits fail, but only a single file with all tests within that file is failing. And it is always the same file, never some other file for this reason ever.
Additional information, locally, that single file runs in less than a 1000ms connected to the staging database which is huge compared to the dockerized that has only a few files at the time of running
For anyone who sees this, I was able to solve this by adding the --maxWorkers=2 flag to the test command in my CircleCI config. See here for details: https://support.circleci.com/hc/en-us/articles/360005442714-Your-test-tools-are-smart-and-that-s-a-problem-Learn-about-when-optimization-goes-wrong-
Naman's answer is perfect! I couldn't believe it but it really solved my problem. Just to be extra clear on how to do it:
I change the test script from my package.json from jest to jest --maxWorkers=2. Then I pushed and it did solve my error.

Azure Pipelines | App Center test | error when including category

I'm running a job (series of tasks including nuget restore, build & signing application) on Azure DevOps to build android application and Test (Xamarin.UITest) application through Appcenter.
Test runs fine, if I don't specify any arguments on "Additional options for run" on "Test with Visual Studio App Center" task. When I do that (--include-category LandingPage) task throws error saying:
Error: Command 'test run manifest --manifest-path d:\a\12\a\AppCenterTest\manifest.json --app-path d:/a/12/b/Release/PUBLISH_PACKAGE_NAME_PHONE_ANDROID.PUBLISH_PACKAGE_NAME_PHONE_ANDROID.apk --app SampleApp/Android --devices 12345abcd --test-series DevOps --locale en_US --include-category LandingPage --quiet --token ***' failed with exception "Unknown argument --include-category"
What I'm missing?
[command works perfectly when I run appcenter test run from my local machine.]
Any help is appreciated.
For people facing this issue, make sure you're providing your --include-category AppCenterTest under Prepare Tests area not under Run tests. Additional Options under Run Tests have different purpose it seems.
failed with exception "Unknown argument --include-category
In fact, the error message has been clear to express the caused reason. For this App Center Test task in Azure Devops, this command argument --include-category does not supportted.
Please Refer to the open source of about this task: azure-pipelines-tasks/Tasks/AppCenterTestV1. You can check its logic and which arguments are supported by this task.
After you open the source file in github, go function getTestRunner and you will see that for test runner, the arguments it defined and supported to compile in this task does not include --include-category. That's why you receive the Unknown argument error.

Electron build timing out on CircleCI

I am trying to get CircleCI to work with my electron app but I can't understand how to stop the timeout error.
You can look at the app here: https://github.com/sauravyash/OutFlux
It fails on the npm test stage of the build with:
> outflux#1.0.0 test /home/ubuntu/OutFlux
> electron .
Xlib: extension "RANDR" missing on display ":99".
Xlib: extension "RANDR" missing on display ":99".
command ((npm :test)) took more than 10 minutes since last output
I'm new to the whole idea of CI so bear with me if the answer is obvious.
In case anyone sees this, you must understand that running electron by itself isnt testing anything, which is the point of CI. You should use something like Spectron to test if your app is successful in headless testing (testing without a real display).
https://github.com/electron/spectron

Fitnesse: Slim server died issue

I am trying to add the Fitnesse testing tool for iOS app testing. I created sample test. When I clicked on test button, I am getting following error.
Unable to start test system 'slim': fitnesse.slim.SlimError: Error
SLiM server died before a connection could be established. [OCSP_INFO]
ERROR: Use '$ npm install ios-sim -g'
It looks like server connection is not created. How to solve this issue.

Solr - OpenNLP Patch 2899, Time taken by trainall.sh ? and failed test suite?

I am following the instructions given at - https://wiki.apache.org/solr/OpenNLP
For English language testing: Until LUCENE-2899 is committed:
pull the latest trunk or 4.0 branch
apply the latest LUCENE-2899 patch
do 'ant compile'
cd solr/contrib/opennlp/src/test-files/training
run 'bin/trainall.sh'
this will create binary files which will be included in the distribution when committed.
Now, go to trunk-dir/solr and run 'ant test-contrib'. It compiles the OpenNLP lucene and solr code against the OpenNLP libraries and uses the small model files.
I have followed the steps, at step5, I am not sure how much time it 'll take? as it have been running for 12+ hrs..
or I can execute step6 in parallel? I tried step 5 & 6 togather, then there is an error ; description mentioned below...
[junit4] Tests summary: 2 suites, 0 tests, 2 suite-level errors
BUILD FAILED
/home/svn2/solr/build.xml:201: The following error occurred while executing this line:
/home/svn2/solr/common-build.xml:417: The following error occurred while executing this line:
/home/svn2/solr/common-build.xml:449: The following error occurred while executing this line:
/home/svn2/lucene/common-build.xml:1250: The following error occurred while executing this line:
/home/svn2/lucene/common-build.xml:893: There were test failures: 2 suites, 0 tests, 2 suite-level errors
Please suggest. My high level objective is to index corpora sentence by sentence.
Thanks in advance!
The script has #!/usr/bin/env at the top, which caused seemingly long runtime on my system as well (nothing is in fact running, as shown by the lack of generated test files).
Replacing that with #!/bin/bash promptly solved the problem (runtime a few seconds).

Resources