Version Control and DevOps

Introduction to Version Control

Version Control is an important part of any DevOps strategy.

A Version Control System will allow team members to work freely on any file at any time, while supporting the merging of changes into a common version. Even if you are the sole member of your team, a Version Control System is still a valuable resource as it will assist you in storing and organizing project versions correctly, restoring previous versions when needed and keeping backups.

Refer to Why Use a Version Control System? to learn more.

Version Control in DevOps

In DevOps, a Version Control System gives better control over the version of the tests being scheduled, without needing to amend your Build File or your Continuous Integration Server setup. Test versions are mastered in the Version Control System, and upon each run the Continuous Integration Server can access the tests from that location.

Note that a Version Control System is not a mandatory part of a DevOps strategy with Provar, although it is recommended.

If you are not using a Version Control System, you can still schedule your tests using a Continuous Integration server, but the server will access your tests from a defined location on a local machine. If this is your scenario, you can skip the rest of this page and move on to Setting up Continuous Integration.

What do I need?

To use Version Control in your test scheduling, you will need to have:

  • A Version Control System set up
  • A defined Version Control strategy which is being followed by your team

If you already have both of these, you can skip the next sections and move on to Version Control and Provar (see below) to learn what files need to be checked into your Version Control System.

How do I get started?

If you do not yet have a Version Control System already set up and/or a defined Version Control strategy, choose one of the following options:

I want to set up a Version Control System.

Start by choosing which Version Control System you want to use. One good option is Git. To get started, try Salesforce’s Git and Github Basics Trailhead module, which includes instructions on installing Git and creating your first Repository. Once you’ve finished this module and have Git installed, move on to the next section.

I am using Git and want to learn how to use it with Provar.

Provar has a Git plugin which gives testers the ability to perform Git activities from within Provar. Refer to Introduction to Git Integration for more information on setting up this plugin.

To make your tests run properly when scheduled, you will need to check certain Provar files into your Version Control. Refer to Version Control and Provar (see below) for more information.

I am using SVN, Team Foundation Server or HP ALM.

Provar has plugins to support the use of SVN and Team Foundation Server. These plugins can be accessed under Help > Add/Remove Features when running Provar as an administrator. Refer to Introduction to Git Integration for detailed steps on enabling a plugin.

Provar also supports integration with HP ALM. Refer to the HP ALM help page for more information.

To make your tests run properly when scheduled, you will need to check certain Provar files into your Version Control. Refer to Version Control and Provar (see below) for more information.

I use another Version Control System not mentioned above.

If Provar does not yet have an integration with your Version Control System of choice, you can still use these systems with Provar by manually checking in your Project and Test Case files from your local directory.

To make your tests run properly when scheduled, you will need to check certain Provar files into your Version Control. Refer to Version Control and Provar (see below) for more information.

Version Control and Provar

Provar is a file-based system. The files it creates are XML, Text or Java, as shown in the table below:

File Type Description
Test Cases XML Contains the logic of your test
.project XML Contains details of your connections and Environments
.secrets Text Stores details of your password protected fields
Page Objects Java Details of your Page Locators for UI testing
Custom APIs Java Ability to create your own Logic/APIs in Provar

To make your tests run properly when scheduled, make sure that the following files are not checked into your Version Control System:

Data Description How to recreate
.metadata and */ProvarANT/* folder Contains Cached Org Information and Logfiles Provar will recreate this folder when it does not exist
bin folder Contains all compiled java classes Provar will re-compile all java classes contained in the src folder
*.pdf documents By default Provar test reports are added to the project directory, you may not want these added to Version Control Run the test case again

In addition, if you are using Git, the default .gitignore file should be replaced with this file. Make sure that the file has the extension .gitignore after you have saved it.

Once you are finished, you can move on to the final section, Setting up Continuous Integration.

2017-09-14T12:07:46+00:00

Leave A Comment