Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
grunt-phantomflow
Advanced tools
Unmaintained notice: As of December 22nd 2017 this project will no longer be maintained. What started out as a creative experiment four years ago became a significant tool in Huddle's Web development workflow, as well as the workflows of external Web engineers. But like PhantomCSS, its time to move on.
A grunt plugin for PhantomFlow
This plugin requires Grunt ~0.4.2
If you are unfamilar with Grunt check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins.
npm install grunt-phantomflow --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-phantomflow');
grunt.config.set('phantomflow', {
app: {
/*
How many threads would you like to parallelise on?
Default value is 4
*/
threads: 4,
/*
Any command line options to be passed down to casper?
Example: ['--cookies-file=testcookies.txt']
Default value is []
*/
casperArgs: [],
/*
Should a report/visualisation be generated after
the test run? Default value is false
*/
createReport: false,
/*
Should the report output live somewhere else, e.g. for
proxying through a real webserver?
Example: '../visualtest/htdocs'
Default value is undefined.
If unset, the default set by PhantomFlow will be used.
*/
reports: null,
/*
Do you have scripts to include?
Default value is ./include
*/
includes: './include',
/*
Where do the tests live?
Default value is ./test
*/
tests: './test',
/*
Where should the results go?
Default value is ./test-results
*/
results: './test-results',
/*
Hide elements in the page
*/
hideElements: ['img', 'input']
}
});
If you're working on a test you can use the test
parameter to run a specific test file. The value can be a substring of the file name. Please note that test filenames should follow the *.test.js naming convention.
grunt phantomflow:websitetests --test=mytestfile
To show the PhantomFlow visualisation use the 'report' param. You need to have previously generated a report by setting the createReport option to true. Tests will not be executed when the 'report' param is used. The previously generated visualisation will open in your browser.
grunt phantomflow:websitetests --report
By default phantomflow will divide and execute groups of tests concurrantly on different threads. By default this is 4 threads
Use the thread parameter to increase the amount of threads and reduce the feedback time.
grunt phantomflow:websitetests --threads=8
Show more logging: grunt phantomflow:websitetests --debug=1
Save screenshots and show more logging: grunt phantomflow:websitetests --debug=2
By default phantomflow will not abort when a test fails, set the earlyexit
parameter to true stop the tests upon seeing the first failure.
grunt phantomflow:websitetests --earlyexit=true
PhantomJS supports remote debugging. The following grunt options allow you to start phantom with the correct options.
grunt.config.set('phantomflow', {
app: {
remoteDebug: true, // default false
remoteDebugAutoStart: false, // default false,
remoteDebugPort: 9000 // default 9000
}
});
In your project's Gruntfile, use either grunt.initConfig( {} )
or grunt.config.set( 'phantomflow', {} )
.
var phantomflowConfig = {
test: {
tests: '/mytests'
},
report: {} // this task is reserved for reporting only
};
grunt.initConfig({
decision: phantomflowConfig
};
FAQs
UI Web testing with decision trees and PhantomCSS
We found that grunt-phantomflow demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.