Conflict management: errors in test assets

When multiple users edit and commit the same set of test assets, then while you pull or push changes to the remote Git repository, a merge conflict occurs.

Consider two users are working on the same VU Schedule called MyVUSchedule1.testsuite. One of the users committed and pushed changes to the remote Git repository. Later, when the other user tries to commit and push changes, the commit fails with the following error message:

merge_conflict_error

The error occurs because the remote Git repository contains changes pushed by the other user that are not present in the local branch. To push the changes, the changes in the remote Git repository must be pulled down to the local repository.

You can perform the following steps to resolve the merge conflicts in test assets:

  1. Go to the Git perspective view, and then right-click the remote Git repository from the list.

  2. Select Pull from the list to make your local Git repository up-to-date.

    The Pull Request window is displayed.

  3. Expand the commits fetched from the remote Git repository, and then expand each commit to view the list of changed files in them.

    expand_pull_request
    Note: You must make a note of the test assets listed in the Pull Request window that were modified locally.
  4. Examine the Git Staging view to find the conflicting or unmerged files.

    Note: The conflicting files are marked with a red icon.
  5. Right-click the conflicted test assets, and then select the Replace With option.

  6. Select one of the following options based on your requirement:

    • Theirs:commitID commitmessage

    • Ours:commitID commitmessage

    Since MyVUSchedule1.testsuite is binary, the remote and local changes must have to be merged manually. If necessary, you must first discuss with the user who authored or committed the changes. If their changes are extensive and the locally performed changes are relatively minor, you can overwrite the local version with the remote by selecting Theirs:commit ID commit message. You can then do the local changes again.

    Alternatively, if the local changes are extensive when compared to the changes in the remote branch, then you can overwrite the remote version by selecting the Ours:commit ID commit message option. Later, you must manually redo the remote changes on the local copy.

    Replace_commits

  7. Redo the changes that were broken because of the replace action.

  8. Move the files from Unstaged Changes to Staged Changes by using the Add selected files to the index single_item or multi_selection icon.

  9. Enter a message in the Commit Message pane, and then click Commit and Push.

    The Push Result dialog is displayed with the status of the commit to the remote Git repository.