Playwright Retries - playwright

I want to run my playwright tests as headed during the first run but headless on retries. Is there a way in Playwright to retry only the failing tests in headless mode?
I've added retries in config.js but how do I specify them to be headless?

Related

How to re-run cypress test case failures through Jenkins pipeline?

I am running my cypress through Jenkins and Bamboo. Recently, I got so many failure based on issues out RDMS. I had to re run all the failures based on the tests spec name through Jenkins.
Is there any way to re-run my failed specs / tests through Jenkins for my Cypress automation framework ?
Please watch Gleb Bahmutov Cypress v12.5.0 Debug Tab, at 1:18 "Run failures" button.
This Debug Tab is new to Cypress 12.5.0.
The changelog states
12.5.0
Released 01/31/2023
Features:
Easily debug failed CI test runs recorded to the Cypress Cloud from your local Cypress app with the new Debug page.
The documentation is here Debug

browser is not launched by Jenkins when executing cypress specs in headed mode

I configured a step in Jenkins to execute cypress specs in headed mode (the same command I can use on windows command prompt)
.\node_modules\.bin\cypress run --headed --browser edge --env NO_COLOR=1
I would expect Jenkins to launch the browser and execute the tests in headed mode (I use Jenkins locally on my laptop), but this is not happening (it's like cypress tests are executed in headless mode).
How can I perform cross-browser testing in a continuous integration fashion with Jenkins and cypress?

Running non headless automated tests in TFS 2017

I have several automated tests that are associated to test cases in TFS 2017. These tests are running through as part of a functional tests step as a part of our build and they're running fine and I can see them running on the test machines. The physical browsers are there and navigating.
I'm attempting to run automated tests through TFS test hub using the new 2.* version build agents. This will allow us to run individual tests or tests plans.
However, I can't figure out a way to run tests on these agents where they're not running headless. They run headless fine, but I need to be able to see them run.
I read somewhere in Microsoft documentation that the agent must run as interactive instead of a service for UI tests. However that means the agent is running as a version 1.* which is not supported by the TFS test hub test runs.
Does anyone know a way to use the test hub to run test on physical browsers instead of headless?
The new agent 2.0 can also be configured to run in interactive mode, please see Deploy an agent on Windows for details.
Just for your information:
If you are running UI tests such as CodeUI or Selenium on physical browsers such as IE, Firefox, or Chrome, the agent on the machines must be running in interactive mode and not as a service.
If you are running UI tests such as coded UI or Selenium tests, the agent on
the test machines must be running in interactive mode, not as a
service, to allow the agent to launch a web browser. If you are using
a headless browser such as PhantomJS, the agent can be run as a
service or in interactive mode. See Build and Release Agents, Deploy
an agent on Windows, and Agent pools and queues.
Please see Run automated tests from test plans in the Test hub for details.

Executing HTML testsuite using Jenkins

I have recorded some simple selenium tests by Selenium IDE. Now I want to run those tests in Jenkins.
Which plugin to Jenkins do I need to do that? And how to run the tests step by step?
My test suite is in HTML.
Can you provide detailed steps for it?
Why isn't enough to run the selenium tests from maven though jenkins? This is how we made it work. If your jenkins is running on unix environment you should bear in mind that additional configuration of the system are needed.

How to start Selenium in a Jenkins job

I am using Jenkins and Ant to execute my Selenium tests. I would like to make a job that would do the following:
starts Selenium server
executes tests and
kills Selenium server after all tests are run.
I am able to start the Selenium server manually with the following command:
java -jar selenium-2.16.1\selenium-server-standalone-2.25.jar
But I cannot find a Jenkins plugin that would do the start/stop for me. All I can find are some Selenium reporting plugins.
Not sure if there is a plugin, but you can just run the launch and kill commands via the Jenkins job.
Under Build, if you add an Execute shell build step, you can run your commands from there.
Note - The path to the selenium server is relative to the current work directory.
Looking at your error trace, looks like you are running this on a windows PC. you need to be running this as a "execute windows batch command" then run java -jar selenium-2.16.1\selenium-server-standalone-2.25.jar Assuming that you have your jar file on the workspace. or you beed to point it at the right path

Resources