In my code I use @AfterMethod to see the reportURL of the execution of the test.
I’m trying to use GMAIL SMTP to send it by e-mail everytime a test finishes. Do you guys know if it’s possible do it like:
> @AfterMethod
public void tearDown(ITestResult tr){
driver.removeApp(“com.consul.android.smartbeer.staging”);
if (driver!=null)
{
if (tr.isSuccess())
{
client.report(“Test has passed”, true);
}
else {
client.report(“Test has failed”, false);
}
System.out.println(“report URL : " + driver.getCapabilities().getCapability(“reportUrl”));
driver.quit();
// mailTo(lucas_m_santos@whirlpool.com).body(”"+reportURL)
}}