Bind TestComplete Project to HipTest Project

Applies to TestComplete 14.10, last modified on June 5, 2019

You can import HipTest scenarios to your test project when you are creating this project in TestComplete (see Import HipTest Scenarios). If you want to import them into an existing TestComplete project, you should bind this project to HipTest.

Requirements

  • You will need an active HipTest account. If you don’t have one, you can create a free account directly from the TestComplete UI.

  • You should not have BDD scenarios in your TestComplete project. After you bind your project to HipTest, TestComplete will automatically update the feature files in your test project with the feature files from HipTest. If some feature file doesn’t exist in HipTest, it will be removed, and the existing files will be overwritten. In other words, the changes you made to the feature files in TestComplete might be lost. To avoid this, TestComplete doesn’t support binding test projects containing BDD files to HipTest.

    If you have scenarios in your project, then –

    • Exclude the existing feature files from your project temporarily and include them later. See the instructions below in order not to miss important steps.

      Instructions

      – or –

    • Move feature files to another TestComplete project.

      – or –

    • Place them to the HipTest project you are going to bind to. Then, remove the scenarios from your TestComplete project and try binding it to the HipTest project.

  • Your TestComplete project should use any scripting language except for DelphiScript. DelphiScript does not support BDD.

Binding

  1. Open your project in TestComplete.

  2. In the Project Explorer panel, right-click the project node and select Bind to HipTest from the context menu (this item is available if your project is not linked to a HipTest project):

    Bind to HipTest item in the context menu
  3. If you have never connected from TestComplete to HipTest on your computer, TestComplete will ask you to specify your login credentials for HipTest:

    HipTest Account dialog box

    If you log in to HipTest with your GitHub or Google account, you will need to get API credentials in HipTest and then specify them in TestComplete.

    Tip: We recommend that you select the Remember login credentials check box, so TestComplete will save this data and will not ask you again every time it needs to connect to HipTest. For information on where it stores the login data and how to change it, see Update Login Credentials.

    What if I have no HipTest account?

  4. After you specify the HipTest account, TestComplete will connect to HipTest and will display the dialog box, where you can select a HipTest project for binding:

    Select a HipTest project dialog

    Select a project that contains your BDD scenarios and click OK.

    HipTest supports both BDD and non-BDD projects. You need to select a BDD project.

What happens then

  • TestComplete will retrieve feature files with scenarios from HipTest and import these feature files into your project. After the import is over, you will see these files in the Project Explorer under the Scenarios node (if your project doesn’t have this node, TestComplete will create it):

    Imported HipTest scenarios in the Project Explorer

    TestComplete imports features and scenarios along with their tags.

    If your scenarios are organized in folders in HipTest, TestComplete will organize the imported feature files into folders, as well.

  • TestComplete will also create script functions for test steps of BDD scenarios in the imported feature files. This will make further automation faster and easier.

  • Binding means that TestComplete will synchronize feature files and test results with the HipTest project you specified:

    • By default, TestComplete will update imported scenarios from the linked HipTest project automatically when you open your test project in TestComplete, or before you run BDD scenarios in TestComplete.

      TestComplete will also upload the changes you made to BDD scenarios and feature files in TestComplete to HipTest. See Synchronize Scenarios for complete information.

    • Also, TestComplete will post test results to the HipTest project when you run BDD scenarios from TestComplete. See Upload Results.

Further steps

  • After you imported BDD scenarios, you need to create script code that will run when you launch these scenarios. You do this by writing script statements into the function definitions that TestComplete generated during the import. You can write the code manually or record it, if possible.

  • You can then run BDD scenarios from TestComplete. When you do this for BDD scenarios bound to a HipTest project, then, by default, the test engine posts the test run results to HipTest, so, you can view automated run results along with other results in HipTest. You can disable this functionality, if needed. See Upload Results.

Notes

  • Difference in file structure

    HipTest organizes test scenarios into folders and subfolders. At the beginning, scenarios are in the folder that has the project name. You can then add subfolders to this folder to store child scenarios:

    Folders in a HipTest project

    Click the image to enlarge it.

    In fact, a folder in HipTest is a feature file that can have child feature files (subfolders).

    To emulate this structure in TestComplete, the latter creates a feature file and, optionally, a folder for each “HipTest” folder. These file and folder have the same name:

    Mapping HipTest folders to folders and feature files in TestComplete

    Click the image to enlarge it.

    The feature file in TestComplete contains BDD scenarios that are direct children of a folder in HipTest, and the “TestComplete” folder contains child “HipTest” subfolders.

    Keep this in mind when synchronizing TestComplete and HipTest projects.

  • Scenarios node in bound projects

    In bound projects, the TestComplete Scenarios node can have only one or two of the following items as direct children:

    • A feature file that stores test scenarios corresponding to the test scenarios in the root HipTest folder,

    • A folder that stores scenarios at child levels.

    If you have both the file and the folder, their names must coincide. See also the note on difference in file structure above.

    In other words, you cannot make your feature files child items of the Scenarios item. Add them to subfolders below Scenarios.

  • Imported features cannot be renamed in TestComplete

    You cannot rename an imported feature file in the Project Explorer, nor you can rename an imported feature in the Gherkin editor (that is, you cannot change the first line of the feature description). The feature name serves as an identifier and is required for synchronization. If you want to rename a feature, do this on the HipTest side.

  • Don’t change files in third-party editor

    To prevent data loss and to avoid possible issues during synchronization, we recommend that you don't edit imported feature files outside TestComplete. If you need to change a scenario or a feature file, do this in TestComplete, or do this in HipTest and then import the changes to TestComplete.

See Also

HipTest Integration
Unbind Test Project From HipTest Project

Highlight search results