Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Sunday, 10 February 2019

UFT with GIT


GIT is a source code management and revision control system. There are various version control system are available, GIT has become very popular lately with its lots of enhanced feature, easy to use, availability and speed.

Basics of GIT: 


Lets understand Version Control System first, a Version Control System allows you and your team to work on the same project simultaneously. It does not allow overwrite the changes and maintains a history of each change. There are two types of Version Control System 

  1. Centralized Version Control System
  2. Distributed Version Control System
GIT is a Distributed Version Control System, it maintains a fully mirrored repository at client which make it distributed and different than centralized one. If any of the server goes down then a copy from client be brought back to restore. Every checkout is the full backup of repository.

GIT is Secure, Powerful, Easy to use , Fast and Free!

There are four main steps to work with GIT
  1. Modify a file in working directory. 
  2. Add files to Staging area
  3. Perform Commit operation to move files from staging area. 
  4. Perform Push Operation to store the changes permanently to the GIT repository
Step by Step integration of UFT and GIT

Step 0: Install GIT and Create Account at GITHub

If you don’t have an account with github, create an account at github.com
Download and install GIT on your System
Configure GIT, Open GIT Bash and run below commands one by one
[gistpen id=”3249″]
Step 1: Create GitHub Repository
Login to your GitHub account which you created, and create a new repository for your test. Here you can create a public or private repository. GitHub charges some amount for private repository. 
Step 2: Clone Repository to Local GIT
It is required to get your repository at GitHub to you local repository and linked. To do this you need to perform clone repository operation either at GIT GUI or GIT Bash.
  1. Create a folder on your system, say “C:\GIT”
  2. Launch GIT GUI and click on “Clone Existing Repository”
  3. Go to your GitHub and Copy the clone path for your repository, this path should be source location  and the folder you created at your local should be the destination
  4. Click on Clone, and your local repository should be ready
Step 3: Create Test


Launch UFT and Create a test in the local repository path, i.e the same path where GIT repository has been initialized. 


If you will notice in the solution explorer, a red exclamation mark has been added to all the file icon, which indicates that the files are currently in you local repository and not yet pushed to the GitHub.

Step 4: Push Test to GitHub Repository

Two easy steps – Commit the changes and then Push the changes. These options are available in the right click menu on the test at Solution explorer. Push Option will be disable at first, which means that you will need to commit the changes first.

Once you have successfully pushed your changes to GitHub Repository, you can open the repository there and see the files from UFT test there.


No comments:

Post a Comment

Note: only a member of this blog may post a comment.