Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
grunt-webdriver-jasmine-runner
Advanced tools
A grunt plugin that runs jasmine tests using webdriver.
This plugin requires Grunt ~0.4.0
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins.
Once you're familiar with that process, you may install this plugin with this command:
npm install git+ssh://git@github.com:RallySoftware/grunt-webdriver-jasmine-runner.git
If you do not have stored ssh credentials for github, you will need to authenticate to complete the installation.
The module can also be installed with package.json by adding a reference to the devDependencies block:
{
"name": "your-app-name",
"version": "99.99.99",
"devDependencies": {
"private-repo": "ssh://git@github.com:RallySoftware/grunt-webdriver-jasmine-runner.git"
}
}
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-webdriver-jasmine-runner');
Browser drivers will need to be installed for the browsers you plan to run tests on. If you use brew and want to run tests on Chrome, use the following command:
brew install chromedriver
The driver for firefox is included in the plugin.
In your project's Gruntfile, add a section named webdriver_jasmine_runner
to the data object passed
into grunt.initConfig()
.
grunt.initConfig
webdriver_jasmine_runner:
your_target:
options:
# your options here
seleniumJar: "#{__dirname}/lib/selenium-server-standalone-2.31.0.jar" # Only specified when starting a local selenium server
seleniumServerHost: undefined # Only specified when running tests on a remote selenium server
seleniumServerPort: 4444
seleniumServerArgs: [] # Only specified when starting a local selenium server
seleniumServerJvmArgs: [] # Only specified when starting a local selenium server
browser: 'chrome'
testServer: 'localhost'
testServerPort: 8000
testFile: '_SpecRunner.html'
allTestsTimeout: 30 * 60 * 1000 # 30 minutes
keepalive: false
String
"#{__dirname}/lib/selenium-server-standalone-2.31.0.jar"
The location of the selenium standalone server jar.
String
The hostname of a remote selenium server to use. If specified, a selenium server won't be started.
Number
4444
The port number to use for the local selenium server when running locally or the remote selenium server when using a remote server.
Array
[]
Arguments to pass to the Selenium Server java command.
Array
[]
JVM arguments to pass to the Selenium Server java command. (e.g. ['-Xmx256M'])
String
'chrome'
'chrome', 'firefox', 'internet explorer', ...
sourceThe browser in which the tests will be run. This can also be specified via the --browser command-line option (below), which takes precedence.
String
'localhost'
The address of the server where the application is running.
Number
8000
The port where the application is running.
String
'_SpecRunner.html'
The file to load that runs the jasmine tests.
Number
30 * 60 * 1000
(30 minutes)Time in milliseconds to wait for all of the tests to finish running.
The browser in which the tests will be run. Takes precedence over the "browser" gruntfile option (above).
The selenium server and browser are not closed after the tests have been run. Useful for interactive debugging of failing tests.
The selenium server added a parameter to the query string of url passed to the browser to tell Jasmine to disable verification of proper tests cleanup.
This task:
This task isn't very useful by itself. A usual use case if to configure webdriver_jasmine_runner in a grunt.initConfig() call and combine it with other tasks with grunt.registerTask().
In this example, we start a connect server running the app. The jasmine:build task also creates an appropriate _SpecRunner.html file with the specs to be run.
grunt.initConfig
webdriver_jasmine_runner:
myProject:
options: {}
grunt.registerTask 'browser:test', ['default', 'jasmine:build', 'connect', 'webdriver_jasmine_runner']
FAQs
A grunt plugin that runs jasmine tests using webdriver.
The npm package grunt-webdriver-jasmine-runner receives a total of 4 weekly downloads. As such, grunt-webdriver-jasmine-runner popularity was classified as not popular.
We found that grunt-webdriver-jasmine-runner demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.