# Test Listeners

**URL:** <https://forum.katalon.com/t/test-listeners/8671>\
**Category:** Miscellaneous\
**Tags:** integrations\
**Created:** [December 27, 2017, 9:39am UTC](https://forum.katalon.com/t/test-listeners/8671 "2017-12-27T09:39:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanaya\_Jena](https://avatars.discourse-cdn.com/v4/letter/t/e47c2d/32.png) [@Tanaya\_Jena](https://forum.katalon.com/u/Tanaya_Jena)\
**Post date:** [December 27, 2017, 9:39am UTC](https://forum.katalon.com/t/test-listeners/8671/1 "2017-12-27T09:39:00Z")

</div>

Can any one help me for this scenario. I have 50 test cases and added into one test suit .my goal is that i have to write one more @BeforetestCase listener ,that has to execute only for 9 test cases and for remaining 41 test-cases it should not execute .How can i handle this ? or any alternative is there ? Please reply. thanks in advance

---

<div class="post-metadata">

**Author:** ![Trong\_Bui](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/trong_bui/32/374_2.png) [@Trong\_Bui](https://forum.katalon.com/u/Trong_Bui)\
**Post date:** [December 27, 2017, 12:52pm UTC](https://forum.katalon.com/t/test-listeners/8671/2 "2017-12-27T12:52:15Z")

</div>

Tanaya,

I think the scope of Test Case listener is entire Test Suite, so we should handle them in 2 different test suites. So far, I think about 2 solutions for this issue:  
1 - Create Setup/Teardown function for each Test Suite. These Setup/Teardown functions will be executed before/after each Test case’s execution.  
This is a most suitable solution to handle the case. Unfortunately, this feature still in our backlog for next releases.  
2 - Create a common Test case storing all behavior of the listener function you want to created. Then use Calling test case built-in keyword to add it into those 9 test cases.

---

<div class="post-metadata">

**Author:** ![Tanaya\_Jena](https://avatars.discourse-cdn.com/v4/letter/t/e47c2d/32.png) [@Tanaya\_Jena](https://forum.katalon.com/u/Tanaya_Jena)\
**Post date:** [December 28, 2017, 7:37am UTC](https://forum.katalon.com/t/test-listeners/8671/3 "2017-12-28T07:37:10Z")

</div>

Okay Thanks for your suggestion, let me try once with above solutions
