Update verification point files with repository integration
If a repository integration is enabled, verification point dialogs can show the expected verification point (VP) from the mapped repository. If there is a difference between the actual result snapshot or screenshot and the data stored in the verification point, click the Update expected VP button to update the file in the repository to match the actual result.
Button to update VP in repository
Filesystem repository
For verification point files from a filesystem repository, the update mechanism simply replaces the verification point file on disk. When you click the Update expected VP button, a confirmation dialog is displayed where you can verify the path within the repository that will get replaced.
Filesystem update confirmation dialog
Note: The filesystem repository has no way to track changes over time, and therefore once you update the verification point file, you can no longer view the differences for the specific test run the changes originated from.
Git repository
For verification point files from a Git repository, the update mechanism bases the update either on the currently checked out branch head, or on the git commit
hash supplied via the .git.revision
label. The updated verification point file is added to the repository folder and a local commit is created.
Click the Update expected VP button to specify a commit Title and Description.
VP update dialog for Git repository
The updated verification point file is committed to the default branch specified in the Git repository settings or the head of the branch specified by the .git.branch
label. If the verification point file was already updated by another user or at a previous point in time, the Submit button is disabled and an info message is displayed.
In the repository settings, you can also specify whether the update mechanism should push the commit to the remote of the repository. If you enable the Push to remote when updating VP file option, the update mechanism first pulls all changes from the remote and then pushes the local commit.
The update mechanism uses script files from the Squish Test Center directory testcenter/config/scripts/git
to update the repository. Windows uses update.bat
(with push and pull) and update_local.bat
(without push and pull), whereas macOS and Linux use update.sh
and update_local.sh
. You can edit the script files to adjust the Git workflow.
Possible solutions for VP update errors
Squish Test Center does not provide any advanced conflict resolution features, so in some error cases you might have to manually resolve conflicts within the repositories linked to Squish Test Center. If you encounter general issues with the intended Git workflow, try to adjust the scripts found in testcenter/config/scripts/git
to your needs. If you run into issues related to the remote state of the repository, disable the Push to remote when updating VP file setting to turn off the remote features and do the pushing and pulling manually.
The following sections describe potential causes for update errors.
Error while trying to check out branch
As one of the first steps in the verification point file update process, Squish Test Center needs to checkout the branch that the updated VP should be placed in. The branch is determined by checking the .git.branch
label (and if that label is not provided, the Default Branch setting in the Git repository settings). The update script only calls git checkout
when the current branch of the repository differs from the target branch.
Common reasons why git checkout
might fail include:
- The branch name provided via the
.git.branch
label or the default repository settings is incorrect. - The branch only exists in a remote repository. The update script does not call
git fetch
, so you might need to call it manually. - If the repository has several remotes, the branch name can be ambiguous and you might need to specify the
remote/branch
.
Error while trying to pull from remote repository
- There might not be any remotes specified for the repository. To resolve this issue, specify a remote manually outside of Squish Test Center, disable Push to remote when updating VP file in the Git repository settings, or adjust the update scripts in
testcenter/config/scripts/git
. - There might be conflicting changes on the remote. Resolve this issue manually in Git.
- There might be untracked files in the local repository directory. Resolve this issue manually outside of Squish Test Center. Make sure that the linked repository directory is exclusively used by Squish Test Center.
Error while copying file to replace verification point
The updated verification point file is placed in a temporary folder and later copied into the repository directory by the update script. This error can occur when the system user running Squish Test Center does not have permissions to copy files into the repository directory.
Error while adding changes to staging area
While updating the verification point file, the update script calls git add path/to/vp/file
. Ensure that the file does not match exclude rules in .gitignore
and .git/info/exclude
.
Error while creating local commit
While updating the verification point file, the update script calls git commit -F
to create a local commit. This might fail if a git commit-msg
hook enforces a specific format on commit messages.
No differences detected
There is no difference between the updated verification point file generated by Squish Test Center and the current state of the repository. This might happen when the verification point has already been updated by another user.
Error while trying to push to remote repository
After creating a local commit, the update script tries to call git push
. Common reasons for that to fail include:
- There might not be any remotes specified for the repository. Resolve this issue by specifying a remote manually outside of Squish Test Center, disabling Push to remote when updating VP file in the Git repository settings, or adjusting the update scripts in
testcenter/config/scripts/git
. - There might be conflicting changes on the remote. Resolve this manually outside of Squish Test Center.
- The remote repository might have been updated in the meantime. In some cases, it might be sufficient to simply retry the update.
© 2023 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.