Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
protractor-cucumber-framework
Advanced tools
This framework was originally part of angular/protractor and is now a separate module to decouple cucumber.js.
npm install --save-dev protractor-cucumber-framework
To implement this framework, utilize the protractor
custom framework config option:
exports.config = {
// set to "custom" instead of cucumber.
framework: 'custom',
// path relative to the current config file
frameworkPath: require.resolve('protractor-cucumber-framework'),
// require feature files
specs: [
'path/to/feature/files/**/*.feature' // accepts a glob
],
cucumberOpts: {
// require step definitions
require: [
'path/to/step/definitions/**/*.steps.js' // accepts a glob
]
}
};
All of the cucumberOpts
will be passed to cucumberjs
as arguments.
For example, to call cucumberjs with the --strict
, --no-colors
, and to specify custom formatters:
cucumberOpts: {
strict: true,
'no-colors': true,
format: ['progress', 'pretty:output.txt'],
// ...
}
The following parameters have special behavior:
require
- globs will be expanded to multiple --require
argumentsIf you have a formatter that outputs to a path and your tests are sharded or you have multi capabilities then this library will add the PID to the path to make them unique. The reason for this is multiple processes can write to the same path which ends up clobbering each other. You'll end up with 1 file per process that protractor spawns.
exports.config = {
capabilities: {
shardTestFiles: true,
// ...
},
cucumberOpts: {
format: 'json:results.json',
// ...
}
};
If there were 2 feature files then you can expect the following output files...
results.11111.json
results.22222.json
...where the numbers will be the actual PIDs.
Pull requests are welcome. Commits should have an appropriate message and be squashed.
Ensure that the following dependencies are installed:
Clone the github repository:
git clone https://github.com/protractor-cucumber-framework/protractor-cucumber-framework
cd protractor-cucumber-framework
npm install
Start a selenium server:
npm run webdriver
Start the test app that tests will be run against in a separate shell:
npm start
Run the tests in a separate shell:
npm test
npm publish
git tag v1.0.2 && git push origin master --tags
)npm i -g release && release
)FAQs
Protractor framework for Cucumber.js
The npm package protractor-cucumber-framework receives a total of 24,737 weekly downloads. As such, protractor-cucumber-framework popularity was classified as popular.
We found that protractor-cucumber-framework demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.