
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
scholar-runner
Advanced tools
NPM command line module for running visual regression tests
This is the client test runner for usage with the Scholar application.
npm install scholar-runner --save-dev
scholar-runner --help
Usage: scholar-runner [options]
Options:
-h, --help Output usage information
-V, --version Output the version number
-b, --browser <option> Define test browser (defaults to "phantomjs")
-r, --runner <option> Define the runner for the tests e.g. local, remote (defaults to "local")
--compareLocally Define to run the comparison locally (defaults to false)
--seleniumVersion <version> Optionally use a specific selenium version
--verbose Define selenium log level
-s, --suite <suite> Define file to run (optional)
-t, --type <key> Define subset of tests to run (optional)
-c, --config <filePath> Define config file location (defaults to "config/scholar.js")
-d, --directory <testDirectory> Define test files directory (defaults to "process.cwd()/test/")
-o, --output <imageDirectory> Define directory to place screenshots (defaults to "process.cwd()/test_images/")
-r, --testReportDirectory <testReportDirectory> Define directory to place report html (defaults to "process.cwd()/test_images/")
--baselineDirectory <baselineDirectory> Define baseline files directory (defaults to "process.cwd()/baselines/")
The minimum configuration required is:
module.exports = {
baseUrl: 'http://the-website-you-want-to-test.com',
scholarUrl: 'http://your-scholar-instance.com'
};
Add required cookies to your config file,
module.exports = {
baseUrl: 'http://the-website-you-want-to-test.com',
scholarUrl: 'http://your-scholar-instance.com',
cookies: [{
'name': 'example',
'value': 'exampleValue',
'domain': '.example.com'
}]
};
To run your tests against a remote Selenium server (ie BrowserStack / Saucelabs) you will need to:
host (required) and port number (optional) in your config file.user variable in config to your Selenium login (optional).key variable in config to your automation key (optional).For Example:
module.exports = {
baseUrl: 'http://the-website-you-want-to-test.com',
scholarUrl: 'http://your-scholar-instance.com',
host: 'http://your-Selenium-server.com',
port: '1337',
user: process.env.USER || 'user-name',
key: process.env.SECRET_KEY || 'my-secret-key'
};
user variable as your BrowserStack user in config.key variable as your BrowserStack automation key in config.YOURENVNAME-x64.zipbrowserstack.local:true to your config file.An Example browserstack config:
{
baseUrl: 'http://the-website-you-want-to-test.com',
scholarUrl: 'http://your-scholar-instance.com',
host: 'hub.browserstack.com',
user: 'browserstack-user-name',
key: 'browserstack-automation-key',
browserstack: {
'browserstack.local' : true,
ie: {
browser: 'IE',
browser_version: '11',
os: 'Windows',
os_version: '8.1'
},
edge: {
browser: 'Edge',
browser_version: '12',
os: 'Windows',
os_version: '10'
},
safari: {
browser: 'Safari',
browser_version: '9.1',
os: 'OS X',
os_version: 'El Capitan'
},
chrome: {
browser: 'Chrome',
browser_version: '47',
os: 'Windows',
os_version: '7'
}
}
}
Within your test directory (defaults to test/) add your spec file. Ensure the ending contains '-spec.js';
let desktopSpecs = [
{
name: 'desktop-test-1',
selector: 'body',
path: '/'
},
{
name: 'alex-test',
selector: 'body',
path: '/'
}
];
let otherSpecs = [
{
name: 'other-test-1',
selector: 'body',
path: '/'
},
{
name: 'other-test-2',
selector: 'body',
path: '/'
}
];
module.exports = {
desktop: desktopSpecs,
another: otherSpecs,
all: desktopSpecs.concat(otherSpecs) // default if no --type is provided
};
There are other possible spec options such as:
function(client) { return client.waitForVisible('.n-button', 5000).click('.n-button'); }[ { name: 'first', value: 'test' }, { name: 'second', value: 'another' } ]FAQs
NPM command line module for running scholar visual regression tests
We found that scholar-runner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.