{"name":"grunt-casper","description":"Run Casper CLI Scripts With Grunt","version":"0.3.3","author":{"name":"Chris Miller","email":"cmille142@gmail.com","url":"http://chris-miller.me"},"repository":{"type":"git","url":"git@github.com:iamchrismiller/grunt-casper.git"},"bugs":{"url":"https://github.com/iamchrismiller/grunt-casper/issues/"},"licenses":[{"type":"MIT","url":"https://github.com/iamchrismiller/grunt-casper/blob/master/LICENSE-MIT"}],"scripts":{"test":"grunt test --verbose"},"keywords":["gruntplugin","gruntjs","casperjs","grunt-casperjs","grunt-casper"],"devDependencies":{"grunt-contrib-jshint":"~0.8.0","grunt-contrib-clean":"~0.5.0","grunt-contrib-nodeunit":"~0.2.2","grunt":"~0.4.2","grunt-cli":"~0.1.13"},"dependencies":{"duration":"~0.1.4","lodash":"~2.4.1","phantomjs":"~1.9.7-1","casperjs":"~1.1.0-beta3"},"homepage":"https://github.com/iamchrismiller/grunt-casper","_id":"grunt-casper@0.3.3","dist":{"shasum":"b2292f59745800811cf18c0a9d1d8f5feebaf176","tarball":"http://registry-npm.ywwl.com/grunt-casper/download/grunt-casper-0.3.3.tgz","integrity":"sha512-16qJkDrLS8XQm/9PivC7ZWoHUlE0G+H+pAP2uX25OKo4Jhu+bKlLB5SAwk2IkWr918mnDu1ux50H1bd4ezcFSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDDqJj4HTZHaGlDLpEbV308hMcsllOfxBdBQ60Sv7IPWAiAIREwF8Hczy9rgMiHSpuxKTIGb9uNhd+afR4MuIA3/wg=="}],"size":9569,"noattachment":false,"key":"/grunt-casper/-/grunt-casper-0.3.3.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"cmille142","email":"cmille142@gmail.com"},"maintainers":[{"name":"cmille142","email":"cmille142@gmail.com"}],"directories":{},"readme":"# grunt-casper [![Build Status](https://secure.travis-ci.org/iamchrismiller/grunt-casper.svg?branch=master)](http://travis-ci.org/iamchrismiller/grunt-casper)  [![Dependency Status](https://david-dm.org/iamchrismiller/grunt-casper.svg)](https://david-dm.org/iamchrismiller/grunt-casper.png) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/iamchrismiller/grunt-casper/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n\n> Run CasperJS Scripts/Functional Tests\n\nIf You need Casper 1.0 Support - Please Check out this [tag](https://github.com/iamchrismiller/grunt-casper/tree/1.0)\n*@note : You no longer need PhantomJS/CasperJS binaries installed. They are now managed by npm*\n\n## Installation\n\nThis task makes use of PhantomJS to drive the casperJS scripts in a headless manner.\n\nYou will need to install [phantomjs](http://phantomjs.org/), with a fairly simple package [install](http://phantomjs.org/download.html)\nAfter [phantomjs](http://phantomjs.org/) is installed, you will need to install [casperjs](http://casperjs.org/installation.html)\n\nNow install the grunt task\n\n```shell\nnpm install grunt-casper --save\n```\n\n## Getting Started\n\nCasperJS is a navigation scripting & testing utility for PhantomJS. It eases the process of defining a full navigation scenario and provides useful high-level functions, methods & syntaxic sugar for doing common tasks in a headless browser.\n\nIf you haven't used [casperjs](http://casperjs.org/) before, be sure to check out the [Get Started](http://casperjs.org/quickstart.html) guide, as it explains how to create your first test case.\n\n\n## casper task\n_Run this task with the `grunt casper` command._\n\n_This task is a [multi task](https://github.com/gruntjs/grunt/wiki/Configuring-tasks) so any targets, files and options should be specified according to the [multi task][] documentation._\n\n### Options\n\n#### Grunt 'dest'\nType: `String` || `Function`\n\nThe 'dest' option in Grunt's configuration is passed as the --save option to casper, allowing you to access\n   your destination programmatically. If passed as a function, the return value will be used.\n\n#### test\nType: `Boolean`\nDefault: false\n\nRun the casperjs script(s) in test mode. Thus allowing you to split up your tests (casperjs test tests/)\n\n#### includes\nType: `String`\nDefault: undefined\n\nComma separated list of scripts to \"include\" before executing tests.\n\n#### pre\nType: `String`\nDefault: undefined\n\nScripts to be executed before the test suite\n\n#### post\nType: `String`\nDefault: undefined\n\nScripts to be executed after the test suite\n\n#### verbose\nType: `Boolean`\nDefault: false\n\nOutput log messages directly to the console\n\n#### log-level\nType: `String`\nDefault: `error`\nOptions: `debug` `info` `warning` `error`\n\nSets the casperjs logging level\n\n#### fail-fast\nType: `Boolean`\nDefault: false\n\nTerminate as soon as a first failure is encountered.\n\n#### concise\nType: `Boolean`\nDefault: false\n\nCreate a more concise output of the test suite.\n\n\n#### engine\nType: `String`\nDefault: phantomjs\n\nSpecify Browser Engine (phantomjs|slimerjs)\n\n#### concurrency\nType: `Number`\nDefault: How many test files to run concurrently (1-10)\n\n#### parallel\nType: `Boolean`\nDefault: Run tests in Parallel instead of Series\n\n### Usage Examples\n\nBasic usage\n```js\ncasper : {\n yourTask : {\n    options : {\n      test : true\n    },\n    files : {\n      'xunit/casper-results.xml' : ['test/functionalTests.js']\n    }\n  }\n}\n```\n\nBasic Parallel usage\n```js\ncasper : {\n yourTask : {\n    options : {\n      test : true,\n      parallel : true,\n      concurrency : 5\n    },\n    files : {\n      'xunit/casper-results.xml' : ['test/functionalTests.js'],\n      'xunit/casper-results-2.xml' : ['test/functionalTests2.js'],\n    }\n  }\n}\n```\n\nGlobal options and custom destination\n\n```js\ncasper : {\n  options : {\n    test : true,\n    includes : 'path/to/inc.js',\n    post : 'path/to/post.js',\n    pre : 'path/to/pre.js',\n    'log-level' : 'warning',\n    'fail-fast' : true,\n    concise : true,\n    engine : 'slimerjs'\n  },\n  yourTask : {\n    src: ['path/to/tests/*_test.js'],\n    dest : function(input) {\n      return input.replace(/\\.js$/,'.xml');\n    }\n  }\n}\n```\n\n### Options and Arguments\nCasperJS supports options and arguments on the [command line](http://docs.casperjs.org/en/latest/cli.html).\n\n`casperjs script.js baz --foo=bar`\n\nGrunt tasks can accept additional arguments and grunt-casper will pass these through to CasperJS, for instance\n\n`grunt casper:yourTask:baz:--foo=bar`\n\nwill pass `baz` as an argument and `foo` as an option with a value of `bar`.  These are then available in your CasperJS script \n\n```js\ncasper.cli.args.indexOf('baz'); // 0\ncasper.cli.options.foo; //bar\n```\n\nArguments can also be specified in the Task Options Object\n\n```js\n  casper : {\n    options : {\n      args : ['foo', 'bar']\n    }\n  }\n```\n\nArguments and options will be ignored in `test` mode as CasperJS does not support them.\n\n## PhantomJS / CasperJS Binaries\n\nYou may also override the location of the PhantomJS and CasperJS binaries like so:\n\nprocess.env.PHANTOMJS_EXECUTABLE = '/path/to/phantomjs';\nprocess.env.CASPERJS_EXECUTABLE = '/path/to/casperjs';\n\nThe CasperJS Binary, by default, is loaded from the local ./node_modules directory and has a fallback to look in the\nglobal node_modules directory (/usr/local/lib/node_modules)\n\n\n\n## Release History\n\n * 2015-02-11   v0.4.2   Reverse Source List before unshift\n * 2014-08-19   v0.4.1   Expose Slimerjs binary export\n * 2014-08-19   v0.4.0   Refactored Fail cases\n * 2014-07-16   v0.3.10  Added local binary module path\n * 2014-06-09   v0.3.9   Refactored exports and binary module loading\n * 2014-05-12   v0.3.8   Removed test arguments constraint\n * 2014-04-24   v0.3.7   Merge pull request #39 add no-colors option\n * 2014-04-21   v0.3.6   Fixed issue with testableOptions\n * 2014-03-20   v0.3.5   Fixed issue with engine indexOf conditional\n * 2014-03-12   v0.3.4   Merge pull request #36 check PhantomJS path\n * 2014-03-06   v0.3.3   Cleaned up Cross Platform Binary Location\n * 2014-03-05   v0.3.2   Fixed CasperJS Binary for windows platform\n * 2014-03-03   v0.3.1   Export CasperJS binary to node_module/.bin\n * 2014-02-23   v0.3.0   CasperJS npm managed binary\n * 2014-02-23   v0.2.7   PhantomJS install via wrapper\n * 2014-02-22   v0.2.6   Parallel exit logic\n * 2014-02-22   v0.2.5   Changed deprecated 1.1 direct flag to verbose\n * 2014-02-22   v0.2.4   Fixed test option position in array\n * 2014-02-17   v0.2.3   Added engine support (phantomjs, slimerjs)\n * 2014-02-11   v0.2.2   Added args option for casper args, added concise option support\n * 2014-01-24   v0.2.1   Refactored exit logic\n * 2014-01-14   v0.2.0   Refactored non-parallel Runs, fixing --fail-fast parameter   \n * 2013-11-22            Refactored task dependencies, added parallel option and task duration\n * 2013-10-08   v0.1.4   Merged pull request - cwd spawn option\n * 2013-09-05   v0.1.3   Fixed logging from grunt.verbose -> grunt.log\n * 2013-08-10   v0.1.2   Added xunit support\n * 2013-02-01   v0.1.1   Update Task To Run With grunt0.4.0rc7\n * 2013-01-01   v0.1.0   Initial Release\n\n---\n\nTask submitted by [Chris Miller](http://chris-miller.me)\n","publish_time":1394132885818,"_cnpm_publish_time":1394132885818,"dist-tags":{"latest":"0.4.2"}}