Site icon Vinsguru

QTP/UFT – Sending out Email with Test Results using Jenkins

I had already explained in this article that we do a smoke test after every build to confirm if the critical functionalities of the application is working fine or if the application is testable. We do that by selecting few important test cases from the automated regression suite & execute that as part of every build to get the immediate feedback about the application. I will show you how we can achieve this using UFT/QTP.

 

Smoke Test Script:

First I need a working QTP/UFT script. I have uploaded a sample QTP/UFT script as part of this article. So, We can reuse the same script as our smoke test script.

 

Test Results:

We need our QTP/UFT script to create a decent HTML report.  I created a VBScript utility to create a simple HTML result file as given below.

Below code will produce the above HTML table. I have uploaded this in the GitHub repository. You can leave a star :),  clone the script, modify & play around!!

Jenkins EMail Notification:

We have a working QTP/UFT script. We also have modified the script to create a report in format we want. Now we need to send this out to the entire team once the test is done.

This is very simple and straight forward.

 

I have used gmail smtp server just for this article – demo. You can use your organization smtp server details. If you would like to use gmail smtp server – ensure that your organization does not block the firewall. To check if the firewall is open or not, use this in command prompt & you should be able to connect -> telnet smtp.gmail.com 465.

 

Summary:

Sending out email notification is very simple to configure and improves your current test process. This automated smoke test process works great for us & helps us to get the immediate feedback about latest code after deployment. In case of issues Dev team can look into the issue immediately instead of waiting for the QA team to test and report the issue which could increase the downtime in case of critical issues.

Please leave a comment below for any questions/suggestions/appreciation!!

 

Happy Testing 🙂

 

 

Share This:

Exit mobile version