zephyr-bridge
v0.1.0
Published
CLI and library helpers that bridge Zephyr Scale test export and Cucumber report publishing workflows.
Downloads
175
Maintainers
Readme
zephyr-bridge
Reusable Node.js package for:
- fetching Zephyr Scale BDD test scripts and writing
.featurefiles - publishing Cucumber JSON execution reports to Zephyr Scale
Install
npm install zephyr-bridgeCLI usage
You can use the single zephyr-bridge command with subcommands, or call the direct binaries.
Unified CLI
zephyr-bridge fetch-tests <baseUrl> <projectKey> <accessToken> [outputDir]
zephyr-bridge publish-report <baseUrl> <projectKey> <accessToken> [htmlReportUrl] [reportDir]Examples:
zephyr-bridge fetch-tests https://api.zephyrscale.smartbear.com/v2 WMS <token> ./src/test/java/zephyr_features
zephyr-bridge publish-report https://api.zephyrscale.smartbear.com/v2 WMS <token> https://example/reports/latest ./target/reportsDirect CLI commands
Fetch tests
zephyr-fetch-tests <baseUrl> <projectKey> <accessToken> [outputDir]Example:
zephyr-fetch-tests https://api.zephyrscale.smartbear.com/v2 WMS <token> ./src/test/java/zephyr_featuresPublish report
zephyr-publish-report <baseUrl> <projectKey> <accessToken> [htmlReportUrl] [reportDir]Example:
zephyr-publish-report https://api.zephyrscale.smartbear.com/v2 WMS <token> https://example/reports/latest ./target/reportsLibrary usage
const { exportBddTestCases, uploadCucumberResults } = require('zephyr-bridge');
await exportBddTestCases({
baseUrl: 'https://api.zephyrscale.smartbear.com/v2',
projectKey: 'WMS',
accessToken: process.env.ZEPHYR_TOKEN,
outputDir: './src/test/java/zephyr_features'
});
await uploadCucumberResults({
baseUrl: 'https://api.zephyrscale.smartbear.com/v2',
projectKey: 'WMS',
accessToken: process.env.ZEPHYR_TOKEN,
htmlReportUrl: 'https://example/reports/latest',
reportDir: './target/reports'
});Publish to npm
- Review
package.jsonand bumpversionwhen needed. - Verify the published contents:
npm run pack:check- Login with npm:
npm login- Run tests:
npm test- Publish:
npm publish --access publicIf you later switch to a scoped package (for example @your-org/zephyr-bridge), keep --access public.
