Test Complete - Send Email Function in Test Complete
Hi all,
I have this python script that sends out email when all test completed, how can I send an email when the tests failed. similar to this one. So Stop Project On Error and send email
def Test():
if SendMail("testerone@home.com, testertwo@home.com", "mail.ccc.govt.nz", "Tessie Tester", "tessietester@home.com",
"Standard HCEA Online Forms", "Hello Team, all the following tests has passed in HCEA QAS:"
"\n \n Report an Issue \n"
" - A01 - Create Feedback Complaint Ticket\n"
" - A02 - Create Feedback Compliment Ticket\n"
" - A03 - Create Feedback Suggestion Ticket\n"
" - A04 - Create Dog Problem Ticket\n"
" - A05 - Create Dog Education Training Session Ticket\n"
" - A06 - Create Security Issue Ticket\n"
" - A07 - Create Pests, Odour Or Insect Problem Ticket\n"
" - A08 - Create Trees, Weeds Or Grass Problem Ticket\n"
" - A09 - Create Water Problem Ticket\n"
" - A10 - Create Assisted Wheelie Bin Collection Ticket\n"
" - A11 - Create Damage Maintenance Issue Ticket\n"
" - A12 - Create Pressure Wastewater System Ticket\n"
" - A13 - Create Graffiti In a Public Place Ticket\n"
" - A14 - Create Litter In a Public Place Ticket\n"
" - A15 - Create Potholes Ticket\n"
" - A16 - Create Road Hazard Ticket"
"\n \n Report an Issue - Log In Required \n - B01 - Create Damage Missing Wheelie Ticket\n"
" - B02 - Create Missed Wheelie Bin Collection Ticket\n"
" - B03 - Create Wheelie Bins At New Property Ticket"
"\n \n \n Kind Regards,\n \n Colin"):
Log.Message("Mail was sent")
else:
Log.Warning("Mail was not sent")