ISSUE 1: Unable to send/read mails using javamail/javaxmail after you upgraded your jdk to 11.0.10 or above? The reason is they came up with higher security level for SSL with TLS 1.2 which is dependency for latest jdk, find the solution below: Possible Exception if you used older version TLS-1.1: javax.net.ssl.sslhandshakeexception Solution: Add below property to your existing Properties. properties.put("mail.imaps.ssl.protocols","TLSv1.2");(IMAP used to read mail) properties.put("mail.smtp.ssl.protocols","TLSv1.2");(SMTP used to send mail) ISSUE 2: Unable to type case Multipart to String? From jdk11(latest version) onwards multipart and string cant be type casted, so we need to use Object to store message content. Solution: for (int i = 0; i < messages.length; i++) { Message message = messages[i]; Object content = message.getContent(); if (content instanceof String) { String body = (String)content; System.out.println...
We know how to execute the whole set of test suite using gradle, here in this blog we show you how do we call specific set of tests with gradle which we have segregated tests based on multiple testng.xml files? Solution: Add below snippet at end of build.gradle file, we will define suites with project property function, and we will pass these suite objects to useTestNG function by validating user defined suite name with passed suite object. ===================================== def suite1=project.hasProperty("suite1") def suite2=project.hasProperty("suite2") def suite3=project.hasProperty("suite3") test { testLogging { exceptionFormat = 'full' events = ["passed", "failed", "skipped"] showStandardStreams = true } useTestNG() { /*This XML file is to execute first test suite*/ if(project.hasProperty("suite1")) { suites "test...