Call a test case several times in a test suite


#1

Hello,

I’m working with Katalon and I’d like to call a test case several times.
For example I make a login test case which try to log in with variables we previously set in other test case.

I already find two ways to do it but I don’t find them clean :
- the first one consist on modify the .ts file that correspond to my test suite
- the second is to use the function WebUI.callTestCase in my test case and use a test case as a test suite.

Regards,
Thibaud A


#2

You can’t call duplicate test cases in a Test Suite. You should suggest these features to Katalon team as well.


#3

It could be a great improvement because I have a test case that is repeated many times with different parameters.


#4

True, I would love something like that.
Could be really usefull.


#5

Thank you for your suggestion, we will consider it.
I wonder if the built-in data-driven approach in Katalon Studio works well with your scenario?


#6

Actually, i got a “Login client a” test case, that i would like to use 2 times at different moment but with the same parametter in the same test suite.
That’s what’s bothering me.


#7

I got your point. We will add this behavior into our backlog.

In the meantime, one work-around solution is cloning the login test case and add them into the test suite.

In my case, I would not let the testsuite execution order affect my test flow. All the test case in testsuite should be independent to each others. If I have a case that some steps need to follow others, I will combine them into a test case (so call “work-flow testcase”) and then reuse it in different test flow, or add into test suite.


#8

Thank you for answering me.
Do you have any idea of the time needed for implementing this feature?
We choose to replace Selenium IDE by Katalon and there is a huge work because we have to migrate all our non-regression test.


#9

Armbruster,

We are in National Holidays (TET holidays) and will be back to the office next week. We will discuss with the development team then and get back to you with the ETA.


#10

The topic is moved to New Feature/Suggestion for further discussion


#11

This one would be really useful in my opinion. I kinda desire it


#12

Please press the Upvote button, If you would give this new feature some more attention.


#13

I would like to emphasize this requirement, in addition to my upvote, by way of argument, because this felt extremely annoying restriction has forced me several times to confusing callTestCase() workarounds, which cause further disadvantages, e.g. when using Test Listeners sensibly:

I disagree with you, Trong Bui, when you suggest a kind of best practice, based on your own handling of test cases and test suites, according to which all test cases in a test suite should function independently of each other. I have worked with other testing software before and neither there nor in Katalon Studio have I ever seen the need to inflate test cases to such an extent that one lost track of completed sensory units or could no longer debug them reasonably.

On the contrary:
With its many options for managing test cases in folders, test suites in folders and test suite collections and custom keywords in packages, Katalon Studio in particular invites you to structure your work flow according to your own needs, which I appreciate very much! For me, however, this inevitably includes the fact that I want to store several related test steps, which I need repeatedly, in individual test cases in order to avoid generating duplicate code. And that means that a test suite MUST offer the possibility to call such test cases repeatedly. If I have to misuse a master test case as a test suite to be able to call all test cases in the desired order and several times if necessary, then I simply lack understanding for this felt superfluous and only hindering restriction. I cannot see what higher purpose this is intended to serve or what dangers it is intended to prevent. I therefore do not consider this requirement to be a nice to have but a must have.

Thanks for this otherwise great software and your effort!


#14

Please add this functionality. We are building are test suites by creating very modular ‘core’ test cases that should be able to be used over an over again (ie switch user). Otherwise, we would need to update a thousand automated test cases anytime the interface changes for 1 test case.


#15

Please add this functionality.


#16

Hello,
Yes, this will be the very great function if it will be available soon.
Thank you.


#17

I am still a fairly new Katalon Studio user but I too consider this a problem. So far, I have a few basic test cases that I would like to call repeatedly (but with different parameters). To duplicate/copy them just doesn’t seem to be the right thing to do. Thank you.


#18

I’d need this functionality as well. In fact, I assumed this was possible until I tried to add the same test case twice in a test suite, and realized that was not possible.

Our approach is the same as already exposed, we create “core” test cases that should be called in several points of a workflow.


#19

Please follow up the status of this enhancement here: https://github.com/katalon-studio/katalon-studio/issues/8


#20

According to this announcement, the problem is said to have been fixed with version 5.8.4.

I am currently using version 5.8.6 and cannot understand how it should work. Still, I can only drag each Test Case only once into a Test Suite or add it with the context menu.

I have even created a new test project for the case that the function should not be downward compatible. Without success. Who knows what to do?