
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@diffblue/cover-client
Advanced tools
Diffblue Cover client library - Node.js API for Diffblue Cover
The Diffblue Cover client library provides a programmatic interface and CLI for communicating with the Diffblue Cover API.
Using npm:
npm install @diffblue/cover-client
To use Diffblue Cover to run an analysis and produce test files you will need to provide a JAR file of your compiled code and the path to a directory where you want test files to be written.
In Node.js (using promises):
const Analysis = require('@diffblue/cover-client').Analysis;
const fs = require('fs');
const analysis = new Analysis('https://your-cover-api-domain.com');
const buildFile = fs.createReadStream('./build.jar');
// This is a sample settings object that will not run a useful analysis.
// You can omit the settings parameter when calling `run` to start an analysis with default settings.
const settings = { phases: { firstPhase: { timeout: 10 }}};
const options = { outputTests: './tests' };
analysis.run({ build: buildFile }, settings, options)
.then((results) => {
console.log(`Analysis ended with the status: ${analysis.status}.`);
console.log(`Produced ${results.length} tests in total.`);
console.log(`Test files written to ${options.outputTests}.`);
});
In Typescript (using async/await):
import Analysis from '@diffblue/cover-client';
import { createReadStream } from 'fs';
const analysis = new Analysis('https://your-cover-api-domain.com');
const buildFile = createReadStream('./build.jar');
// This is a sample settings object that will not run a useful analysis.
// You can omit the settings parameter when calling `run` to start an analysis with default settings.
const settings = { phases: { firstPhase: { timeout: 10 }}};
const options = { outputTests: './tests' };
(async () => {
const results = await analysis.run({ build: buildFile }, settings, options);
console.log(`Analysis ended with the status: ${analysis.status}.`);
console.log(`Produced ${results.length} tests in total.`);
console.log(`Test files written to ${options.outputTests}.`);
})();
For more detailed usage, see the programmatic interface documentation.
Copyright 2019 Diffblue Limited. All Rights Reserved.
FAQs
Diffblue Cover client library - Node.js API for Diffblue Cover
We found that @diffblue/cover-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.