Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@wdio/local-runner
Advanced tools
@wdio/local-runner is a part of the WebdriverIO test automation framework. It allows you to run WebdriverIO tests locally on your machine. This package is particularly useful for running end-to-end tests in a local environment, providing a streamlined way to execute and manage test suites.
Running Tests Locally
This feature allows you to run WebdriverIO tests locally. The code sample demonstrates how to set up a local WebdriverIO session, navigate to a URL, retrieve the page title, and then close the session.
const { remote } = require('webdriverio');
(async () => {
const browser = await remote({
capabilities: { browserName: 'chrome' }
});
await browser.url('https://webdriver.io');
const title = await browser.getTitle();
console.log('Title was: ' + title);
await browser.deleteSession();
})();
Parallel Test Execution
This feature allows you to run multiple test instances in parallel, which can significantly speed up the test execution time. The code sample shows a configuration file where the `maxInstances` property is set to 5, allowing up to 5 parallel test executions.
exports.config = {
runner: 'local',
specs: [
'./test/specs/**/*.js'
],
maxInstances: 5,
capabilities: [{
maxInstances: 5,
browserName: 'chrome'
}],
...
};
Custom Services
This feature allows you to integrate custom services like Selenium Standalone, Appium, etc., into your test runner. The code sample shows how to add the `selenium-standalone` service to the WebdriverIO configuration.
exports.config = {
runner: 'local',
services: ['selenium-standalone'],
...
};
Selenium WebDriver is a popular tool for automating web applications for testing purposes. It provides a more low-level API compared to WebdriverIO, which can be both an advantage and a disadvantage depending on the use case. Selenium WebDriver requires more boilerplate code to set up and run tests.
Cypress is a modern end-to-end testing framework that is known for its developer-friendly features and fast test execution. Unlike WebdriverIO, Cypress runs in the same run-loop as the application being tested, which can lead to more reliable tests. However, it currently only supports testing in Chrome-family browsers.
Nightwatch.js is an integrated, easy-to-use end-to-end testing solution for web applications and websites, written in Node.js. It uses the W3C WebDriver API to perform commands and assertions on DOM elements. Nightwatch provides a simpler syntax compared to WebdriverIO but may lack some advanced features.
A WebdriverIO runner to run tests locally
FAQs
A WebdriverIO runner to run tests locally
The npm package @wdio/local-runner receives a total of 408,263 weekly downloads. As such, @wdio/local-runner popularity was classified as popular.
We found that @wdio/local-runner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.