Pushing results based on names

Note: this documents a beta feature and should only be a workaround. We strongly advise to use hiptest-publisher for automating the tests, as it avoids to have automated tests not reflecting the scenarios written in Hiptest.

When you already have automated test suite that matches your scenarios in Hiptest, you may want to link the results of those tests with the scenarios.

The first step is to make sure that Hiptest will be able to match the name of your automated tests with the scenario names. Basically, Hiptest will only consider the alphanumerical characters to do the matching. That means that a scenario named “I can login using LDAP” would be working with the following automated tests:

  • i_can_login_on_ldap
  • ICanLoginOnLDAP
  • iCanLoginOnLdap

Once the tests have been run, the results need to be pushed to Hiptest. This can be done using cUrl. The command to push the result is:

curl -X POST -F file=@<path to your result file> https://hiptest.net/import_test_results/<project token>/<test run id>/<format>?use_names=1

The needed parameters are:

  • project token: this can be found in the project settings tab, under the “Publication settings” section
  • test run id: this is available in the browser URL, just after the “test-runs” section. For example, when the URL is “https://hiptest.net/app/projects/1512/test-runs/11084/folder-snapshots/…&#8221;, the test run id is 11084
  • format: this is the format used in your test report. The following formats can be used:
    • junit: it is also known as the xUnit format. This is a widely spread format that is used by many languages and frameworks
    • nunit: it is the format used by C#/Nunit and Specflow
    • tap: Test Anything Protocol
    • robot: the XML produced by Robot Framework

After the command as been ran, you should get a notification inside Hiptest telling that some test results have been imported, the pie-chart should reflect the new tests statuses a few seconds later.