
Security News
Scaling Socket from Zero to 10,000+ Organizations
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.
E2E testing for your node.js web app, using Selenium, ChromeDriver, Mocha, SauceLabs, ...
banoffee is a test framework that allows you to test your site's behaviour on
different browsers. banoffee uses WebDriver to allow you to programmatically
control the browser in your tests.
banoffee heavily relies on wd,
Mocha,
selenium-server-standalone,
chromedriver and
Sauce-Connect.
nodejavaNot tested on Windows at all :-(
npm install -g banoffee
banoffee.conf.js)Before you start running your tests you will need a configuration file
where you can tell banoffee where to find the files with your tests, what
Selenium server to connect to, what browsers to test on and so on.
Create a file called banoffee.conf.js in your project's root. In this example
we only specify the directory where banoffee should look for tests, so
everything else will use a default value:
module.exports = {
testDir: 'test'
};
An example banoffee.conf.js file using SauceLabs Sauce Connect:
module.exports = {
testDir: 'test',
remote: {
hostname: 'ondemand.saucelabs.com',
port: 80,
user: '<YOUR-SAUCELABS-USERNAME>',
pwd: '<YOUR-SAUCELABS-PASSWORD>'
},
platforms: [
{
browserName: 'chrome',
version: '32',
platform: 'Linux',
tags: [ 'example' ],
name: 'myapp e2e'
},
{
browserName: 'firefox',
version: '27',
platform: 'Linux',
tags: [ 'example' ],
name: 'myapp e2e'
}
]
};
testDirtestFilePatternremoteplatformsLets say you put your tests in a test/ directory inside your project. An
example file test/index.spec.js could look something like this:
describe('homepage', function () {
var url = 'http://localhost:3000/';
beforeEach(function () {
return browser.get(url);
});
it('should retrieve the page title', function () {
return browser.title().should.become('The page title!');
});
});
Ok, so now you have a test and a config file, so lets get cracking!
You can run your tests from the command line. Assuming you are in the root
directory of your project and that your banoffee.conf.js is in the current
directory, you can simply run:
$ banoffee
Without any arguments, banoffee looks for a banoffee.conf.js file in the
current working directory.
We can also specify the config file to use as an argument, so if we wanted to have separate configs for develepment and continuous integration for example, you could have two config files and run:
$ banoffee --conf banoffee.dev.js
and
$ banoffee --conf banoffee.continuous.js
banoffee programmaticallyvar banoffee = require('banoffee');
banoffee({ testDir: 'test' }, function (err, failures) {
// ...
});
FAQs
E2E testing for your node.js web app, using Selenium, ChromeDriver, Mocha, SauceLabs, ...
The npm package banoffee receives a total of 0 weekly downloads. As such, banoffee popularity was classified as not popular.
We found that banoffee 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
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.

Research
Socket Threat Research maps a rare inside look at OtterCookie’s npm-Vercel-GitHub chain, adding 197 malicious packages and evidence of North Korean operators.

Research
Socket researchers identified a malicious Chrome extension that manipulates Raydium swaps to inject an undisclosed SOL transfer, quietly routing fees to an attacker wallet.