# Email reporting

**URL:** <https://forum.katalon.com/t/email-reporting/11793>\
**Category:** Feature Request\
**Tags:** feature-request, katalon-studio\
**Created:** [June 30, 2018, 3:52am UTC](https://forum.katalon.com/t/email-reporting/11793 "2018-06-30T03:52:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shashi1](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@Shashi1](https://forum.katalon.com/u/Shashi1)\
**Post date:** [June 30, 2018, 3:52am UTC](https://forum.katalon.com/t/email-reporting/11793/1 "2018-06-30T03:52:44Z")

</div>

Hi,  
I want to add the test scenarios which have been executed during test run while sending execution report in email and also wanted to update the subject line of email while send report in email?

is it possible?

i tried to do the setup using below link but didn’t find that how subject line or message body can be updated after completion of test case.  
ex - Test Case execution finished with 80% …

[https://docs.katalon.com/display/KD/Emails+Settings](https://docs.katalon.com/display/KD/Emails+Settings)

---

<div class="post-metadata">

**Author:** ![Liam\_B](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/liam_b/32/647_2.png) [@Liam\_B](https://forum.katalon.com/u/Liam_B)\
**Post date:** [July 4, 2018, 9:46am UTC](https://forum.katalon.com/t/email-reporting/11793/2 "2018-07-04T09:46:01Z")

</div>

> [Shashi](https://forum.katalon.com/profile/6535/Shashi) said:
> 
> Hi,  
> I want to add the test scenarios which have been executed during test run while sending execution report in email and also wanted to update the subject line of email while send report in email?
> 
> is it possible?
> 
> i tried to do the setup using below link but didn’t find that how subject line or message body can be updated after completion of test case.  
> ex - Test Case execution finished with 80% …
> 
> [https://docs.katalon.com/display/KD/Emails+Settings](https://docs.katalon.com/display/KD/Emails+Settings)

Hi Shashi,

Unfortunately, it is not supported yet by Katalon Studio. We will consider it in the future.

Thanks for your suggestion,  
Liam

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [July 4, 2018, 11:38am UTC](https://forum.katalon.com/t/email-reporting/11793/3 "2018-07-04T11:38:41Z")

</div>

Hi Shashi

> is it possible?

Like Liam said, it’s not possible right now in Katalon Studio’s UI to configure the KS email reporting system the way you describe. However…

KS tests run in groovy. In groovy, you can write your own classes (and load them in KS as Keyword classes) which do pretty much anything you want. In other words, you could **write your own reporting/emailing system** that behaves exactly the way you want it to.

Take a look at this comment from another discussion – it shows what my HTML email report looks like _for a single test case_:

> **[How to customize Report Generation?](https://forum.katalon.com/discussion/comment/17763/#Comment_17763)**
>
> Like kazurayam said, write your own. That way you have total and complete control. Here’s what mine look like: They are written out in text, HTML and JSON. For email I use http://caspian.dotconf.net/menu/Software/SendEmail/ image.png

If you want to try this you will need to learn to write your own Keyword classes ([https://docs.katalon.com/display/KD/Define+custom+keywords](https://docs.katalon.com/display/KD/Define+custom+keywords))

You can use Test Listeners ([https://docs.katalon.com/pages/viewpage.action?pageId=5126383](https://docs.katalon.com/pages/viewpage.action?pageId=5126383)) to handle the **start** and **end** methods for your report on disk and add a specialized comment method (as a Keyword method) to each of your test steps which writes additional lines to the report on disk. In my system, the report on disk is only sent as an email if the test case fails.

Here is my Test Listener class where you can see my startReport and endReport methods being used:

```auto
class AnnounceTest extends com.my_company.Report {
  @BeforeTestCase
  def beforeTestCase(TestCaseContext testCaseContext) {
    String tcId = testCaseContext.testCaseId
    startReport(tcId)
    writeAUTMessage '00 - RUNNING TEST: "' + tcId + '" on ' + G["TARGET_URL"]
  }
  
  @AfterTestCase
  def afterTestCase(TestCaseContext testCaseContext) {
    writeAUTMessage '00 - EXIT TEST'
    endReport(testCaseContext.testCaseId)
    if(GlobalVariable.SUITEID) {
      closeBrowser()
    }
  }
}

```

I use this program (for Windows) to send the email: [http://caspian.dotconf.net/menu/Software/SendEmail/](http://caspian.dotconf.net/menu/Software/SendEmail/)

I hope this helps.

---

<div class="post-metadata">

**Author:** ![Shashi1](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@Shashi1](https://forum.katalon.com/u/Shashi1)\
**Post date:** [December 8, 2018, 5:31pm UTC](https://forum.katalon.com/t/email-reporting/11793/4 "2018-12-08T17:31:50Z")

</div>

Thanks you.  
I wrote my utility and imported the same in katalon 🙂

Thanks,  
Shashi

---

<div class="post-metadata">

**Author:** ![avishekbehera87](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/avishekbehera87/32/337_2.png) [@avishekbehera87](https://forum.katalon.com/u/avishekbehera87)\
**Post date:** [December 26, 2018, 11:16am UTC](https://forum.katalon.com/t/email-reporting/11793/5 "2018-12-26T11:16:59Z")

</div>

Could you please share the code or utility you used.?

---

<div class="post-metadata">

**Author:** ![Jass](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/jass/32/9588_2.png) [@Jass](https://forum.katalon.com/u/Jass)\
**Post date:** [February 28, 2020, 12:35pm UTC](https://forum.katalon.com/t/email-reporting/11793/6 "2020-02-28T12:35:28Z")

</div>


