Currently the report is show there are 3 tests, because it count based on annotation @Test
My expectation is the report should recognize 1 test.
Any other way to count Test based on Group instead of @Test?
Hoang,
Â
If you would like to group two or more @Test methods based on the group to which they belong to, then you would need to build the reporting mechanism on your own. I don’t think there are any reporters that are out there, which gives you this grouping out of the box.
Â
You would start off by building an implementation of IReporter wherein you build both the logical grouping based on group names and also the view part of it.
Â
Thanks & Regards
Krishnan Mahadevan
Â
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @Â http://wakened-cognition.blogspot.com/
My Technical Scribbings @Â http://rationaleemotions.wordpress.com/
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Hoang,
Â
TestNG by default recognizes the small unit of work (a testcase) as a method that is annotated using @Test annotation.
Â
So if you would like TestNG to treat a class as a Test case (a class which houses one or more @Test annotated methods ), then again, you would need to build this on your own in an org.testng.IReporter implementation. I don’t think there’s any reporter implementation out there which can do this for you.
Â
Thanks & Regards
Krishnan Mahadevan
Â
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @Â http://wakened-cognition.blogspot.com/
My Technical Scribbings @Â http://rationaleemotions.wordpress.com/
Â
From: <testng...@googlegroups.com> on behalf of Hoang Nguyen <tind...@gmail.com>
Reply-To: <testng...@googlegroups.com>
Date: Thursday, May 18, 2017 at 4:08 PM
To: testng-users <testng...@googlegroups.com>
--
package TestLab.May.May18th.Test_Chrome;
import Libs.Utils.*;
import FrameWork.*;
import Libs.Customer.*;
import Libs.CustomerPayments.*;
import Libs.AdminDev.*;
import Libs.WebMail.*;
import Libs.ComData.*;
import Libs.WinApp.*;
import Libs.Appium.*;
import autoitx4java.AutoItX;
import org.openqa.selenium.WebDriver;
import io.appium.java_client.remote.MobileCapabilityType;
import org.testng.annotations.*;
import org.sikuli.script.*;
import java.util.Map;
import java.util.HashMap;
import java.util.Arrays;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.AppiumDriver;
import org.openqa.selenium.chrome.ChromeDriver;
@Test(groups = {"Test00"})
public class Test00
{
WebDriver Chrome2;
Customer_Common Customer_Common_Chrome2;
Customer_Login Customer_Login_Chrome2;
@BeforeMethod(alwaysRun = false)
protected void AAsetUp() throws Exception
{
System.setProperty("webdriver.chrome.driver", "D:\\AutoTest\\Java\\WebDriver\\chromedriver.exe");
Utils.loadJacobLibraries();
AutoItX autoIT_Chrome2 = new AutoItX();
Map<String, Object> plugin_Chrome2 = new HashMap<String, Object>();
plugin_Chrome2.put("enabled", false);
plugin_Chrome2.put("name", "Chrome PDF Viewer");
Map<String, Object> prefs_Chrome2 = new HashMap<String, Object>();
prefs_Chrome2.put("download.default_directory","D:\\AutoTest\\TestData\\Files\\Download");;
prefs_Chrome2.put("profile.default_content_settings.popups", 0);
prefs_Chrome2.put("plugins.plugins_list", Arrays.asList(plugin_Chrome2));
prefs_Chrome2.put("credentials_enable_service", false);
prefs_Chrome2.put("profile.password_manager_enabled", false);
DesiredCapabilities caps_Chrome2 = DesiredCapabilities.chrome();
ChromeOptions options_Chrome2 = new ChromeOptions();
options_Chrome2.setExperimentalOption("prefs", prefs_Chrome2);
options_Chrome2.addArguments("start-maximized");
options_Chrome2.addArguments("disable-infobars");
caps_Chrome2.setCapability(ChromeOptions.CAPABILITY, options_Chrome2);
caps_Chrome2.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
Chrome2 = new ChromeDriver(caps_Chrome2);
Buffer.Add("Chrome2",autoIT_Chrome2.winGetHandle("data:, - Google Chrome"));
Customer_Common_Chrome2 = new Customer_Common(Chrome2);
Customer_Login_Chrome2 = new Customer_Login(Chrome2);
}
@Test(alwaysRun = false)
public void Test00() throws Exception
{
Utils.RearrangeTCResultsLogFile("D:\\AutoTest\\TestScriptsRepository\\TestLab\\May\\May18th\\Results\\Test_Chrome\\Test00");
Customer_Common_Chrome2.LaunchBrowser("https://mail.google.com");
Customer_Login_Chrome2.Login("us...@gmail.com", "Password", "true", "null");
}
@AfterMethod(alwaysRun = true)
protected void ZZCleanUP_1() throws Exception
{
Utils.CleanUp();
Customer_Login_Chrome2.Logout();
}
@AfterMethod(alwaysRun = true)
protected void ZZCleanUP_2() throws Exception
{
Utils.CleanUp();
Customer_Common_Chrome2.CloseBrowser();
}
}