Applies to TestComplete 14.20, last modified on September 11, 2019

About synchronization

When you import BDD scenarios from HipTest to your TestComplete project, the latter copies feature files from a HipTest project to your computer, and the projects become bound to each other. You may want to synchronize feature files in bound projects, that is, you may want the changes made to HipTest scenarios to become available to automation engineers in your TestComplete project, and, vice versa, the changes made to feature files by automation engineers in TestComplete become available to your teammates who are working on scenarios in HipTest.

Note on difference in file structure

HipTest organizes test scenarios into folders and subfolders. To emulate this structure, TestComplete creates a feature file and, optionally, a folder for each “HipTest” folder. For detailed explanation, see Difference in File Structure. Keep this in mind when syncing scenarios.

HipTest-to-TestComplete sync

You can obtain files from HipTest automatically or manually. If you choose automatic synchronization, you can also select the moment when it should occur: when you open your project in TestComplete, or when you run a BDD test in TestComplete, or in both these cases.

Option 1 – Automatic sync

You can command TestComplete to obtain feature files automatically every time you run BDD scenarios from TestComplete, or when you open your test project in TestComplete, or in both these cases. The first approach is helpful if your team changes scenarios in HipTest frequently. The second approach is helpful when the scenarios are not changed so frequently, but you want to keep track of changes. You enable these types of synchronization in your project properties in TestComplete:

  1. Open the project property editor. To do this:

    • Right-click the project node in the Project Explorer panel and select Edit > Properties from the context menu.

      – or –

      Double-click the project node to open the project editor, and then go to the Properties tab.

    • Select the Synchronize feature files on project opening and Synchronize feature files before test run check boxes:

      Enable automatic synchronization with HipTest in project properties

      Click the image to enlarge it.

      Select File > Save from the main menu to save the changes.

    You can select only one of these check boxes or both. By default, in new projects, these settings are on.

    The Synchronize test cases before test run setting also works with Synchronize test run. See below for details.

When to disable auto sync

In some cases, you may want to disable automatic synchronization. This might happen if your team is actively changing scenarios in HipTest, and you need to continue working on and running previous scenario versions. In this case, you can disable both settings and synchronize projects manually when it is needed. See below.

Option 2 – Manual sync

You can synchronize your TestComplete with HipTest at any time manually. To do this, simply right-click the project node in the Project Explorer and select Update from HipTest from the context menu:

Manual synchronization with HipTest

TestComplete-to-HipTest sync

You can edit imported feature files in TestComplete, delete them and create new feature files and pass your changes to HipTest. This happens automatically when you save your changes in TestComplete; the latter automatically forwards them to the bound HipTest project. The files to be synchronized depend on whether you are saving changes to a feature file, to the Scenarios node or to the entire project.

If you save changes to a feature file ...

... then TestComplete synchronizes that feature file only. It sends it to HipTest and overwrites the HipTest version of the file with your version.

This happens, for example, when you are editing a feature file in the Gherkin editor and press Ctrl+S to save the changes.

If you save changes to your project or Scenarios node ...

... TestComplete synchronizes all the features files in your project. It sends them to HipTest and replaces the HipTest versions of the files with your version.

This happens, for example, when you choose File > Save All from the main menu or when the Scenarios node is selected in the Project Explorer, and select File > Save from the main menu.

What files are updated

  • Important: When getting files from HipTest to TestComplete, the latter replaces the existing feature files in the test project with the HipTest files. All the changes in your TestComplete project that have not been synced with HipTest are lost.
    This works in the reverse order as well: when passing changes from TestComplete to HipTest, TestComplete replaces the folders and test scenarios on the HipTest side with the feature files and scenarios you have in your TestComplete project. If some “feature” exists in HipTest, but doesn’t exist in your TestComplete project, it will be removed from HipTest. Be aware!

  • In HipTest, BDD scenarios can differ from one test run to another. TestComplete always synchronizes with scenario versions from the Scenarios collection of your HipTest project. It doesn’t synchronize with test runs.

    If you send changes from TestComplete to HipTest and want the changes to go to some test run, select this test run in the Test run project property and enable the Synchronize scenarios in the HipTest test run property. Synchronization with archived test runs is not possible.

Some changes are not allowed in bound TestComplete projects and cannot be synchronized:

  • 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.

  • 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.

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

  • Also, 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.

Sync test runs

In HipTest, scenario versions may differ from one test run to another. If you want a test run to use the latest scenario version, you call the Synchronize command for it in HipTest:

The Synchronize command in HipTest

Click the image to enlarge it.

To implement this behavior in TestComplete, select the Synchronize scenarios in the HipTest test run check box in project properties in TestComplete. This option works only if you synchronize scenarios before test runs:

  • When you command TestComplete to launch a BDD scenario, it checks the Synchronize test cases before test run setting of your project.

  • If this setting is on, and if Synchronize HipTest test run is on, then …

  • … before synchronizing scenarios, TestComplete calls HipTest’s Synchronize command for the test run you are using (this is the test run that the Test run project property specifies).

  • After this synchronization is over, TestComplete starts synchronizing feature files in the project with feature files from HipTest.

  • And, after this synchronization is done, it launches the test.

Sync test results

TestComplete can also post results of BDD scenarios to HipTest. See Upload Results.

See Also

HipTest Integration
Bind TestComplete Project to HipTest Project
Import HipTest Scenarios
Upload Results

Highlight search results