Chrome & Version 108.0.5359.125 (Official Build) (64-bit)
Steps to reproduce
When ever there is new test case is added in the test suite then in the suite collection need to remove that test suite and add again before execution else those test cases are not included
If you want to include newly added test cases in a test suite before execution, you can do that by updating the test suite in the suite collection. Hereâs an example of how you could remove a test suite from a suite collection and add it again to include newly added test cases:
import com.kms.katalon.core.testcase.TestCaseFactory
// Get the test suite you want to update
TestSuite testSuite = TestSuiteFactory.getTestSuiteByName("My Test Suite")
// Remove the test suite from the suite collection
TestSuiteCollection.removeTestSuite(testSuite)
// Add the test suite to the suite collection again
TestSuiteCollection.addTestSuite(testSuite)
I tried to reproduce your case on my machine. I could. I think you, @p.kayam, made a small mistake. And Katalon Studio has a defect that confused you. Let me tell you what I did.
I exectuted the TSC. It showed a message âxxxxxxxx TCx is running xxxxxxxxâ only. It did not emitted a message âyyyyyy TCy is running yyyyyyâ. This is an insident!
I realised that I forgot to save the TS1. I did not click the green arrow âsaveâ button. I left the TS1 unsaved, marked with an * mark.
I realized my mistake that I did not saved the changed TS1. So I clicked the green button to save the TS1. The * mark disappered.
I executed the TSC. It emitted 2 lines of messages: âxxxxxx TCx is running xxxxxxxâ and âyyyyyyy TCy is running yyyyyyyyâ. This was as expected. TCS ran fine.
May not look professional, but I made a habit of using Ctrl-Shift-S vs Ctrl-S when using various apps.
Usually this saves me from headeache (but sometime creates additional troubles)
âSave Allâ vs âSaveâ sometime make the difference, and those keybindings are most common used.
I think there is a small defect in Katalon Studio. When I tried to execute the TSC while the TS1 was unsaved, I think Katalon Studio should not have started executing the TSC with unsaved TS1.
Katalon Studio should automatically save the TS1 before continuing; or should stop and warn âplease save the TS1 befre running TCSâ.
Unfortunately Katalon Studio ran TSC with unsaved TS1; this confused @p.kayam. This behavior of Katalon Studio doesnât look professinal to me.
Ah ⌠well, lazy to test that also, but probably you are right.
Will autosave testcases but this is the only test I did.
Indeed, looks like a bug to be considered.
My scenario is different, I pulled changes of my colleague in that there were some new testcases added in a test suite and that test suite is added in my test suite collection.
When I try to execute the test suite collection those test cases were not included if I remove the test suite and add it again those test cases was included.
I hope this is clear!
After pulling the changes, did you close & reopen the project?
After pulling the changes, did you ever opened the new testcases in the Test Case editor in your Katalon Studio GUI?
My Guess
Unless you manually open a test case script in GUI, Katalon Studio may not recognize that it has got a new script in the pulled project.
In my experience, unless given a chance to refresh, Katalon Studio often goes out of sync with files on disk. See the following ancient post:
Katalon developer stated they have fixed this issue. But I believe there remain some edge cases where Katalon Studio gets out of sync with files on disk. Iâve got bored with this issue. I am not going to debate this bug any longer.
What I do
I would just repeat closing and reopening projects when necessary. Especially I always do close&reopen a project after pulling it from a Git remote repository. Itâs a rule of thumb.
Thank you for the information: we can configure Eclipse to save dirty files before âbuildâ.
The terminology âbuildâ is a term used in Eclipse. It is not a term used in Katalon Studio.
Please clarify what âbuildâ means in Katalon Studio.
Is it a sort of âbuildâ to run a Test Case in Katalon Studio?
Is it a sort of âbuildâ to run a Test Suite in Katalon Studio?
Is it a sort of âbuildâ to run a Test Suite Collection in Katalon Studio?
Is it a soft of âbuildâ to pull the project from a remote Git repository in Katalon Studio using âGit integrationâ?
Will a dirty Test Suite be autosaved when a Test Suite Collection is executed?
Do you mean that in all these cases, provided that the autosave is configured ON, the dirty files will be saved by Katalon Studio before those actions?