Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
grpc-cucumber-js
Advanced tools
Inspired by handy libraries for testing REST APIs like apickli or relish, this package gives a basic start for cucumber testing against a gRPC service.
Install with your usual tool via yarn add grpc-cucumber-js
or npm install grpc-cucumber-js
.
Then you need to initialize the library to your gprc API in a Before cucumber event. A good example of a basic set up can be found in test/features/support/init.js.
The following gherkin expressions are available within the framework source/grpcucumber-steps.js:
GIVEN:
I set request message to (.*)
I set request message to
| name | value |
| | |
I set request metadata to (.*)
I set request metadata to
| name | value |
| | |
I pipe contents of file (.*) to request message
I store the raw value (.*) as (.*) in scenario scope
I store the raw value (.*) as (.*) in global scope
WHEN:
I request (.*)
THEN:
I store the value of response message path (.*) as (.*) in global scope
response message path (.*) should be (((?!of type).*))
response message path (.*) should not be (((?!of type).+))
response message path (.*) should be of type string
response message path (.*) should be of type number
response message path (.*) should be of type boolean
response message path (.*) should be of type array
response message path (.*) should be of type array with length (.*)
value of scenario variable (.*) should be (.*)
value of scenario variable (.*) should not be (.*)
value of global variable (.*) should be (.*)
value of global variable (.*) should not be (.*)
Variables are available to inject stored values into messages or steps.
By default, backticks are use to indicate a variable in a feature file, but can be changed during initialization (first char is open, second is close):
Before(function() {
this.grpcucumber = new grpcucumber.grpcucumber(
'localhost:8080',
PROTO_PATH,
'Greeter',
credentials,
{ variableDelimiter: '{}' }
);
});
Function | Command |
---|---|
Run mock server | yarn run mock |
Run tests (run mock first) | yarn run test |
Run lint | yarn run lint |
We welcome Your interest in Capital One’s Open Source Projects (the “Project”). Any Contributor to the Project must accept and sign an Agreement indicating agreement to the license terms below. Except for the license granted in this Agreement to Capital One and to recipients of software distributed by Capital One, You reserve all right, title, and interest in and to Your Contributions; this Agreement does not impact Your rights to use Your own Contributions for any other purpose.
This project adheres to the Open Code of Conduct. By participating, you are expected to honor this code.
FAQs
Gherkin framework for gRPC API cucumber-js testing
The npm package grpc-cucumber-js receives a total of 8 weekly downloads. As such, grpc-cucumber-js popularity was classified as not popular.
We found that grpc-cucumber-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.