<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>cukelib Module: childService</title> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css"> <link type="text/css" rel="stylesheet" href="styles/site.cerulean.css"> </head> <body> <div class="navbar navbar-default navbar-fixed-top navbar-inverse"> <div class="container"> <div class="navbar-header"> <a class="navbar-brand" href="index.html">cukelib</a> <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="navbar-collapse collapse" id="topNavigation"> <ul class="nav navbar-nav"> <li class="dropdown"> <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a> <ul class="dropdown-menu "> <li><a href="module-childService.html">childService</a></li><li><a href="module-requestSupport.html">requestSupport</a></li><li><a href="module-serviceControl.html">serviceControl</a></li><li><a href="module-shellSupport.html">shellSupport</a></li><li><a href="module-utilities.html">utilities</a></li> </ul> </li> </ul> <div class="col-sm-3 col-md-3"> <form class="navbar-form" role="search"> <div class="input-group"> <input type="text" class="form-control" placeholder="Search" name="q" id="search-input"> <div class="input-group-btn"> <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button> </div> </div> </form> </div> </div> </div> </div> <div class="container" id="toc-content"> <div class="row"> <div class="col-md-8"> <div id="main"> <h1 class="page-title">Module: childService</h1> <section> <header> </header> <article> <div class="container-overview"> <dl class="details"> <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt> <dd class="tag-source"> <ul class="dummy"> <li> <a href="child_service_index.js.html">child_service/index.js</a>, <a href="child_service_index.js.html#sunlight-1-line-2">line 2</a> </li> </ul> </dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <dl> <hr> <dt> <h4 class="name" id=".getService"><span class="type-signature"><static> </span>getService(name)</h4> </dt> <dd> <div class="description"> <p>getService - Given a childService name returns the childService object.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt> <dd class="tag-source"> <ul class="dummy"> <li> <a href="child_service_index.js.html">child_service/index.js</a>, <a href="child_service_index.js.html#sunlight-1-line-60">line 60</a> </li> </ul> </dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>childService</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Object</span> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id=".initialize"><span class="type-signature"><static> </span>initialize()</h4> </dt> <dd> <div class="description"> <p>initialize - Initializes the childService using the serviceControl module</p> <p>Typically called at the top of cucumber support file that uses the childService using the<br>cucumber context that contains <code>Before</code>, <code>After</code>, <code>Given</code>, etc.<br>Usage:</p> <ul> <li><code>childService.initialize.call(this);</code></li> </ul> </div> <dl class="details"> <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt> <dd class="tag-source"> <ul class="dummy"> <li> <a href="child_service_index.js.html">child_service/index.js</a>, <a href="child_service_index.js.html#sunlight-1-line-49">line 49</a> </li> </ul> </dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">undefined</span> </dd> </dl> </dd> <hr> <dt> <h4 class="name" id=".spawn"><span class="type-signature"><static> </span>spawn( [spawnArgs])</h4> </dt> <dd> <div class="description"> <p>spawn - Launches a Node child process from a shell command via</p> <p><a href="https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options"><code>require('child_process').spawn(...)</code></a></p> <p>The <code>spawnArgs</code> parameter allows these options:</p> <ul> <li><code>name: string</code> The name of the cukelib service (required).</li> <li><code>cmd: string</code> Spawn command argument (required).</li> <li><code>args: [string]</code> Spawn args argument</li> <li><code>options: Object</code> <a href="https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options">childProcess.spawn options argument (env, cwd, etc.)</a></li> <li><code>isReadyMatch: string|RegExp</code> default: <code>/./</code> Pattern that is matched from stdout or stderr to indicate the child process is ready.</li> <li><code>isReady: (proc: childProcess) => Promise</code> the promise is resolved when the child process is ready. The default is to resolve when data from stdout or stderr matches the <code>isReadyMatch</code> pattern.</li> <li><code>stderrHandler: Function(data: string)</code> default is to print via <code>console.error(chalk.magenta(...))</code></li> <li><code>stdoutHandler: Function(data: string)</code> default is to print via <code>console.log(chalk.magenta(...))</code>. Assign the function <code>(data) => null</code> for a "quiet" output.</li> <li><code>errorHandler: Function(err: Error)</code> default is to print the err via <code>console.error(chalk.magenta(...))</code></li> </ul> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Argument</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>spawnArgs</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> {} </td> <td class="description last"><p>see above</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt> <dd class="tag-source"> <ul class="dummy"> <li> <a href="child_service_index.js.html">child_service/index.js</a>, <a href="child_service_index.js.html#sunlight-1-line-155">line 155</a> </li> </ul> </dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>launchService promise</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> </dd> </dl> </article> </section> </div> </div> <div class="clearfix"></div> <div class="col-md-3"> <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div> </div> </div> </div> <div class="modal fade" id="searchResults"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">Search results</h4> </div> <div class="modal-body"></div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div> <footer> <span class="jsdoc-message"> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Mon Feb 20th 2017 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>. </span> </footer> <script src="scripts/docstrap.lib.js"></script> <script src="scripts/toc.js"></script> <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script> <script> $( function () { $( "[id*='$']" ).each( function () { var $this = $( this ); $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) ); } ); $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () { var $this = $( this ); var example = $this.find( "code" ); exampleText = example.html(); var lang = /{@lang (.*?)}/.exec( exampleText ); if ( lang && lang[1] ) { exampleText = exampleText.replace( lang[0], "" ); example.html( exampleText ); lang = lang[1]; } else { var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/); lang = langClassMatch ? langClassMatch[1] : "javascript"; } if ( lang ) { $this .addClass( "sunlight-highlight-" + lang ) .addClass( "linenums" ) .html( example.html() ); } } ); Sunlight.highlightAll( { lineNumbers : true, showMenu : true, enableDoclinks : true } ); $.catchAnchorLinks( { navbarOffset: 10 } ); $( "#toc" ).toc( { anchorName : function ( i, heading, prefix ) { return $( heading ).attr( "id" ) || ( prefix + i ); }, selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4", showAndHide : false, smoothScrolling: true } ); $( "#main span[id^='toc']" ).addClass( "toc-shim" ); $( '.dropdown-toggle' ).dropdown(); $( "table" ).each( function () { var $this = $( this ); $this.addClass('table'); } ); } ); </script> <!--Navigation and Symbol Display--> <!--Google Analytics--> <script type="text/javascript"> $(document).ready(function() { SearcherDisplay.init(); }); </script> </body> </html>