Pull requests notify reviewers on changes introduced to a test. Once a pull request is opened, you can discuss and review the potential changes with collaborators before your changes are merged into the Master branch. Pull Requests are an essential part of the "code review" practice, which minimizes testers/devs breaking others’ work.
This is a PRO feature
This feature is only open to projects on our professional plan. To learn more about our professional plan, see here.
The pull request settings are located in the Settings -> Project -> Pull Requests screen and are configured per project. Only the project owner or the company owner can configure these settings.
There are two toggles (both switched off by default):
- Protect master from changes - this setting prevents writing directly to the Master branch. To learn how to configure and use this setting, read more here
- Require approving reviewer - this setting specifies who can review the pull requests. A list of users is displayed below. Select specific users or all users.
- Allow self-approval - select users that can approve their own PR
A pull request represents the (current) diff between a specific branch and the master branch, so the change can be reviewed and approved by another team member. Like in Github, the PR itself does not hold any state, and no changes/conflict resolutions can be performed as part of the PR itself. For this reason it is important to resolve conflicts before submitting the PR.
The best practice for updating tests in the master branch is:
Create a branch X → make the required changes → merge the master branch to your branch X (to resolve conflicts) → issue a Pull Request.
To resolve conflicts before submitting the PR, pull from master to your branch, perform the changes on the branch, and then submit the pull request as instructed below. As part of the conflict resolution, you can view the comparison between the source and the target for a test. The comparison will show you the current state of the merge for this test in read-only mode.
To learn more about resolving conflicts, see - Resolving Conflicts
To create a pull request:
- After making the changes to your branch, select from the branches drop-down menu the branch that you would like to merge and click the Merge icon.
The Open Pull Request dialog is displayed showing the tests and folders that would be merged into the master branch if approved.
- Click Next.
- Enter a name for the Pull Request and click Submit.
The reviewers will be notified via email there is a new PR with a direct link to the PR itself. Alternatively, reviewers can go directly to the PR list, and select the relevant PR from the list.
To view all PRs for the project:
- click the PR button, which is located next to the branches drop-down menu.
A list of open PRs is presented with their current status. You can filter the results by clicking the Filter icon. The PRs can be filtered by branch name, submitter, and status.
- Open the PR you would like to review. This PRs include the following information:
- Name - the name of the PR, who opened it, and when
- Status - the following statuses can be displayed:
- Review required - the PR was submitted but have not been reviewed yet
- Changes required - the reviewer asked for changes
- Approved - the PR was approved, it is possible to merge to master
- Closed PRs can be viewed directly in the audit log, when deleting a branch, the PR will automatically be closed.
- Decide whether to approve the PR or ask for changes.
If the PR is approved, the branch can be merged to master. If the reviewer asked for modifications, the PR will need to be resubmitted until approval.
Updated 2 months ago