.gitignore template for Katalon Studio


#3

i’ve included the following in my .gitignore:

bin/
Libs/
Reports/
.project
settings/

can’t say it causes some problems, or should it?


#4

evgenii said:

i’ve included the following in my .gitignore:

bin/
Libs/
Reports/
.project
settings/

can’t say it causes some problems, or should it?

This should cause very little problems if you and your team are only running jobs locally with an opened Katalon studio. However, if jobs are to be integrated to a CI environment, such as Jenkins, excluding the full Bin and Lib folders can cause many problem on the Jenkins jobs.
Here is what our team is using to prevent issues in Jenkins –

/bin/lib/Temp*.class

Reports/

.classpath

.project

/libs/Temp*.groovy

This allows all locally compiled .class files and .groovy files to be pushed to repo, and this allows the Jenkins jobs to pull the already compiled jobs.

We’ve noticed that without these files, the jobs will repeatedly fail, as they are run from the command line, and not opening an instance of Katalon Studio to allow for local compiles.

We have also noted that when opening our project in a local Katalon Studio, a .gitignore file is generated within the Bin folder, that usually includes the following lines –

/lib/

/keyword/

This will cause the compiles .class files in the keyword folder to not be GIT pushed and will cause errors if not removed to allow the folders to commit.

If anyone else has noticed this and has any ideas how to avoid this .gitignore from being generated in the first place, it would be a great help.

Hope this helps others


#5

jas said:
However, if jobs are to be integrated to a CI environment, such as Jenkins, excluding the full Bin and Lib folders can cause many problem on the Jenkins jobs.

@jas Quick question for you, why wouldn’t you build the test suite in your CI environment?

I assume you could just check in the source of your test project and have Katalon build the binaries and then test immediately afterwards, is this not the case?


#6

@Christian Nickel

How would I go about getting Katalon to build the binaries?


#7

Here is what our team is using to prevent issues in Jenkins –

/bin/lib/Temp*.class

Reports/

.classpath

.project

/libs/Temp*.groovy

@jas What about the .settings ?


#8

Mind ask that can i include the settings\internal in gitignore? Would it cause any problem?


Katalon Git Integration - Unknown files in Commits after clone project
#9

Alan,

Before asking others,
Have you checked what sort of information recorded in the settings\internal directory?
Have you checked how often the files in the settings\internal directory are updated?
Have you checked how large the files in the settings\internal directory potentially could be?


#10

@4280-kazurayam

Hi, i know it is store all source of the configuration in project settings and preferences. The reason why i’m asking this is because i know everyone has their own preference while doing coding and it will always get changes when my team member try to change the configuration by themselves. Because of this i don’t want of let any team member to simply change configuration without my notice or acknowledgement and push the code back to my gitlab master source file to mess up pre-fixed configuration.

Well, i knew katalon studio itself will generate back the internal setting files by default every time project is open/executed, and i think it wont cause any major problem to execute the test.

Thanks.


#11

Alan,

Now I understand you know very well what you are going to do. You are well aware what problems might be caused. So, I believe you are not waiting for replies from others any longer, do you?


#12

Cos i’m had scheduled daily test execution on Jenkins server, at first i’m worried it will cause problem for my test execution if i plan to include setting/internal into gitignore that’s why seek for you all opinion. I’m aware that if i make this decision, next time i have to do some manual work to import back the file back to the jenkins project files.


#13

Very strange, but when im trying to start tests from console without .project, without first opening project in catalon it is failed with this:

org.eclipse.core.internal.resources.ResourceException: Could not set the project description for 'C%%Users%ashirova%Documents%Katalon%api%API_Automation.prj' because the project description file (.project) is out of sync with the file system.
	at org.eclipse.core.internal.resources.Project.setDescription(Project.java:1246)
	at org.eclipse.core.internal.resources.Project.setDescription(Project.java:1280)
	at com.kms.katalon.groovy.util.GroovyUtil.initGroovyProjectDescription(GroovyUtil.java:572)
	at com.kms.katalon.groovy.util.GroovyUtil.initGroovyProject(GroovyUtil.java:150)
	at com.kms.katalon.groovy.util.GroovyUtil.openGroovyProject(GroovyUtil.java:647)
	at com.kms.katalon.dal.fileservice.manager.ProjectFileServiceManager.openProject(ProjectFileServiceManager.java:70)
	at com.kms.katalon.dal.fileservice.dataprovider.ProjectFileServiceDataProvider.openProject(ProjectFileServiceDataProvider.java:24)
	at com.kms.katalon.controller.ProjectController.openProject(ProjectController.java:98)
	at com.kms.katalon.execution.console.ConsoleMain.getProject(ConsoleMain.java:249)
	at com.kms.katalon.execution.console.ConsoleMain.findProject(ConsoleMain.java:155)
	at com.kms.katalon.execution.console.ConsoleMain.launch(ConsoleMain.java:90)
	at com.kms.katalon.console.application.Application.runConsole(Application.java:76)
	at com.kms.katalon.core.application.Application.runConsole(Application.java:72)
	at com.kms.katalon.core.application.Application.start(Application.java:56)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

And after fail Katalon create new .project and other files.
The next step im retry start my test and, oh God, it works!
But why it doesnt work withoit ./project?

My ignore:
.settings
bin
Libs
Reports (i dont need it. I need only logs, cause im using TeamCity Messages. and write a reports by logs)
settings (i notices, that Katalon create this folder by first opening)
.classpath
.project (it have local machine variable)
console.properties (creating by fist opening with Katalon GUI)

Now using Katalon 5.8.6 on server.(T_T) But in 5.10 on local machine i still have this trouble.


#14

My GitIgnore:

/bin/

.classpath

.project

.settings/

bin/lib/

Libs/

*.class

*.log

*.ctxt

.mtj.tmp/

*.jar

*.war

*.ear

*.zip

*.tar.gz

*.rar

hs_err_pid*

Libs/TempTestCase*.groovy

Libs/TempTempCase*.groovy

Libs/TempTestSuite*.groovy

Reports

settings/internal/com.kms.katalon.integration.analytics.properties

settings/internal/com.kms.katalon.integration.jira.properties


#15

Hello all

in my case, we are facing conflicts in each pull request with this file:
/settings/internal/com.kms.katalon.composer.testcase.properties

This file contains a list of used tags and it has a timestamp line that is updated on every single save. Is it safe to ignore it?

Thanks in advance


#16

Hi,

I am having the same issue as you, @dfranco. Did you ignore it?

Matt


#17

Hi @Matt_Thurman,
yes, I ignored the file because it seems that all tests are working OK.
I’m supervising some other config files in settings/internal/ that have the same problem

dfranco


#18

@dfranco thanks for the info…I will add that one as well. Let us know how the other files work out.


#19

if you run into the problem of files not being picked up by .gitignore correctly you can untrack and remove it then commit…

git rm --cached


#20

If we could get an official .gitignore list or template from Katalon would be great…


#21

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


Git Merge conflict com.kms.katalon.composer.testcase.properties
#22

@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.


Katalon Git Integration - Unknown files in Commits after clone project