Hiptest Publisher

Build Status Gem version Code climate Coverage Dependencies

Installing

You need to have Ruby installed on your machine. You can then install it using gem:

gem install hiptest-publisher

Exporting a project

Go to one of your Hiptest projects and select the Settings tab. This tab is available only for projects you own. From there, copy the secret token and run this command line:

hiptest-publisher --token=<YOUR TOKEN>

This will create a Ruby tests suite. For the moment, we support the following languages and frameworks:

  • Ruby (rspec / minitest)
  • Python (unittest)
  • Java (JUnit)

You can specify the output language and framework in the command line, for example:

hiptest-publisher --token=<YOUR TOKEN> --language=ruby --framework=minitest

For more information on the available options, use the following command:

hiptest-publisher --help

You could obtain for example:

Specific options:
    -t, --token=TOKEN                Secret token (available in your project settings)
    -l, --language=LANG              Target language (default: ruby)
    -f, --framework=FRAMEWORK        Test framework to use
    -o, --output-directory=PATH      Output directory (default: .)
    -c, --config-file=PATH           Configuration file (default: config)
        --scenario-ids=IDS           Filter scenarios by ids
        --scenario-tags=TAGS         Filter scenarios by tags
        --tests-only                 Export only the tests (default: false)
        --actionwords-only           Export only the actionwords (default: false)
        --split-scenarios            Export each scenario in a single file (default: false)
        --leafless-export            Use only last level action word (default: false)
    -s, --site=SITE                  Site to fetch from (default: https://hiptest.net)
    -v, --verbose                    Run verbosely (default: false)
    -H, --languages-help             Show languages and framework options
    -F, --filters-help               Show help about scenario filtering
    -h, --help                       Show this message

Configuration

You have the possibility to store some configuration in a file named 'config'. Copy the file config.sample provided here and update the values with the values you use.

If you have multiple projects, you can have multiple config files and select one using the --config-file option:

# Use the default config file
hiptest-publisher
# Use the one to export as minitest
hiptest-publisher --config-file=config_minitest

For example, for java you can use this config file content:

token = '<YOUR TOKEN>'
language = 'java'
output_directory = '<YOUR OUTPUT DIRECTORY>'
package = 'com.youcompagny'

Adding support for other languages and framework

See the CONTRIBUTING help page for more information.