Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@saucelabs/sauce-json-reporter
Advanced tools
A library for creating test results in the Sauce Labs JSON format.
A javascript library for creating Sauce Labs JSON test results.
A JSON schema describing the report is also available.
const {TestRun, Status} = require('@saucelabs/sauce-json-reporter');
let r = new TestRun()
r.attach({name: 'screenshot.png', path:'./screenshot.png'})
const s1 = r.withSuite('somegroup')
const s2 = s1.withSuite('somefile.test.js')
s1.attach({name: 'screenshot1.png', path: './screenshot1.png'})
s2.withTest('yay', {
status: Status.Passed,
duration: 123,
attachments: [
{name: 'video.mp4', path: './video.mp4'},
{name: 'screenshot2.png', path: './screenshot2.png'}
],
})
s2.withTest('nay', {
status: Status.Failed,
output: 'test failed',
duration: 123,
attachments: [
{name: 'video.mp4', path: './video.mp4'},
]
})
s2.withTest('oops', {
status: Status.Skipped,
output: 'test skipped',
duration: 123,
})
r.metadata = {
'id': '123'
}
r.stringify() // returns a JSON string representing the entire test run
// or
r.toFile('my_json_report.json') // writes the JSON to a file instead
The resulting JSON of the above example is:
{
"status": "failed",
"attachments": [
{
"name": "screenshot.png",
"path": "./screenshot.png"
}
],
"suites": [
{
"name": "somegroup",
"status": "failed",
"metadata": {},
"suites": [
{
"name": "somefile.test.js",
"status": "failed",
"metadata": {},
"suites": [],
"attachments": [],
"tests": [
{
"name": "yay",
"status": "passed",
"duration": 123,
"startTime": "2023-06-19T18:26:06.227Z",
"attachments": [
{
"name": "video.mp4",
"path": "./video.mp4"
},
{
"name": "screenshot2.png",
"path": "./screenshot2.png"
}
],
"metadata": {}
},
{
"name": "nay",
"status": "failed",
"duration": 123,
"output": "test failed",
"startTime": "2023-06-19T18:26:06.227Z",
"attachments": [
{
"name": "video.mp4",
"path": "./video.mp4"
}
],
"metadata": {}
},
{
"name": "oops",
"status": "skipped",
"duration": 123,
"output": "test skipped",
"startTime": "2023-06-19T18:26:06.227Z",
"attachments": [],
"metadata": {}
}
]
}
],
"attachments": [
{
"name": "screenshot1.png",
"path": "./screenshot1.png"
}
],
"tests": []
}
],
"metadata": {
"id": "123"
}
}
FAQs
A library for creating test results in the Sauce Labs JSON format.
The npm package @saucelabs/sauce-json-reporter receives a total of 8,536 weekly downloads. As such, @saucelabs/sauce-json-reporter popularity was classified as popular.
We found that @saucelabs/sauce-json-reporter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 17 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.