Thanks Krishnan for the info 😊 I would post the sample project once I am in front of my system.
To answer your questions:
I create the driver instance in before test and putting the same in hasp map and for parallel runs - I created threads and calling current thread inside my test method.
During this run - this is just for single run (not parallel) and preserve order is set to true.
I tried calling classes in testNG in different order - say I have put that in my second class and during the end of second class it happens again. Hence tried running that class alone which didn't created any issue. Also tried with just two classes - with problematic class as first class - again it ran properly. It happens only when I have all 4 classes.
I have my default reporting enabled in my listener. When I just run single classes or two classes - it creates emailable report properly. This doesn't get created only if any of my test fails. Not sure whether it's because of specific TestNG version.
I am using log4j logger and even reporter.log but still in this specific case I am not seeing any exceptions. For other failures - I do see.
Thanks
Pavithra
Sent from my iPhone