Test Automation for Salesforce | Provar Logo Test Automation for Salesforce | Provar Retina Logo
  • SOLUTIONS
    • SALESFORCE
    • SERVICEMAX
  • RESOURCES
    • RESOURCES
    • FAQS
  • COMPANY
    • COMPANY
    • EVENTS
    • CAREERS
    • PARTNERS
    • CONTACT US
  • SUPPORT
  • BLOG
  • REQUEST A DEMO
Working with Git

Working with Git

Introduction

Below are some best practices for using Git with Provar.

The following workflow is recommended:

This page contains the steps to complete each one of the following activities. Click on any hyperlink to navigate to the relevant section:

  • Cloning your Project from Master to get a recent copy of the Project
  • Creating a new branch to store your work safely
  • Synchronizing a Project to check for any changes to the master project
  • Making commits and pushing to the Git repository
  • Merging to Master branch with Pull Requests
  • Resolving Conflicts

Best Practices

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 prior to committing them to the master branch
  • Sync other updates regularly from the master branch
  • Make regular backups
  • Follow a peer review process (see below)

Peer Review

Peer Review is an important process that should be performed regularly during the development of new Test Cases.

A suggested Peer Review process is as follows:

  1. Review the check-in comments added to Version Control, which should detail the changes made
  2. Pull the changes to be reviewed from the branch to the local repository
  3. Perform the peer review
  4. 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 make updates on a new branch rather than making 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 updating the same Test Cases at the same time. This will reduce the need to merge changes when syncing.

In general, it is a good idea to make a plan of 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 upon 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:

Then click the ‘Finish’ button.

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 will appear:

Click the ‘OK’ button to confirm the push.

Once this is complete, you can begin working normally 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 synchronise your Project in case any changes have been made since your Project 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 a ‘Synchronize’ tab in the lower-right corner of Provar Desktop:

Once this has 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’:

In the ‘Please identify yourself’ window, review the details entered and then click the ‘OK’ button:

On the Commit Changes screen, enter a ‘Commit message’ and select the files that you want to push by ticking them:

Then click the ‘Commit and Push’ button.

On the next screen, choose your branch (this should be the one that you created earlier to store your work):

Then click the ‘Next’ button.

If a ‘Login’ screen appears, enter your Git account details:

Then click the ‘OK’ button.

Review the Push Confirmation window which appears:

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’:

Confirm the changes and click on ‘Create Pull Request’:

If you have access, you will be prompted with the option to merge pull request.

Click on ‘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’:

Then click the ‘Merge pull request’ button:

Then click the ‘Confirm Merge’ button:

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 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:

 

Share this:

  • Twitter
  • LinkedIn
Hetty Weston 2017-09-14T15:09:37+00:00

Leave A Comment Cancel reply

  • Introduction
  • General Information
    • About Provar
    • System Requirements
    • Installing Provar
    • Granting Org Permissions to Provar
    • Updating Provar
    • Provar Support Process
  • Licensing Provar
    • License Types
    • License Activation
  • Tutorials
    • Start Here
    • Quickstart Guide
    • Quickstart Extension
    • Data Driven Testing
    • Testing with Different Profiles
    • Lightning Testing
  • Testing With Provar
    • Provar Desktop
    • Creating and Importing Projects
    • Adding a Connection
    • Creating Test Cases
    • Adding UI Test Steps
    • Using Functions
    • Managing Test Steps
    • API Testing
    • Using Test APIs
      • Test APIs Introduction
      • BDD APIs
      • Control APIs
      • Force.com APIs
        • Apex Bulk
        • Apex Execute
        • Extract Salesforce Layout
      • List Compare API
      • String APIs
      • UI Testing APIs
        • UI Action
        • UI Assert
        • UI Connect
        • UI Fill
        • UI Handle Alert
        • UI Navigate
        • UI On Screen
        • UI With Row
      • Custom APIs
        • Importing and Executing JAR Files
        • Creating Custom APIs
    • Environment Management
    • Debugging Tests
    • Running Tests
    • Test Cycles
    • Reporting
    • Exporting Test Cases
    • Exporting Projects
    • Callable Tests
      • Introduction to Callable Tests
      • Managing Parameters
      • Reusing a SFDC Connection
    • Data Driven Testing
      • DDT Introduction
      • Read Data From Excel
      • Write Data Into Excel
    • Tooltip Testing
    • Defining a Namespace Prefix on a Connection
    • Defining Proxy Settings
    • Namespace Org Testing
    • Searching Provar with Find Usages
    • Secrets Management and Encryption
    • Testing Browser Options
  • Salesforce Testing
    • Assert Page Error Messages on Add/Edit Product
    • Internationalization Support
    • Lightning Testing
    • List and Table Testing
    • Service Cloud Console Testing
    • Visualforce Testing
      • Introduction to Visualforce Testing
      • Introduction to XPaths
      • Maintaining Page Objects
      • Page Object Operations
      • Mapping Non-Salesforce Fields
      • Creating an XPath
  • Applications Testing
    • Database Testing
      • Database Testing Setup
      • Database Operations
    • Document Testing
    • Email Testing
      • Email Testing Setup
      • Email Testing Examples
    • Force.com Testing
    • Mobile Testing
      • Mobile Emulation
      • Mobile Testing with Appium
      • Perfecto mobile
      • ServiceMax FSA Mobile Testing
    • OrchestraCMS Testing
    • Salesforce CPQ Testing
    • ServiceMax Testing
    • Skuid Testing
    • Vlocity Testing
    • Webservices Testing
      • Web Services Introduction
      • Creating a Web Service Connection
      • Web Services Testing
  • DevOps
    • Introduction to Test Scheduling
    • Apache Ant, Java JDK and Environment Variables
    • Generating a Build File
    • ANT Task Parameters
    • ANT Licensing
    • Version Control and DevOps
    • Setting Up Continuous Integration
    • Masking Credentials in Jenkins
    • Running Provar on Linux
    • Salesforce DX
  • Version Control
    • Git
      • Introduction to Git Integration
      • Creating a Provar Repository
      • Git and Provar Projects
      • Working with Git
    • Team Foundation Server
  • Integration
    • Micro Focus (HP) ALM
    • Jira
    • Salesforce Test Integration Package
  • Best Practices
    • Supported Testing Phases
    • Automation Planning
    • Test Case Design
  • Troubleshooting
    • Add Floating License Firewall Exception
    • Add Gmail Firewall Exception
    • Add Permissions To Edit Provar.ini File
    • Common Install or Update Issues
    • Configure Provar UI in High Resolution
    • Enable Prompt To Choose Workspace
    • Increase System Memory For Provar
    • JavascriptException error via IE
    • Out of Memory error during CI Execution
    • Override Chrome Driver Version
    • Overriding the Chrome Install Location
    • Refreshing Org Cache Manually
    • Resolving Jenkins License Missing Error
    • Resolving Metadata Timeout Errors
    • Salesforce Connection Issues
    • Show Hidden Provar Files On Mac
    • Solving Administrator has Blocked Access to Client Errors
    • Test Builder Does Not Launch
    • Test Case Does Not Run on IE Browser
    • Test Case Steps Do Not Display
    • Test Execution Fails – Firefox Not Installed
  • FEATURES
  • RESOURCES
  • FAQs
  • BLOG
  • SUPPORT
  • HELP
  • CONTACT US
Copyright Provar 2019    |   All Rights Reserved
TwitterYouTubeLinkedinVimeo