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!
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?