Katalon Studio integration with Git overview


This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/tutorials/git_integration_introduction.html


Can you please elaborate on how to work with git when 1 or more files have conflict during the pull?


We have been using Katalon and Git in a team environment for about six weeks. We have six committers who are actively adding and modifying tests on the same branch. The branch is part of continuous integration (using TeamCity) to run the tests automatically against our web site when changes are committed to the branch. Below are our Git practices for Katalon.

Note, the diagram on the Katalon site shows Push before Pull. In my experience, Git requires you to Pull before Pushing to the remote.

Our Git/Katalon practices are:

  1. Rebase when you pull. To avoid evil merge commits, use “git pull --rebase” when you pull. Without rebasing our remote repository was full of evil merge commits. Evil merge commits make it appear that the committer was changing dozens/hundreds of files that they had not actually changed. Now that we rebase with every pull, the remote commit history only shows the actual desired changes. Read about rebasing, as it is discouraged by some, although it has helped our project a lot. Rebasing basically brings your repository in line with the remote and then re-applies your commits on top of it. If this is not what you want, then do not do it.

I know some people will say we should be committing to “feature branches” and merging those into the master branch. In our situation, the application we are testing is not changing. We are actively trying to automate about 150 tests. We do not have and do not need feature branches. Every commit has been tested locally by the test automator. When the commit is made it goes straight into continuous integration and runs against the same application. In the future, when the application is undergoing changes, we may make use feature branches for our Katalon test development.

  1. Use Git .gitignore to ignore files. Some Katalon files do not need to be under revision control because they are products of the build. Our .gitignore file currently looks like this:

  2. Beware of files that Katalon changes. Every time I commit I have to revert these two files because Katalon Studio changed them. The changes are meaningless (white space, sorting, etc) and I do not want them to appear in my commits, so I revert them. Hopefully in a future version of Katalon Studio this will be resolved.

  1. Filter .ts files for Katalon Suites. Katalon Studio updates a timestamp in a .ts file when you run a suite. Again, I do not want these kinds of changes in my commits because they are “noise” and not relevant to the real changes I am making. To avoid committing these unwanted changes, we had to create a Git filter using the following commands:

    git config --global filter.tsDateFilter.clean ‘sed “s|.*</lastRun>|2018-01-01T01:00:00</lastRun>|g”’

    git config --global filter.tsDateFilter.smudge ‘sed “s|.*</lastRun>|2018-01-01T01:00:00</lastRun>|g”’

Please understand that I am not a Git expert. This is just what has worked for our project. I am open to your feedback on all of this.

Using Katalon and Git in a Team Environment

Nice work Harold!

Please consider reposting a copy of this to the Tips & Tricks category.


Done. Thanks!


Thanks Harold. This is exactly what I was looking for!