Python

Python

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 aalyYToxMDgzMjAyMM== \
  -p 834a65e809a0ab22696e7e307d222a4887aa0078 \
  -d features \
  -m

which 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

#!/usr/bin/env python

from hindsight.behave import JiraConnector

jc = JiraConnector()
jc.fetch(
  host='https://behave.pro',
  username='aalyYToxMDgzMjAyMM==',
  password='834a65e809a0ab22696e7e307d222a4887aa0078',
  key='10100',
  dir='features',
  manual=True
)

This will download all features from project ID 10100 into the features director, including manual tagged scenarios.

  1. Prev
  2. Next