Working with Git
Best practices
Below are some best practices for using Git with Provar.
The following workflow is recommended.
Keep in mind the following best practices when using Version Control:
- Commit changes to Version Control early and often
- Make useful commit messages, which can be referenced against the changes made in the commit
- Have commits reviewed by a peer before committing them to the master branch
- Sync other updates regularly from the master branch
- Make regular backups
- Follow a peer review process (see below)
Note:
While navigating to Import Projects from the Git screen from the Welcome to Provar screen, a security pop-up is displayed, as shown below.
It will prompt every time a Git operation is performed unless you click the Always Allow button, which will stop it and do the operation in the background.
If it still prompts all the time, check you’re using the correct password, or it might be a bug with the git plugin.
Peer review
Peer Review is a necessary process that should be performed regularly during developing new Test Cases.
A suggested Peer Review process is as follows:
- Review the check-in comments added to Version Control, which should detail the changes made
- Pull the changes to be reviewed from the branch to the local repository
- Perform the peer review
- Once verified, push the changes to the master branch
Cloning project from master
Start your work by getting the latest version of the Provar Project from Git. This is done by cloning the Project from the Master branch to your local directory.
Refer to Cloning a Project for steps on how to do this.
Creating a new branch
Once you have cloned the Project from the remote repository, consider whether you need to create a new branch for your work. This will depend on the workflow your team is following.
In general, you should update a new branch rather than make changes on the Master.
However, it is not always necessary to create a different branch for each tester in your team when working on the same project.
For example, you can also try to co-ordinate your team members to prevent multiple team members from updating the same Test Cases simultaneously. This will reduce the need to merge changes when syncing.
In general, it is a good idea to plan how many branches are required and how they will be used, rather than creating a new branch for every new team member.
You may need multiple branches if you are testing different versions of the System Under Test (SUT) at the same time. This will allow you to have different views of your Test Cases, depending on the functionality being tested.
If you are using the Git Plugin for Provar, you can create a new branch from within Provar itself by following the steps below.
To create a new branch, right-click on your Project in the Navigator, then select Team > Switch To > New Branch:
Enter a name for the new branch.
Click Finish.
This will create the branch on your local directory. It will then need to be pushed to the remote repository. To do this, right-click on the Project again and select ‘Team > Push Branch ‘BranchName’…’:
The following screen is displayed.
Click OK to confirm the push.
Once this is complete, you can begin working usually in Provar. Once you have completed your changes in Provar and want to push your work back to the remote repository, move on to the next section.
Synchronizing a project
Before pushing any work back to the remote repository, it is a good idea to synchronize your Project in case any changes have been made since it was cloned. Doing this before pushing changes to the repository will reduce the effort needed to resolve conflicts later.
To synchronize your Project using the Git Plugin, right-click on the Project and select ‘Team > Synchronize Workspace’:
This will open the Team Synchronizing Perspective:
Once this has been completed, you can double-click on any updated files to confirm the changes.
Making commits and pushing to Git
Once you are ready to commit and push your changes to Git, right-click on the file or files you want to push and choose Commit:
Review the details entered in the Please identify yourself screen and click OK.
On the Commit Changes screen, enter a Commit message and select the files you want to push by selecting the checkboxes.
Click Commit and Push.
On the next screen, choose your branch (this should be the one that you created earlier to store your work):
Click Next.
If a Login screen appears, enter your Git account details.
Then click the OK button.
Review the Push Confirmation window which is displayed.
Confirm by clicking the Finish button.
Merging to master branch
To merge code into the Master branch, go to your GitHub repository in a browser.
Go to your Branch and click on New pull request.
f
Confirm the changes and click on Create Pull Request:
If you have access, you will be prompted with the option to merge pull requests.
Click Files Changed, review the files, then click the Review changes dropdown.
To approve, enter any summary comments as wanted, then choose the Approve radio button and click Submit review:
Click Merge pull request.
Click Confirm Merge.
The following success message should display.
Other Pull Request can be created in the same way for other branches.
Resolving conflicts
While working on separate branches and merging the code, you may face some conflicts related to Test Cases and Page Objects added to the branch that conflicts with code already present on the master branch.
For example, after creating a Pull Request for your branch, you may see the following message:
To resolve the conflict, click the Resolve Conflict button on the message, then analyze the difference in the files.
Update/Remove the code that conflicts and click on Mark as resolved:
Once all conflicts have been resolved, commit the merge:
Then merge the branch to master:
For more information, check out this course on University of Provar.
- Provar Automation
- System Requirements
- Browser and Driver Recommendations
- Installing Provar Automation
- Updating Provar Automation
- Licensing Provar
- Granting Org Permissions to Provar Automation
- Optimizing Org and Connection Metadata Processing in Provar
- Using Provar Automation
- Understanding Provar’s Use of AI Service for Test Automation
- Provar Automation
- Creating a New Test Project
- Import Test Project from a File
- Import Test Project from a Remote Repository
- Import Test Project from Local Repository
- Commit a Local Test Project to Source Control
- API Testing
- Behavior-Driven Development
- Consolidating Multiple Test Execution Reports
- Creating Test Cases
- Custom Table Mapping
- Functions
- Debugging Tests
- Defining a Namespace Prefix on a Connection
- Defining Proxy Settings
- Environment Management
- Exporting Test Cases into a PDF
- Exporting Test Projects
- Japanese Language Support
- Override Auto-Retry for Test Step
- Customize Browser Driver Location
- Mapping and Executing the Lightning Article Editor in Provar
- Managing Test Steps
- Namespace Org Testing
- NitroX
- Provar Test Builder
- ProvarDX
- Refresh and Recompile
- Reintroduction of CLI License Check
- Reload Org Cache
- Reporting
- Running Tests
- Searching Provar with Find Usages
- Secrets Management and Encryption
- Setup and Teardown Test Cases
- Tags and Service Level Agreements (SLAs)
- Test Cycles
- Test Data Generation
- Test Plans
- Testing Browser Options
- Tooltip Testing
- Using the Test Palette
- Using Custom APIs
- Callable Tests
- Data-Driven Testing
- Page Objects
- Block Locator Strategies
- Introduction to XPaths
- Creating an XPath
- JavaScript Locator Support
- Label Locator Strategies
- Maintaining Page Objects
- Mapping Non-Salesforce fields
- Page Object Operations
- ProvarX™
- Refresh and Reselect Field Locators in Test Builder
- Using Java Method Annotations for Custom Objects
- Applications Testing
- Provar Manager
- How to Use Provar Manager
- Provar Manager Setup
- Provar Manager Integrations
- Release Management
- Test Management
- Test Operations
- Provar Manager and Provar Automation
- Setting Up a Connection to Provar Manager
- Object Mapping Between Automation and Manager
- How to Upload Test Plans, Test Plan Folders, Test Plan Instances, and Test Cases
- Provar Manager Filters
- Uploading Callable Test Cases in Provar Manager
- Uploading Test Steps in Provar Manager
- How to Know if a File in Automation is Linked in Test Manager
- Test Execution Reporting
- Metadata Coverage with Manager
- Provar Grid
- DevOps
- Introduction to Provar DevOps
- Introduction to Test Scheduling
- Apache Ant
- Configuration for Sending Emails via the Automation Command Line Interface
- Continuous Integration
- AutoRABIT Salesforce DevOps in Provar Test
- Azure DevOps
- Running a Provar CI Task in Azure DevOps Pipelines
- Configuring the Automation secrets password in Microsoft Azure Pipelines
- Parallel Execution in Microsoft Azure Pipelines using Multiple build.xml Files
- Parallel Execution in Microsoft Azure Pipelines using Targets
- Parallel execution in Microsoft Azure Pipelines using Test Plans
- Bitbucket Pipelines
- CircleCI
- Copado
- Docker
- Flosum
- Gearset
- GitHub Actions
- Integrating GitHub Actions CI to Run Automation CI Task
- Remote Trigger in GitHub Actions
- Parameterization using Environment Variables in GitHub Actions
- Parallel Execution in GitHub Actions using Multiple build.xml Files
- Parallel Execution in GitHub Actions using Targets
- Parallel Execution in GitHub Actions using Test Plan
- Parallel Execution in GitHub Actions using Job Matrix
- GitLab Continuous Integration
- Travis CI
- Jenkins
- Execution Environment Security Configuration
- Provar Jenkins Plugin
- Parallel Execution
- Running Provar on Linux
- Reporting
- Salesforce DX
- Git
- Version Control
- Salesforce Testing
- Recommended Practices
- Salesforce Connection Best Practices
- Improve Your Metadata Performance
- Java 21 Upgrade
- Testing Best Practices
- Automation Planning
- Supported Testing Phases
- Provar Naming Standards
- Test Case Design
- Create records via API
- Avoid using static values
- Abort Unused Test Sessions/Runs
- Avoid Metadata performance issues
- Increase auto-retry waits for steps using a global variable
- Create different page objects for different pages
- The Best Ways to Change Callable Test Case Locations
- Working with the .testProject file and .secrets file
- Best practices for the .provarCaches folder
- Best practices for .pageObject files
- Troubleshooting
- How to Use Keytool Command for Importing Certificates
- Installing Provar After Upgrading to macOS Catalina
- Browsers
- Configurations and Permissions
- Connections
- DevOps
- Error Messages
- Provar Manager 3.0 Install Error Resolution
- Provar Manager Test Case Upload Resolution
- Administrator has Blocked Access to Client
- JavascriptException: Javascript Error
- macOS Big Sur Upgrade
- Resolving Failed to Create ChromeDriver Error
- Resolving Jenkins License Missing Error
- Resolving Metadata Timeout Errors
- Test Execution Fails – Firefox Not Installed
- Selenium 4 Upgrade
- Licensing, Installation and Firewalls
- Memory
- Test Builder and Test Cases
- Release Notes