by Logo Technical Blog – Future Processing
11.08.2016
Git for Testers – description of Testing Cup workshop_

Within TestingCup 2016 more than 350 participants had a good time competing to be the best while… testing the ‘Mr Buggy’ application in version 4.2. During the second day of the event, our testing trio had pleasure to conduct a workshop “Git for testers”.

The beginning of the workshop was devoted to the fundamental question “Why to use a version control system in the process of software development?”. Typical answers were as follows:

  1. Managing code.
  2. Tracking changes in source code.
  3. Recalling any previous versions of software.
  4. Facilitating error tracking.

The main tasks of a tester, that can be facilitated by the version control system, are:

  1. Testing new versions of software.
  2. Approving software version, e.g. before it is introduced to the production environment.
  3. Finding in which version an error occurred.
  4. Maintaining automated tests or documentation.
  5. Code review (reviewing documentation or test cases).
  6. Creating ‘Release notes’ which are short notes for users showing what changes have been introduced to the new version of software.

We discussed the long-standing problem; what to choose – SVN or git? It is difficult to determine the advantages and disadvantages of one system over another, because these are two different approaches to version control.

The main differences are as follows:

  1. Git is a distributed system, SVN is a centralized one.
  2. Git manages changes which will be applied to files, SVN manages entire files and directories.
    • Approach to work in branches in Git is based only on changes, SVN physically copies everything to a new branch
  3. Git allows rewriting history, SVN has a consistent history.

Personally, we find speed (due to the fact of change management, and not the entire directories or files structures), and ability to work without access to a central repository (you can create your local history work, then rewrite it by pushing changes to remote repository) to be the main advantage of Git over SVN.

For many people (especially those who have worked with other version control systems) git seems to be difficult and incomprehensible. Working with a distributed repository, as well as the mechanism of handling changes requires change of thinking. During the workshop we wanted to direct the participants’ way of thinking onto other direction and thus befriend them with the tool.

Designing the workshop we chose elements of working with git we use during our daily testing duties. Practical tasks were based on a githug tool and adjusted to our needs. Githug allows to learn to work with the presented tool through an interactive game on the command line.

Other interesting tools, where you can also practice working with git, in an interactive way, are:

  1. https://www.codeschool.com/learn/git
  2. http://learngitbranching.js.org/
  3. https://onlywei.github.io/explain-git-with-d3/.

The last two visualize the result of operations of commands we have entered. Each command entered in the left-hand side panel, which expands the repository tree, is illustrated. In a very clear and transparent way we are able to see how our commands influence the shape of the repository.

git

In addition, during the workshop, we were able to answer the most problematic question about working with git that we heard at the beginning from the participants:

What is the difference between git revert, git reset and git checkout commands?

git revert
The result of executed command is a new commit, which reverses the changes in the previous state. The history of repository isn’t changed, it is expanded with a new commit.

gitCheckout_future_processing

 

git reset
If you want to get rid of changes that have not been squeezed out of the local repository, just use git reset. In this case, the repository history is changed.

gitReset_future_processing

git checkout
This command allows us to change the work context, switch between single commits and branches. As in the previous case, the history of repository is not changed.

gitCheckout_future_processing

After solving aforementioned questions git as a tool seems to be really simple if you use it with understanding – and we especially encourage you to learn through practice! We hope that our examples and prepared interactive workshop will help you with that.

Related Posts

Comments

Cookies

This website stores cookies on your computer. These cookies are used to improve our website and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Cookies policy.