.gitignore template for Katalon Studio

Thank you all for the feedback. In 6.4.0 .gitignore will be added to the project template.

1 Like

@devalex88

If you are going to publish “official .gitignore”, please consider 2 different use cases.

Case1: GUI mode execution
I would open the GUI of Katalon Studio and operate it, so that Katalon Studio has enough chances to compile all source files into executable formats stored in projectDir/bin and projectDir/Libs directories. Therefore .gitignore can specify the bin/ and Libs/ to be ignored.

Case2: Console mode execution
I would NOT open the GUI of Katalon Studio, I would not operate it. I want to execute a Katalon project in the Console Mode. I will prepare all the necessary beforehand. I want to execute the project as a part of a Bash shell script or a Gradle build script. I want to clone out all the necessary files of the project including .class files out of a Remote Git Repository. Therefore .gitignore can NOT specify the bin/ and Libs/ to be ignored.

The discussions below indicate how users get confused: “To ignore bin/ and Libs/, or not to ignore. That is the question”

I hope, in the version 6.4.0, you give us a detailed explanation what the bin/ and Libs/ directories are meant for, and how the “official .gitignore” file(s) is/are designed.

3 Likes

I have the same issue using katalon version 6.3.3. I also put it into the .gitignore file as only placing the file name and also trying only with folder and no success . the file still appearing when doing git add and commit.How do you solved that problem with this file ?

For files that have been committed before being excluded .gitignore, please delete them and commit the deletion. After that they will be ignored per .gitignore's rules.

Read this

and do

git rm --cached <the file you want to ignore>

1 Like

Done ! thank you all !

@francorebu that command on git fix your problem?

I am having the same issue as you but seems to be not fixed with that, maybe I made something wrong

it fixed my problem yes! @rodrigocalabretta

Hello, i wanted to ask when we add Libs/TempTestSuite* to gitignore does it ignore test suite we are creating. Also if we bind data to this test suite, does it get ignored too.

Sorry if my question is basic, i am the only one who creates test for the timebeing and i have Libs/TempTestSuite* ignored in my gitignore file. Whenever i clone my project , i lost the data i used in data binding in my test suite.
I see many people ignoring the Libs/TempTestSuite* , does it not cause issue when cloning projects.

Thank you

Definitely not.

The source of your Test Suites are stored in the <projectDir>/Test Suites/**/*.ts in XML format. I suppose you are storing those Test Suites/**/*.ts files in the repository. The TempTestSuite* files are something generated by Katalon Studio, which are safe to .gitignore.

What is a Libs/TempTestSuite* file? — You can open that file and see the content using some text editor: notepad, Visual Studio Code, vi, emacs, Eclipse, IDEA, any editor other than Katalon Studio. You will find a code in a TempTestSuite* file is a script coded in Groovy language. A XML is converted into a Groovy script. The script is generated by Katalon Studio every time when you create/edit/execute a Test Suites/**/*.ts file. When the script is missing, Katalon Studio automatically will generate it again. So, as far as you store the source XML in the Git repository, you would not loose the original setups. It is safe to have a line of Libs/TempTestSuite* in the .gitignore.

I do not see your problem.

Could you create a new post in the forum and provide more information? I need to see some screenshots which describes what you mean by saying “I lost the data”.

Also you wrote “whenever i clone my project”, what exactly you did? Did you typed a command “git clone xxxx” in the commandline? or you copied & pasted the root folder of your project to some other folder?

Hello @kazurayam,
Thank you for getting back to me.

I have created a new post with my issue:

Thanks