Behave Pro can export the created Feature and Scenarios to any gherkin compatible test automation tool. For JavaScript based projects we have a library that will export the features directly from JIRA in a script or command line client.

Installation

The Behave Pro Node client is available from NPM, and can be installed using the following:

$ npm install behavepro -g

NodeJS and NPM are both required to be installed.

Using from the command line

Parameters can either be passed from the command line:

$ behavepro [–id PROJECT ID] [–userId USER] [–apiKey KEY]

Available parameters:

  • [–host HOST] Behave Pro host (or JIRA Server instance url)
  • [–id PROJECT ID] JIRA project id
  • [–userId USER] Cloud userId OR JIRA Server Username
  • [–apiKey KEY] Cloud API key OR JIRA Server Password
  • [–output DIRECTORY] Output directory - default: 'features’
  • [–manual] Include scenarios marked as manual
  • [–config CONFIG] JSON config file - relative to current directory

If the three required parameters are missing, they will be attempted to be read from a json config file in the current directory:

$ behavepro

config.json

 example

[{
    "id": 10000,
    "userId": "Cloud userId OR JIRA Server Username",
    "apiKey": "Cloud API key OR JIRA Server Password"
}, {
    "id": 10100,
    "userId": "Cloud userId OR JIRA Server Username",
    "apiKey": "Cloud API key OR JIRA Server Password"
}]

Using from within a script

You can use the client in your own scripts to download features from Behave Pro.

$ npm install behavepro –save

var BehavePro = require('behavepro');

BehavePro({
  "id": 10000,
  "userId": "Cloud userId OR JIRA Server Username",
  "apiKey": "Cloud API key OR JIRA Server Password"
}, function() {
  // done
});

Available parameters:

  • “host”: HOST - Behave Pro host - default: 'https://behave.pro’ OR JIRA Server URL
  • “id”: ID - JIRA project id
  • “userId”: USERID - JIRA username
  • “apiKey”: APIKEY - JIRA password
  • “output”: DIRECTORY - Output directory - default: 'features’
  • “manual”: true - Include scenarios marked as manual
Did this answer your question?