Execute existing automation project using hiptest


I have a project created in Java framework implementing Cucumber. I don’t want to make any changes to my project.
How do I make it execute all tests using hiptest/hiptest-publisher?


It will be hard to make absolutely no changes in the code. But there’s basically three ways to handle your use case, sorted by number of changes needed to be done to your code (and the potential drawbacks of each solutions).

Use an external test run
For this solution, the scenarios will not be imported to Hiptest. You can simply run your Cucumber tests as you currently do and push the results back to an external test run in Hiptest (as explained here: https://docs.hiptest.net/create-a-test-run-for-your-unit-tests/)

drawbacks & possibilities:
You will not be able to modify the tests in Hiptest (as the scenarios will not be imported) but you will still be able to link tests with Jira.
All new scenarios will have to be written in Cucumber like you use to do.
For now, you will not be able to use the living documentation

Import tests to Hiptest and generate only the features file with Hiptest publisher

Import your features files (alongside your steps definition files) to a new project in Hiptest. This way you will be able to modify your scenarios in Hiptest.
When exporting using Hiptest publisher, discard the generated steps_definitions but use the existing ones.

There will be a few changes to do to your existing regexps in your steps definitions (mainly catch extra double-quotes that were not present before importing to Hiptest).
You can also customise the export of hiptest-publisher to avoid those double-quotes (we have two blog-posts dedicated to customising the exports: https://blog.hiptest.net/2017/03/02/customising-your-export-with-hiptest-publisher-part-i-understanding-handlebars/ & https://blog.hiptest.net/2017/03/02/customising-your-export-with-hiptest-publisher-part-ii-customising-the-templates/ )

drawbacks & possibilities:
You will be able to use most functionalities of Hiptest as in any project.
The main drawback is that you will not be able to make composition of action words (one action word calling other ones). This possibility is really helpful when you want to have different levels of action words.
One example coming from Hiptest test suite to describe it:

The action word “I am administrator of the organization” is an action word which is a high level action word (easy to understand, shortens the scenario).
The “sub” action words are more low-level. They can be reused more easily from actionword to actionword (and sometimes in scenarios directly if needed). Those ones are more meant for the developper to have a clear understanding of what needs to be automated.
If you use your own steps_definitions (the one you had previously), those action words will disappear.

Use the full possibilities of Hiptest publisher

The last use case starts like the previous one (importing your project to Hiptest).
The main difference is that you will export everything using hiptest-publisher. Now of course there is no more automation done in the steps_definition file as everything needs to be done in the action words class.

What you will need to do is copy/paste your existing automation code from your step definition file to the action words class (and potentially adapts some parameter name changes).

In that case, you will have the possibility to compose action words and this way have a shared understanding at high level (so devs, QA, business analyst and so on) and more low-level action words meant for the developper/automation team to have a clear definition of what needs to be automated.

I hope this answers your question,