Behave Pro can export the created Feature and Scenarios to any gherkin compatible test automation tool. For Pyhton based projects we have a library that will export the features directly from Jira from any python script.
We host our Python client PyPi, and it is available through pip or by direct download. Assuming you have Python and pip installed on your system, run:
$ pip install hindsight
You will have installed the behave python client and all its dependencies. Depending on your system, you may have to prefix the command with “sudo”.
Using from the command line
Installing the package will have placed a binary on your path named “behave-cli”. The output of “behave-cli –help” is as follows:
$ behave-cli HOST KEY [-u USERNAME] [-p PASSWORD] [-d DIR] [-m]
An example usage would be:
$ behave-cli https://behave.pro 10100 \
-u "Cloud userId OR Jira Server Username" \
-p "Cloud API key OR Jira Server Password" \
-d features \
Note: For Behave Pro Cloud the above host should be used, but for Jira Server, enter your full Jira instance URL. This article has more information on finding these configuration items
This example uses your API key user name and value to download features from project ID 10100 into the features directory, including all manual scenarios.
Using from within a script
You can use the Jira connector within your own scripts to download features from Behave
from hindsight.behave import JiraConnector
jc = JiraConnector()
username='Cloud userId OR Jira Server Username',
password='Cloud API key OR Jira Server Password',
The task has four required parameters,
password . These 4 parameters are different depending on if you are using Jira Cloud or Server. You can retrieve the correct details the Jira project's admin area; 'Project Settings' > 'Behave Pro' > 'Generate config'. This article has more information on finding these configuration items