ARMBRUSTER
Katalon Ambassador
02/07/2018

Call a test case several times in a test suite

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 
Upvote
Quote

Comments

  • Ana Hong
    Katalon Apprentice
    02/08/2018
    You can't call duplicate test cases in a Test Suite. You should suggest these features to Katalon team as well.
    Upvote
    Quote
  • ARMBRUSTER
    Katalon Ambassador
    02/08/2018
    It could be a great improvement because I have a test case that is repeated many times with different parameters.
    Upvote
    Quote
  • toutain axel
    Katalon Apprentice
    02/08/2018
    True, I would love something like that.
    Could be really usefull.
    Upvote
    Quote
  • Trong Bui
    Katalon Moderator
    02/09/2018
    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?
    Upvote
    Quote
  • toutain axel
    Katalon Apprentice
    02/12/2018
    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.
    Upvote
    Quote
  • Trong Bui
    Katalon Moderator
    02/14/2018
    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.
    Upvote
    Quote
  • ARMBRUSTER
    Katalon Ambassador
    02/14/2018
    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. 
    Upvote
    Quote
  • Trong Bui
    Katalon Moderator
    02/16/2018
    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.
    Upvote
    Quote
  • Trong Bui
    Katalon Moderator
    03/15/2018
    The topic is moved to New Feature/Suggestion for further discussion
    Upvote
    Quote
  • Branimir Viljevac
    Katalon Apprentice
    05/17/2018
    This one would be really useful in my opinion. I kinda desire it
    Upvote
    Quote
  • Gerard van der Winkel
    Katalon Ambassador
    05/25/2018
    Please press the Upvote button, If you would give this new feature some more attention.
    Upvote
    Quote
  • Drunda Nibel
    Katalon Ambassador
    07/11/2018
    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!
    Upvote
    Quote
  • Alex Weber
    Katalon Apprentice
    07/12/2018
    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.
    Upvote
    Quote
  • Zepri Hasiholan Togatorop
    Katalon Apprentice
    07/18/2018
    Please add this functionality.
    Upvote
    Quote
  • Katalon user
    Katalon Apprentice
    07/18/2018
    Hello,
    Yes, this will be the very great function if it will be available soon. 
    Thank you. 
    Upvote
    Quote
  • Lynn B.
    Katalon Apprentice
    08/02/2018
    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.    
    Upvote
    Quote
  • Alejandro Aroca
    Katalon Apprentice
    08/24/2018
    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.
    Upvote
    Quote
Sign In or Register to comment.