Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
cucumber-playwright
Advanced tools
Readme
A starter repo for writing E2E tests based on Cucumber(7) with Playwright using Typescript.
The playwright-cucumber project started when playwright was a browser automation library. It did not have a test runner, hence cucumber-js was used as the test runner and PW used for the automation. Since then PW added their amazing PW test library which is a test runner. But, sadly, it overlaps the functionality provided by cucumber-js. Therefore you need to make the decision now of which runner you want to run: cucumber for BDD style tests or PW test for “normal” tests. Some of the features provided by PW test are also available in cucumber-js, such as parallel run and different configurations (profiles in cucumber-js terms), but may require a different configuration.
This repository is based on the Cucumber-typescript-starter repo.
Create a repo based on this template and start writing your tests.
npm run test
or npx cucumber-js
runs all tests
npm run test <feature name>
or npx cucumber-js <feature name>
run the single feature
By default we will use chromium. You can define an envrionment variable called BROWSER and set the name of the browser. Available options: chromium, firefox, webkit
On Linux and Mac you can write:
BROWSER=firefox npm run test
or BROWSER=firefox npx cucumber-js
runs all tests using Firefox
One Windows you need to write
set BROWSER=firefox
npm run test
I am not fond of the Page Object Model (POM) for testing. It feels like a leftover from Java world, and I do not think it fits the Javascript world. However, you can check this PR to see POM implementation.
npm run debug
- headful mode with APIs enables both APIs and debug optionsnpm run api
- headless mode with debug apisnpm run video
- headless mode vith videoTo stop the feature, you can add the Then debug
step inside your feature. It will stop your debugger.
The last reporter/formatter found on the cucumber-js command-line wins:
--format summary --format @cucumber/pretty-formatter --format cucumber-console-formatter
In cucumber.mjs file, modify the options.
To use Allure reporting, you can run with env param: USE_ALLURE=1
, and then use the npm run allure
to show the report.
@ignore
npm run build
.npm run steps-usage
.npm run report
.package.json
in "report": "xdg-open reports/report.html"
npm run allure
.FAQs
Starter project to write and debug cucumber-js features with Playwright
The npm package cucumber-playwright receives a total of 10 weekly downloads. As such, cucumber-playwright popularity was classified as not popular.
We found that cucumber-playwright demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.