Skip tests with the same key word in TC name

Hello am new to using Katalon Studio. As a QA, in many of my test cases I use the word PLACEHOLDER to mark incomplete test cases (waiting on developers to fix bugs).

If I want to skip these PLACEHOLDER tests during Test Suite automation testing how would I go about that? I’ve tried using the created sample in Test Listner but am not sure how.

Thank you.

1 Like

See the following screenshot.

The Test Suite “TS” has 4 Test Cases comprising it.

  • A
  • B_PLACEHOLDER
  • C
  • D_PLACEHOLDER

In the Test Suite definition, you can choose the Run button toggle On or Off.
I manually chose Run=Off for B_PLACEHOLDER and D_PLACEHOLDER.

When I ran the TS, I saw messages from the A and C but not from B_xxx and D_xxx.

You can not set Run=On/Off by the names of Test Cases. Katalon Studio has no such feature. You can choose the option only manually.

2 Likes

You can also use the Search field to filter them by name and togle them on/off, see for example:
Unfiltered

Filtered

the bad part is, you have to still toggle them on/of one by one, clicking on the header checkbox will select/deselect all of them, not only the filtered ones.
nasty behaviour …

1 Like

@lisa.ridl

Do you want a programatical solution?

Let me assue I have a Test suite TS. Then in the directory <projectDir>/Test Suite/ I find a file named TS.ts, which has the following content:

<?xml version="1.0" encoding="UTF-8"?>
<TestSuiteEntity>
   <description></description>
   <name>TS</name>
   <tag></tag>
   <isRerun>false</isRerun>
   <mailRecipient></mailRecipient>
   <numberOfRerun>0</numberOfRerun>
   <pageLoadTimeout>30</pageLoadTimeout>
   <pageLoadTimeoutDefault>true</pageLoadTimeoutDefault>
   <rerunFailedTestCasesOnly>false</rerunFailedTestCasesOnly>
   <rerunImmediately>false</rerunImmediately>
   <testSuiteGuid>0ae3e1e4-b582-4836-882b-a1124f6f2b87</testSuiteGuid>
   <testCaseLink>
      <guid>3e42d07c-4c23-4254-8ad7-27f3f48ef388</guid>
      <isReuseDriver>false</isReuseDriver>
      <isRun>true</isRun>
      <testCaseId>Test Cases/A</testCaseId>
      <usingDataBindingAtTestSuiteLevel>true</usingDataBindingAtTestSuiteLevel>
   </testCaseLink>
   <testCaseLink>
      <guid>4d8d35ce-42d3-4060-b2e5-1e9d3c5f94e6</guid>
      <isReuseDriver>false</isReuseDriver>
      <isRun>false</isRun>
      <testCaseId>Test Cases/B_PLACEHOLDER</testCaseId>
      <usingDataBindingAtTestSuiteLevel>true</usingDataBindingAtTestSuiteLevel>
   </testCaseLink>
   <testCaseLink>
      <guid>047aca1d-3309-4d1b-b242-ce26c1a0e75b</guid>
      <isReuseDriver>false</isReuseDriver>
      <isRun>true</isRun>
      <testCaseId>Test Cases/C</testCaseId>
      <usingDataBindingAtTestSuiteLevel>true</usingDataBindingAtTestSuiteLevel>
   </testCaseLink>
   <testCaseLink>
      <guid>13b85ac2-f35f-4f96-b5b9-2ca6e5aa6d2a</guid>
      <isReuseDriver>false</isReuseDriver>
      <isRun>false</isRun>
      <testCaseId>Test Cases/D_PLACEHOLDER</testCaseId>
      <usingDataBindingAtTestSuiteLevel>true</usingDataBindingAtTestSuiteLevel>
   </testCaseLink>
</TestSuiteEntity>

As you can see, the configuration in the Test Suite definition screen is serialized in this XML file. You can find this part:

      <isRun>false</isRun>
      <testCaseId>Test Cases/D_PLACEHOLDER</testCaseId>

Somehow you can change it to

      <isRun>true</isRun>
      <testCaseId>Test Cases/D_PLACEHOLDER</testCaseId>

This change will result the same as you manually toggle the Run=Off/On in the GUI.

You should be able to develop a program that does this change for you. You can design your program so that it checks the name of Test Cases (if it contains a string “PLACEHOLDER” or not) and choose how to set the isRun properties value.

… I personally don’t think this idea is worth practicing. Manual operation would suffice.

1 Like

There is also another feature offered by katalon, named Dynamic test suite.
you can read about such here:

and here:

I never used, it has two drawbacks:

  • It require an enterprise licence
  • It works opposite like the needs for @lisa.ridl.
    It will create a test-suite from a filter matching certain criteria (by ID, name, tag whatsoever) but apparently the filtering mechanism implemented up to now cannot be used to exclude test-cases based on a certain criteria (e.g not equal / not contains a tag)

So Lisa may have to change the approach and tag only fully implemented testcases with a certain whitelist flag and use that, the PLACEHOLDER ones should not have it.

Feel free to give it a try, as I mentioned I don’t have a licence so cannot explore it.

1 Like