├── .classpath ├── .gitignore ├── .gitignore.txt ├── .project ├── .settings ├── org.eclipse.core.resources.prefs ├── org.eclipse.jdt.core.prefs └── org.eclipse.m2e.core.prefs ├── ExtentReports └── Test Report.html ├── debug.log ├── docker-compose.yaml ├── dockerDown.bat ├── dockerUp.bat ├── output.txt ├── pom.xml ├── scaleChrome.bat ├── scaleFirefox.bat ├── src ├── main │ └── java │ │ └── com │ │ ├── listener │ │ ├── AnnotationTransformer.java │ │ ├── ListenerClass.java │ │ └── RetryFailedTestCases.java │ │ ├── main │ │ ├── DriverFactory.java │ │ └── DriverManager.java │ │ ├── pages │ │ ├── HomePage.java │ │ └── SignInPage.java │ │ ├── reports │ │ ├── ExtentFactory.java │ │ ├── ExtentManager.java │ │ └── LogStatus.java │ │ └── utilities │ │ ├── Constants.java │ │ ├── ExcelUtilities.java │ │ └── TestUtils.java └── test │ ├── java │ └── com │ │ └── testcases │ │ ├── BaseTest.java │ │ ├── HomePageTests.java │ │ └── SignInPageTests.java │ └── resources │ ├── chromedriver.exe │ ├── config.properties │ ├── extentreport.xml │ ├── geckodriver.exe │ └── testdata.xlsx ├── target ├── maven-status │ └── maven-compiler-plugin │ │ ├── compile │ │ └── default-compile │ │ │ ├── createdFiles.lst │ │ │ └── inputFiles.lst │ │ └── testCompile │ │ └── default-testCompile │ │ ├── createdFiles.lst │ │ └── inputFiles.lst ├── surefire-reports │ ├── Suite │ │ ├── Test.html │ │ ├── Test.xml │ │ └── testng-failed.xml │ ├── TEST-TestSuite.xml │ ├── TestSuite.txt │ ├── collapseall.gif │ ├── emailable-report.html │ ├── index.html │ ├── jquery-1.7.1.min.js │ ├── junitreports │ │ ├── TEST-com.testcases.HomePageTests.xml │ │ └── TEST-com.testcases.SignInPageTests.xml │ ├── old │ │ ├── Suite │ │ │ ├── Test.properties │ │ │ ├── classes.html │ │ │ ├── groups.html │ │ │ ├── index.html │ │ │ ├── main.html │ │ │ ├── methods-alphabetical.html │ │ │ ├── methods-not-run.html │ │ │ ├── methods.html │ │ │ ├── reporter-output.html │ │ │ ├── testng.xml.html │ │ │ └── toc.html │ │ └── index.html │ ├── testng-failed.xml │ ├── testng-reports.css │ ├── testng-reports.js │ ├── testng-results.xml │ └── testng.css └── test-classes │ ├── chromedriver.exe │ ├── config.properties │ ├── extentreport.xml │ ├── geckodriver.exe │ └── testdata.xlsx ├── test-output ├── Default suite │ ├── Default test.html │ ├── Default test.xml │ └── testng-failed.xml ├── Suite │ ├── Test.html │ ├── Test.xml │ └── testng-failed.xml ├── collapseall.gif ├── emailable-report.html ├── index.html ├── jquery-1.7.1.min.js ├── junitreports │ ├── TEST-com.testcases.HomePageTests.xml │ └── TEST-com.testcases.SignInPageTests.xml ├── old │ ├── Default suite │ │ ├── Default test.properties │ │ ├── classes.html │ │ ├── groups.html │ │ ├── index.html │ │ ├── main.html │ │ ├── methods-alphabetical.html │ │ ├── methods-not-run.html │ │ ├── methods.html │ │ ├── reporter-output.html │ │ ├── testng.xml.html │ │ └── toc.html │ ├── Suite │ │ ├── Test.properties │ │ ├── classes.html │ │ ├── groups.html │ │ ├── index.html │ │ ├── main.html │ │ ├── methods-alphabetical.html │ │ ├── methods-not-run.html │ │ ├── methods.html │ │ ├── reporter-output.html │ │ ├── testng.xml.html │ │ └── toc.html │ └── index.html ├── testng-failed.xml ├── testng-reports.css ├── testng-reports.js ├── testng-results.xml └── testng.css ├── testng.xml ├── zaleniumDown.bat └── zaleniumUp.bat /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | *.jpg 4 | *.png 5 | /target/ 6 | -------------------------------------------------------------------------------- /.gitignore.txt: -------------------------------------------------------------------------------- 1 | *.html 2 | *.png -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | UsingDocker 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 3 | org.eclipse.jdt.core.compiler.compliance=1.8 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.source=1.8 6 | -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | # To execute this docker-compose yml file use `docker-compose -f up` 2 | # Add the `-d` flag at the end for detached execution 3 | version: "3" 4 | services: 5 | selenium-hub: 6 | image: selenium/hub:latest 7 | container_name: selenium-hub 8 | ports: 9 | - "4444:4444" 10 | chrome: 11 | image: selenium/node-chrome-debug:latest 12 | volumes: 13 | - /dev/shm:/dev/shm 14 | depends_on: 15 | - selenium-hub 16 | environment: 17 | - HUB_HOST=selenium-hub 18 | - HUB_PORT=4444 19 | firefox: 20 | image: selenium/node-firefox-debug:latest 21 | volumes: 22 | - /dev/shm:/dev/shm 23 | depends_on: 24 | - selenium-hub 25 | environment: 26 | - HUB_HOST=selenium-hub 27 | - HUB_PORT=4444 -------------------------------------------------------------------------------- /dockerDown.bat: -------------------------------------------------------------------------------- 1 | docker-compose down -------------------------------------------------------------------------------- /dockerUp.bat: -------------------------------------------------------------------------------- 1 | docker-compose -f docker-compose.yaml up >>output.txt -------------------------------------------------------------------------------- /output.txt: -------------------------------------------------------------------------------- 1 | Docker binary already present, will use that one. 2 | Docker version 18.09.0, build 4d60db4 3 | -- LOG 06:33:55:012687100 Ensuring docker works... 4 | -- LOG 06:33:55:065651600 Ensuring docker-selenium is available... 5 | haveged: haveged starting up 6 | Copying files for Dashboard... 7 | cp: cannot create regular file '/home/seluser/videos/dashboard.html': No such file or directory 8 | Starting Nginx reverse proxy... 9 | Starting Selenium Hub... 10 | ..06:33:55.808 [main] INFO o.o.grid.selenium.GridLauncherV3 - Selenium server version: 3.141.59, revision: unknown 11 | .06:33:55.879 [main] INFO o.o.grid.selenium.GridLauncherV3 - Launching Selenium Grid hub on port 4445 12 | .06:33:56.133 [main] INFO d.z.e.z.c.DockerContainerClient - About to clean up any left over DockerSelenium containers created by Zalenium 13 | ..06:33:56.718 [AutoStartProxyPoolPoller] INFO d.z.e.z.proxy.AutoStartProxySet - Starting poller. 14 | ...06:33:57.170 [main] INFO d.z.ep.zalenium.aspect.HubAspect - Registering custom Zalenium servlets 15 | 06:33:57.257 [main] INFO org.openqa.grid.web.Hub - Selenium Grid hub is up and running 16 | 06:33:57.257 [main] INFO org.openqa.grid.web.Hub - Nodes should register to http://172.17.0.2:4445/grid/register/ 17 | 06:33:57.258 [main] INFO org.openqa.grid.web.Hub - Clients should connect to http://172.17.0.2:4445/wd/hub 18 | Selenium Hub started! 19 | Sauce Labs not enabled... 20 | Browser Stack not enabled... 21 | TestingBot not enabled... 22 | CBT not enabled... 23 | LambdaTest not enabled... 24 | Zalenium is now ready! 25 | *************************************** Data Processing Agreement *************************************** 26 | By using this software you agree that the following non-PII (non personally identifiable information) 27 | data will be collected, processed and used by Zalando SE for the purpose of improving our test 28 | infrastructure tools. Anonymisation with respect of the IP address means that only the first two octets 29 | of the IP address are collected. 30 | 31 | See the complete license at https://github.com/zalando/zalenium/blob/master/LICENSE.md 32 | *************************************** Data Processing Agreement *************************************** 33 | 06:34:03.114 [Thread-10] INFO d.z.e.z.registry.ZaleniumRegistry - Registered a node http://172.17.0.3:40000 34 | 06:34:03.643 [Thread-11] INFO d.z.e.z.registry.ZaleniumRegistry - Registered a node http://172.17.0.4:40001 35 | 06:34:13.510 [qtp109069556-23] INFO o.o.g.w.s.handler.RequestHandler - Got a request to create a new session: Capabilities {browserName: chrome, version: } 36 | 06:34:13.511 [qtp109069556-21] INFO o.o.g.w.s.handler.RequestHandler - Got a request to create a new session: Capabilities {acceptInsecureCerts: true, browserName: firefox, version: } 37 | 06:34:13.515 [qtp109069556-23] INFO d.z.e.z.registry.ZaleniumRegistry - Adding sessionRequest for {browserName=chrome, version=} 38 | 06:34:13.516 [qtp109069556-21] INFO d.z.e.z.registry.ZaleniumRegistry - Adding sessionRequest for {browserName=firefox, version=, acceptInsecureCerts=true} 39 | 06:34:13.518 [http://172.17.0.3:40000] INFO org.openqa.grid.internal.TestSlot - Trying to create a new session on test slot {server:CONFIG_UUID=be819b1f-e1bf-4f70-be2a-80d286a4e605, seleniumProtocol=WebDriver, zal:tz=Europe/Berlin, version=77.0.3865.90, platform=LINUX, acceptSslCerts=true, zal:screenResolution=1920x1080, zal:screen-resolution=1920x1080, browserName=chrome, zal:resolution=1920x1080, maxInstances=1, platformName=LINUX} 40 | 06:34:13.521 [Matcher thread] INFO d.z.e.z.registry.ZaleniumRegistry - Test session with internal key 222a84ac-f043-460a-9a1f-a2f9704a9c66 assigned to remote (http://172.17.0.3:40000) after 0 seconds (54 ms). 41 | 06:34:13.526 [http://172.17.0.4:40001] INFO org.openqa.grid.internal.TestSlot - Trying to create a new session on test slot {server:CONFIG_UUID=e17e3d8f-afd9-4b36-a04a-b2135c08dbc1, seleniumProtocol=WebDriver, zal:tz=Europe/Berlin, version=69.0, platform=LINUX, acceptSslCerts=true, zal:screenResolution=1920x1080, zal:screen-resolution=1920x1080, browserName=firefox, zal:resolution=1920x1080, maxInstances=1, platformName=LINUX} 42 | 06:34:13.531 [Matcher thread] INFO d.z.e.z.registry.ZaleniumRegistry - Test session with internal key ec054384-b709-4479-9308-694af88c0329 assigned to remote (http://172.17.0.4:40001) after 0 seconds (65 ms). 43 | 06:34:39.632 [http://172.17.0.4:40001] INFO d.z.e.z.p.DockerSeleniumRemoteProxy - Session ec054384-b709-4479-9308-694af88c0329 completed. Node should shutdown soon... 44 | 06:34:54.805 [http://172.17.0.3:40000] INFO d.z.e.z.p.DockerSeleniumRemoteProxy - Session 222a84ac-f043-460a-9a1f-a2f9704a9c66 completed. Node should shutdown soon... 45 | Trapped SIGTERM/SIGINT so shutting down Zalenium gracefully... 46 | -- LOG 06:34:56:850634100 WaitForVideosTransferred succeeded for a total of 1 47 | Stopping Hub... 48 | 06:34:56.857 [DockerContainerClient shutdown hook] INFO d.z.e.z.c.DockerContainerClient - About to clean up any left over DockerSelenium containers created by Zalenium 49 | *************************************** Data Processing Agreement *************************************** 50 | By using this software you agree that the following non-PII (non personally identifiable information) 51 | data will be collected, processed and used by Zalando SE for the purpose of improving our test 52 | infrastructure tools. Anonymisation with respect of the IP address means that only the first two octets 53 | of the IP address are collected. 54 | 55 | See the complete license at https://github.com/zalando/zalenium/blob/master/LICENSE.md 56 | *************************************** Data Processing Agreement *************************************** 57 | 06:34:56.869 [Saving dashboard.] INFO d.z.ep.zalenium.dashboard.Dashboard - Saving dashboard... 58 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | ParallelTestFramework 6 | UsingDocker 7 | 0.0.1-SNAPSHOT 8 | 9 | 10 | 11 | 12 | maven-compiler-plugin 13 | 3.3 14 | 15 | 1.8 16 | 1.8 17 | 18 | 19 | 20 | org.apache.maven.plugins 21 | maven-surefire-plugin 22 | 2.18.1 23 | 24 | 0 25 | 26 | testng.xml 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | UTF-8 35 | 1.6 36 | 1.6 37 | 38 | 39 | 40 | 41 | 42 | 43 | org.testng 44 | testng 45 | 6.14.3 46 | compile 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | org.seleniumhq.selenium 56 | selenium-java 57 | 3.141.59 58 | 59 | 60 | 61 | org.apache.directory.studio 62 | org.apache.commons.io 63 | 2.4 64 | 65 | 66 | 67 | 68 | org.apache.poi 69 | poi 70 | 3.16-beta2 71 | 72 | 73 | 74 | 75 | org.apache.poi 76 | poi-ooxml 77 | 3.9 78 | 79 | 80 | org.apache.poi 81 | poi-ooxml-schemas 82 | 3.9 83 | 84 | 85 | org.apache.poi 86 | poi-scratchpad 87 | 3.9 88 | 89 | 90 | org.apache.poi 91 | ooxml-schemas 92 | 1.1 93 | 94 | 95 | 96 | org.apache.poi 97 | openxml4j 98 | 1.0-beta 99 | 100 | 101 | org.apache.poi 102 | poi 103 | 3.9 104 | 105 | 106 | org.apache.poi 107 | poi-ooxml 108 | 3.9 109 | 110 | 111 | org.apache.poi 112 | poi-ooxml-schemas 113 | 3.9 114 | 115 | 116 | org.apache.poi 117 | poi-scratchpad 118 | 3.9 119 | 120 | 121 | org.apache.poi 122 | ooxml-schemas 123 | 1.1 124 | 125 | 126 | 127 | org.apache.poi 128 | openxml4j 129 | 1.0-beta 130 | 131 | 132 | 133 | org.apache.commons 134 | commons-email 135 | 1.5 136 | 137 | 138 | 139 | javax.mail 140 | javax.mail-api 141 | 1.6.0 142 | 143 | 144 | 145 | com.relevantcodes 146 | extentreports 147 | 2.41.2 148 | 149 | 150 | 151 | 152 | 153 | 154 | -------------------------------------------------------------------------------- /scaleChrome.bat: -------------------------------------------------------------------------------- 1 | docker-compose scale chrome=5 -------------------------------------------------------------------------------- /scaleFirefox.bat: -------------------------------------------------------------------------------- 1 | docker-compose scale firefox=5 -------------------------------------------------------------------------------- /src/main/java/com/listener/AnnotationTransformer.java: -------------------------------------------------------------------------------- 1 | package com.listener; 2 | 3 | import java.io.FileInputStream; 4 | import java.lang.reflect.Constructor; 5 | import java.lang.reflect.Method; 6 | import java.util.ArrayList; 7 | 8 | import org.apache.poi.xssf.usermodel.XSSFSheet; 9 | import org.apache.poi.xssf.usermodel.XSSFWorkbook; 10 | import org.testng.IAnnotationTransformer; 11 | import org.testng.annotations.ITestAnnotation; 12 | 13 | import com.utilities.Constants; 14 | import com.utilities.ExcelUtilities; 15 | 16 | 17 | public class AnnotationTransformer implements IAnnotationTransformer{ 18 | int count=0; 19 | 20 | ExcelUtilities excel= new ExcelUtilities(); 21 | 22 | 23 | ArrayList testcases= new ArrayList(); 24 | ArrayList testDescription= new ArrayList(); 25 | ArrayList runStatus= new ArrayList(); 26 | 27 | 28 | @Override 29 | public void transform(ITestAnnotation annotation, Class arg1, Constructor arg2, Method testMethod) { 30 | try { 31 | 32 | excel.fis=new FileInputStream(Constants.testDataLocation); 33 | excel.workbook= new XSSFWorkbook(excel.fis); 34 | excel.sheet=excel.workbook.getSheet("RunManager"); 35 | loadTestCases(); 36 | for(int i=0;i dr = new ThreadLocal(); 8 | 9 | public static WebDriver getDriver() { 10 | 11 | return dr.get(); 12 | 13 | } 14 | 15 | public static void setWebDriver(WebDriver driver) { 16 | 17 | dr.set(driver); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/pages/HomePage.java: -------------------------------------------------------------------------------- 1 | package com.pages; 2 | 3 | import org.openqa.selenium.WebDriver; 4 | import org.openqa.selenium.WebElement; 5 | import org.openqa.selenium.support.FindBy; 6 | import org.openqa.selenium.support.PageFactory; 7 | import com.utilities.TestUtils; 8 | 9 | public class HomePage{ 10 | 11 | 12 | @FindBy(xpath="//input[@id='search_query_top']") 13 | WebElement txtbox_search; 14 | 15 | @FindBy(xpath="//button[@name='submit_search']") 16 | WebElement btn_search; 17 | 18 | @FindBy(xpath="//a[contains(text(),'Sign in')]") 19 | WebElement btn_signin; 20 | 21 | TestUtils testutils= new TestUtils(); 22 | private WebDriver driver; 23 | 24 | public HomePage(WebDriver driver) { 25 | this.driver=driver; 26 | PageFactory.initElements(driver, this); 27 | 28 | } 29 | 30 | 31 | public HomePage enterValueToSearch(String value) throws InterruptedException{ 32 | 33 | testutils.sendKeys(txtbox_search, value,"searchBox"); 34 | 35 | return this; 36 | 37 | } 38 | 39 | public void clickSearch() { 40 | testutils.click(btn_search, "Search box"); 41 | } 42 | 43 | public SignInPage clickSignIn() { 44 | System.out.println(Thread.currentThread().getId()); 45 | testutils.click(btn_signin, "Sign In"); 46 | return new SignInPage(driver); 47 | 48 | 49 | } 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/pages/SignInPage.java: -------------------------------------------------------------------------------- 1 | package com.pages; 2 | 3 | import org.openqa.selenium.WebDriver; 4 | import org.openqa.selenium.WebElement; 5 | import org.openqa.selenium.support.FindBy; 6 | import org.openqa.selenium.support.PageFactory; 7 | import org.testng.Assert; 8 | 9 | import com.utilities.TestUtils; 10 | 11 | public class SignInPage extends TestUtils{ 12 | 13 | @FindBy(id="email") 14 | WebElement txtbox_email; 15 | 16 | @FindBy(id="passwd") 17 | WebElement txtbox_pwd; 18 | 19 | @FindBy(id="SubmitLogin") 20 | WebElement btn_submit; 21 | 22 | @FindBy(xpath="//*[@id=\"center_column\"]/div[1]/p") 23 | WebElement msg_error; 24 | 25 | TestUtils testutils= new TestUtils(); 26 | private WebDriver driver; 27 | 28 | public SignInPage(WebDriver driver) { 29 | this.driver=driver; 30 | PageFactory.initElements(driver, this); 31 | 32 | } 33 | 34 | 35 | public void validateErrorMessage(String email, String pwd,String errormessage) { 36 | 37 | testutils.sendKeys(txtbox_email, email, "Email"); 38 | testutils.sendKeys(txtbox_pwd, pwd, "Password"); 39 | testutils.click(btn_submit, "Sign in button"); 40 | Assert.assertEquals(errormessage, msg_error.getText()); 41 | 42 | } 43 | 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/reports/ExtentFactory.java: -------------------------------------------------------------------------------- 1 | package com.reports; 2 | 3 | import com.relevantcodes.extentreports.ExtentTest; 4 | 5 | public class ExtentFactory { 6 | 7 | public static ThreadLocal exTest= new ThreadLocal(); 8 | 9 | 10 | public static ExtentTest getExtTest() { 11 | return exTest.get(); 12 | } 13 | 14 | public static void setExtentTest(ExtentTest test) { 15 | exTest.set(test); 16 | } 17 | 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/reports/ExtentManager.java: -------------------------------------------------------------------------------- 1 | package com.reports; 2 | 3 | import java.io.File; 4 | import java.text.SimpleDateFormat; 5 | import java.util.Date; 6 | 7 | 8 | import com.main.DriverFactory; 9 | import com.relevantcodes.extentreports.DisplayOrder; 10 | import com.relevantcodes.extentreports.ExtentReports; 11 | 12 | 13 | public class ExtentManager { 14 | 15 | private static ExtentReports extent; 16 | private String extentreportpath; 17 | 18 | public ExtentReports getInstance() { 19 | 20 | SimpleDateFormat formatter = new SimpleDateFormat("MMddyyyy_ hh_mm_ss"); 21 | Date date = new Date(); 22 | String currentDate = formatter.format(date); 23 | if(DriverFactory.getOverrideResults().equalsIgnoreCase("yes")) 24 | { 25 | if(DriverFactory.getResultPath().equals("")) 26 | { 27 | extentreportpath=".\\ExtentReports\\Test Report.html"; 28 | } 29 | else { 30 | extentreportpath=DriverFactory.getResultPath()+"\\ExtentReports\\Test Report.html"; 31 | } 32 | } 33 | else 34 | { 35 | if(DriverFactory.getResultPath().equals("")) 36 | { 37 | extentreportpath=".\\ExtentReports\\Test Report_"+currentDate+".html"; 38 | } 39 | 40 | else 41 | { 42 | extentreportpath=DriverFactory.getResultPath()+"\\ExtentReports\\Test Report_"+currentDate+".html"; 43 | 44 | } 45 | 46 | } 47 | if(extent==null) { 48 | extent = new ExtentReports(extentreportpath,true,DisplayOrder.OLDEST_FIRST); 49 | extent.loadConfig(new File(DriverFactory.getExtentConfigLocation())); 50 | } 51 | return extent; 52 | //returns Extent obj 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/reports/LogStatus.java: -------------------------------------------------------------------------------- 1 | package com.reports; 2 | 3 | import com.main.DriverFactory; 4 | import com.utilities.TestUtils; 5 | 6 | public class LogStatus { 7 | 8 | private LogStatus() { 9 | //private to avoid initialization 10 | } 11 | public static void pass(String message) 12 | { 13 | ExtentFactory.getExtTest().log(com.relevantcodes.extentreports.LogStatus.PASS, message); 14 | } 15 | 16 | public static void fail(String message) 17 | { 18 | 19 | ExtentFactory.getExtTest().log(com.relevantcodes.extentreports.LogStatus.FAIL, message); 20 | } 21 | 22 | public static void fail(Exception message) 23 | { 24 | 25 | ExtentFactory.getExtTest().log(com.relevantcodes.extentreports.LogStatus.FAIL, message); 26 | } 27 | 28 | public static void fail(AssertionError a) 29 | { 30 | 31 | ExtentFactory.getExtTest().log(com.relevantcodes.extentreports.LogStatus.PASS, a); 32 | } 33 | 34 | public static void info(String message) 35 | { 36 | 37 | ExtentFactory.getExtTest().log(com.relevantcodes.extentreports.LogStatus.INFO, message); 38 | } 39 | 40 | public static void error(String message) 41 | { 42 | 43 | ExtentFactory.getExtTest().log(com.relevantcodes.extentreports.LogStatus.ERROR, message); 44 | } 45 | 46 | public static void fatal(String message) 47 | { 48 | 49 | ExtentFactory.getExtTest().log(com.relevantcodes.extentreports.LogStatus.FATAL, message); 50 | } 51 | 52 | public static void skip(String message) 53 | { 54 | 55 | ExtentFactory.getExtTest().log(com.relevantcodes.extentreports.LogStatus.SKIP, message); 56 | } 57 | 58 | public static void unknown(String message) 59 | { 60 | 61 | ExtentFactory.getExtTest().log(com.relevantcodes.extentreports.LogStatus.UNKNOWN, message); 62 | } 63 | 64 | public static void warning(String message) 65 | { 66 | 67 | ExtentFactory.getExtTest().log(com.relevantcodes.extentreports.LogStatus.WARNING, message); 68 | } 69 | public static void pass(String string, String addScreenCapture) { 70 | 71 | if(DriverFactory.getPassedStepsScreenshots().equalsIgnoreCase("yes")) { 72 | ExtentFactory.getExtTest().log(com.relevantcodes.extentreports.LogStatus.PASS, string,ExtentFactory.getExtTest().addBase64ScreenShot("data:image/png;base64,"+TestUtils.getBase64Image(addScreenCapture))); 73 | //ExtentReport.logger.log(com.relevantcodes.extentreports.LogStatus.PASS, string,ExtentReport.logger.addBase64ScreenShot("data:image/png;base64,"+TestUtils.getBase64Image(addScreenCapture))); 74 | // ExtentReport.logger.log(com.relevantcodes.extentreports.LogStatus.PASS, string , ExtentReport.logger.addScreenCapture(addScreenCapture)); 75 | } 76 | } 77 | 78 | public static void fail(String string, String addScreenCapture) 79 | { 80 | 81 | if(DriverFactory.getFailedStepsScreenshots().equalsIgnoreCase("yes")) { 82 | ExtentFactory.getExtTest().log(com.relevantcodes.extentreports.LogStatus.FAIL, string,ExtentFactory.getExtTest().addBase64ScreenShot("data:image/png;base64,"+TestUtils.getBase64Image(addScreenCapture))); 83 | // ExtentReport.logger.log(com.relevantcodes.extentreports.LogStatus.PASS, string , ExtentReport.logger.addScreenCapture(addScreenCapture)); 84 | } 85 | 86 | } 87 | 88 | public static void skip(String string, String addScreenCapture) 89 | { 90 | if(DriverFactory.getSkippedStepScreenshots().equalsIgnoreCase("yes")) { 91 | ExtentFactory.getExtTest().log(com.relevantcodes.extentreports.LogStatus.SKIP, string,ExtentFactory.getExtTest().addBase64ScreenShot("data:image/png;base64,"+TestUtils.getBase64Image(addScreenCapture))); 92 | // ExtentReport.logger.log(com.relevantcodes.extentreports.LogStatus.SKIP, string, ExtentReport.logger.addScreenCapture(addScreenCapture)); 93 | } 94 | 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/main/java/com/utilities/Constants.java: -------------------------------------------------------------------------------- 1 | package com.utilities; 2 | 3 | public class Constants { 4 | 5 | public static final String testDataLocation=".//src/test/resources/testdata.xlsx"; 6 | public static final int noOfRetries=0; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/com/utilities/ExcelUtilities.java: -------------------------------------------------------------------------------- 1 | package com.utilities; 2 | 3 | import java.io.FileInputStream; 4 | import java.io.FileNotFoundException; 5 | import java.io.FileOutputStream; 6 | import java.io.IOException; 7 | import java.lang.reflect.Method; 8 | import java.util.ArrayList; 9 | import java.util.Hashtable; 10 | 11 | import org.apache.poi.util.SystemOutLogger; 12 | import org.apache.poi.xssf.usermodel.XSSFSheet; 13 | import org.apache.poi.xssf.usermodel.XSSFWorkbook; 14 | import org.testng.annotations.DataProvider; 15 | 16 | import com.main.DriverFactory; 17 | 18 | 19 | public class ExcelUtilities { 20 | 21 | String path; 22 | String sheetname; 23 | public FileInputStream fis = null; 24 | public FileOutputStream fileOut =null; 25 | public XSSFWorkbook workbook = null; 26 | public XSSFSheet sheet = null; 27 | 28 | 29 | 30 | 31 | /* 32 | * Takes rowname and sheetname as parameter 33 | * return row number based of rowname 34 | */ 35 | 36 | public int getRowNumForRowName(String sheetname,String rowName) { 37 | int rownum=0; 38 | sheet=workbook.getSheet(sheetname); 39 | for(int i=1;i<=getLastRowNum(sheetname);i++) { 40 | if(rowName.equalsIgnoreCase(sheet.getRow(i).getCell(0).getStringCellValue())) { 41 | rownum=i; 42 | break; 43 | } 44 | } 45 | 46 | return rownum; 47 | } 48 | 49 | 50 | /* 51 | * Takes columnname and sheetname as parameter 52 | * return column number based of columnheader 53 | */ 54 | 55 | public int getColumnNumForColumnName(String sheetname, String columnname) { 56 | int colnum=0; 57 | sheet=workbook.getSheet(sheetname); 58 | for(int i=0;i rowscount=getNumberofIterationsForATestCase(sheetname, testcasename); 158 | Object[][] b=new Object[rowscount.size()][1]; 159 | Hashtable table =null; 160 | for(int i=1;i<=rowscount.size();i++) { 161 | table=new Hashtable(); 162 | for(int j=0;j getNumberofIterationsForATestCase(String sheetname,String testcasename) { 175 | ArrayList a=new ArrayList(); 176 | for(int i=1;i<=getLastRowNum(sheetname);i++) { 177 | if(testcasename.equalsIgnoreCase(getCellContent(sheetname, i, 0))) { 178 | a.add(i); 179 | } 180 | } 181 | 182 | return a; 183 | } 184 | 185 | 186 | } 187 | -------------------------------------------------------------------------------- /src/main/java/com/utilities/TestUtils.java: -------------------------------------------------------------------------------- 1 | package com.utilities; 2 | 3 | import java.io.File; 4 | import java.io.FileInputStream; 5 | import java.io.InputStream; 6 | import java.lang.reflect.Method; 7 | import java.util.Base64; 8 | 9 | import org.apache.commons.io.FileUtils; 10 | import org.apache.poi.util.IOUtils; 11 | import org.openqa.selenium.OutputType; 12 | import org.openqa.selenium.TakesScreenshot; 13 | import org.openqa.selenium.WebDriver; 14 | import org.openqa.selenium.WebElement; 15 | import org.openqa.selenium.support.ui.ExpectedCondition; 16 | import org.openqa.selenium.support.ui.ExpectedConditions; 17 | import org.openqa.selenium.support.ui.WebDriverWait; 18 | import org.testng.Assert; 19 | 20 | 21 | import com.listener.ListenerClass; 22 | import com.main.DriverFactory; 23 | import com.main.DriverManager; 24 | import com.reports.LogStatus; 25 | 26 | 27 | 28 | public class TestUtils { 29 | WebDriverWait wait; 30 | 31 | 32 | 33 | public void click(WebElement element,String fieldname) { 34 | explicitlyWait(element); 35 | element.click(); 36 | LogStatus.pass(fieldname+ " is clicked successfully"); 37 | } 38 | 39 | public void sendKeys(WebElement element,String value,String fieldname) { 40 | explicitlyWait(element); 41 | element.sendKeys(value); 42 | LogStatus.pass(value+" is entered successfully in the field "+fieldname); 43 | } 44 | 45 | public void explicitlyWait(WebElement element) { 46 | wait=new WebDriverWait(DriverManager.getDriver(),10); 47 | wait.until(ExpectedConditions.visibilityOf(element)); 48 | } 49 | 50 | /* 51 | * Captures screenshot and returns the screenshot path 52 | */ 53 | public static String pullScreenshotPath() { 54 | 55 | String destination=null; 56 | if(DriverFactory.getIsScreenshotRequired().equalsIgnoreCase("yes")) { 57 | File scrFile = ((TakesScreenshot) DriverManager.getDriver()).getScreenshotAs(OutputType.FILE); 58 | try { 59 | if(DriverFactory.getScreenshotPath().equals("")) { 60 | 61 | destination=System.getProperty("user.dir")+"\\screenshots\\" +ListenerClass.TestcaseName+"\\"+ System.currentTimeMillis() + ".png"; 62 | FileUtils.copyFile(scrFile, new File(destination)); 63 | } 64 | else { 65 | destination=DriverFactory.getScreenshotPath()+"\\screenshots\\" +ListenerClass.TestcaseName.replaceAll(" ","")+"\\"+ System.currentTimeMillis() + ".png"; 66 | FileUtils.copyFile(scrFile, new File(destination)); 67 | } 68 | 69 | } 70 | catch(Exception e) { 71 | e.printStackTrace(); 72 | 73 | } 74 | 75 | } 76 | 77 | return destination; 78 | 79 | } 80 | 81 | /* 82 | * Gives a base64 image which is used to append the screenshots in the extent report. 83 | * Converting to base64 format avoids screenshots broken image if sent the exent report through email. 84 | */ 85 | public static String getBase64Image(String screenshotpath) { 86 | String base64 = null; 87 | try { 88 | InputStream is= new FileInputStream(screenshotpath); 89 | byte[] imageBytes = IOUtils.toByteArray(is); 90 | base64 = Base64.getEncoder().encodeToString(imageBytes); 91 | } 92 | catch (Exception e) { 93 | 94 | } 95 | return base64; 96 | 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/test/java/com/testcases/BaseTest.java: -------------------------------------------------------------------------------- 1 | package com.testcases; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.File; 5 | import java.io.FileInputStream; 6 | import java.io.FileNotFoundException; 7 | import java.io.FileReader; 8 | import java.io.IOException; 9 | import java.net.MalformedURLException; 10 | import java.net.URL; 11 | 12 | import java.util.Properties; 13 | import java.util.concurrent.TimeUnit; 14 | 15 | import org.openqa.selenium.Platform; 16 | import org.openqa.selenium.WebDriver; 17 | import org.openqa.selenium.chrome.ChromeDriver; 18 | import org.openqa.selenium.chrome.ChromeOptions; 19 | import org.openqa.selenium.firefox.FirefoxDriver; 20 | import org.openqa.selenium.firefox.FirefoxOptions; 21 | import org.openqa.selenium.remote.DesiredCapabilities; 22 | import org.openqa.selenium.remote.RemoteWebDriver; 23 | import org.openqa.selenium.support.ui.WebDriverWait; 24 | import org.testng.Assert; 25 | import org.testng.SkipException; 26 | import org.testng.annotations.AfterSuite; 27 | import org.testng.annotations.BeforeClass; 28 | 29 | import org.testng.annotations.BeforeSuite; 30 | 31 | 32 | import com.main.DriverFactory; 33 | import com.main.DriverManager; 34 | import com.relevantcodes.extentreports.ExtentReports; 35 | import com.relevantcodes.extentreports.ExtentTest; 36 | import com.reports.ExtentManager; 37 | import com.utilities.ExcelUtilities; 38 | 39 | public class BaseTest { 40 | 41 | private WebDriver driver; 42 | public Properties config =new Properties(); 43 | public FileInputStream inputstream; 44 | public WebDriverWait wait; 45 | public ExtentManager extentmanager; 46 | public static ExtentReports report; 47 | public ExtentTest test; 48 | 49 | public String browser; 50 | public ExcelUtilities excel; 51 | 52 | 53 | @BeforeSuite 54 | public void setUp() throws Exception { 55 | 56 | setUpConfigFile(); 57 | setUpExecutablesPath(); 58 | setUpExecutionMode(); 59 | setUpOtherProperties(); 60 | setUpRunModeForTestCases(); 61 | setUpDocker(); 62 | 63 | 64 | } 65 | 66 | private void setUpRunModeForTestCases() { 67 | 68 | } 69 | 70 | private void setUpDocker() throws IOException, Exception { 71 | if (DriverFactory.getExecutionMode().equalsIgnoreCase("Remote")) { 72 | Runtime runtime=Runtime.getRuntime(); 73 | if(DriverFactory.getRemoteMode().equalsIgnoreCase("Selenium")) { 74 | 75 | runtime.exec("cmd /c start dockerUp.bat"); 76 | verifyDockerIsUp(); 77 | runtime.exec("cmd /c start scaleChrome.bat"); 78 | Thread.sleep(10000); 79 | runtime.exec("cmd /c start scaleFirefox.bat"); 80 | Thread.sleep(10000); 81 | runtime.exec("taskkill /f /im cmd.exe") ; 82 | } 83 | else { 84 | runtime.exec("cmd /c start zaleniumUp.bat"); 85 | verifyDockerIsUp(); 86 | Thread.sleep(10000); 87 | } 88 | } 89 | } 90 | 91 | 92 | 93 | private void verifyDockerIsUp() throws FileNotFoundException, Exception { 94 | Thread.sleep(10000); 95 | boolean flag=false; 96 | String file="output.txt"; 97 | BufferedReader reader= new BufferedReader(new FileReader(file)); 98 | String currentline=reader.readLine(); 99 | 100 | while(currentline!=null) { 101 | if((currentline.contains("The node is registered to the hub and ready to use"))||(currentline.contains("Zalenium is now ready!"))) { 102 | flag=true; 103 | break; 104 | } 105 | currentline=reader.readLine(); 106 | } 107 | reader.close(); 108 | 109 | if(!flag) { 110 | throw new SkipException("Docker have not started. Please try again or try manually."); 111 | } 112 | } 113 | 114 | @BeforeClass 115 | public void setUpExtentReports() { 116 | extentmanager=new ExtentManager(); 117 | report=extentmanager.getInstance(); 118 | } 119 | 120 | @AfterSuite 121 | public void afterSuite() throws Exception { 122 | if (DriverFactory.getExecutionMode().equalsIgnoreCase("Remote")) { 123 | Runtime runtime=Runtime.getRuntime(); 124 | if(DriverFactory.getRemoteMode().equalsIgnoreCase("Selenium")) { 125 | runtime.exec("cmd /c start dockerDown.bat"); 126 | } 127 | else { 128 | runtime.exec("cmd /c start zaleniumDown.bat"); 129 | } 130 | File file=new File("output.txt"); 131 | if(file.exists()) { 132 | System.out.println("file deleted"); 133 | file.delete(); 134 | } 135 | Thread.sleep(20000); 136 | runtime.exec("taskkill /f /im cmd.exe") ; 137 | } 138 | 139 | } 140 | 141 | private void setUpOtherProperties() { 142 | if(DriverFactory.getExecutionMode().equalsIgnoreCase("Remote")) { 143 | DriverFactory.setGridPath(config.getProperty("RemoteURL")); 144 | DriverFactory.setRemoteMode(config.getProperty("RemoteMode")); 145 | } 146 | DriverFactory.setTestDataLocation(config.getProperty("TestDataLocation")); 147 | DriverFactory.setWaitTime(Integer.parseInt(config.getProperty("WaitTime"))); 148 | DriverFactory.setOverrideResults(config.getProperty("OverrideResults")); 149 | DriverFactory.setIsScreenshotRequired(config.getProperty("OverrideResults")); 150 | DriverFactory.setResultPath(config.getProperty("ResultPath")); 151 | DriverFactory.setScreenshotPath(config.getProperty("ScreenshotPath")); 152 | DriverFactory.setExtentConfigLocation(config.getProperty("ExtentConfigLocation")); 153 | DriverFactory.setTestURL(config.getProperty("url")); 154 | DriverFactory.setPassedStepsScreenshots(config.getProperty("PassedStepsScreenshots")); 155 | DriverFactory.setFailedStepsScreenshots(config.getProperty("FailedStepsScreenshots")); 156 | DriverFactory.setSkippedStepScreenshots(config.getProperty("SkippedStepsScreenshots")); 157 | 158 | } 159 | 160 | private void setUpExecutionMode() { 161 | DriverFactory.setExecutionMode(config.getProperty("ExecutionMode")); 162 | } 163 | 164 | private void setUpExecutablesPath() { 165 | if (System.getProperty("os.name").contains("mac")) { 166 | DriverFactory.setChromeDriverExePath(".//src/test//resources//chromedriver"); 167 | DriverFactory.setGeckoDriverExePath(".//src//test//resources//geckodriver"); 168 | } 169 | else { 170 | DriverFactory.setChromeDriverExePath(".//src/test//resources//chromedriver.exe"); 171 | DriverFactory.setGeckoDriverExePath(".//src//test//resources//geckodriver.exe"); 172 | } 173 | } 174 | 175 | private void setUpConfigFile() { 176 | 177 | try 178 | { 179 | 180 | inputstream=new FileInputStream(System.getProperty("user.dir")+"\\src\\test\\resources\\config.properties"); 181 | config.load(inputstream); 182 | } 183 | catch (IOException e) 184 | { 185 | e.printStackTrace(); 186 | } 187 | } 188 | 189 | public void navigateToURL(WebDriver driver) { 190 | 191 | 192 | driver.get(DriverFactory.getTestURL()); 193 | } 194 | 195 | public void openBrowser(String browser) throws MalformedURLException { 196 | 197 | DesiredCapabilities capability=null; 198 | 199 | if(DriverFactory.getExecutionMode().equalsIgnoreCase("Local")){ 200 | ChromeOptions options=new ChromeOptions(); 201 | switch(browser){ 202 | 203 | case "chrome": 204 | System.setProperty("webdriver.chrome.driver", DriverFactory.getChromeDriverExePath()); 205 | options.addArguments("--incognito"); 206 | driver=new ChromeDriver(options); 207 | break; 208 | case "firefox": 209 | System.setProperty("webdriver.gecko.driver", DriverFactory.getGeckoDriverExePath()); 210 | FirefoxOptions FFoptions= new FirefoxOptions(); 211 | FFoptions.addArguments("--incognito"); 212 | System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE,"true"); 213 | System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE,"C:\\temp\\logs.txt"); 214 | 215 | driver= new FirefoxDriver(FFoptions); 216 | break; 217 | default: 218 | System.setProperty("webdriver.chrome.driver", DriverFactory.getChromeDriverExePath()); 219 | options.addArguments("--incognito"); 220 | driver=new ChromeDriver(options); 221 | break; 222 | } 223 | } 224 | else { 225 | switch(browser){ 226 | 227 | case "chrome": 228 | capability = DesiredCapabilities.chrome(); 229 | capability.setBrowserName("chrome"); 230 | capability.setPlatform(Platform.ANY); 231 | driver=new RemoteWebDriver(new URL(DriverFactory.getGridPath()),capability); 232 | break; 233 | case "firefox": 234 | capability = DesiredCapabilities.firefox(); 235 | capability.setBrowserName("firefox"); 236 | capability.setPlatform(Platform.ANY); 237 | driver=new RemoteWebDriver(new URL(DriverFactory.getGridPath()),capability); 238 | break; 239 | default: 240 | capability = DesiredCapabilities.firefox(); 241 | capability.setBrowserName("firefox"); 242 | capability.setPlatform(Platform.ANY); 243 | driver=new RemoteWebDriver(new URL(DriverFactory.getGridPath()),capability); 244 | break; 245 | } 246 | 247 | 248 | } 249 | DriverManager.setWebDriver(driver); 250 | maximiseWindow(); 251 | setUpImplicitWait(); 252 | 253 | } 254 | 255 | private void setUpImplicitWait() { 256 | 257 | DriverManager.getDriver().manage().timeouts().implicitlyWait(DriverFactory.getWaitTime(), TimeUnit.SECONDS); 258 | } 259 | 260 | private void maximiseWindow() { 261 | 262 | DriverManager.getDriver().manage().window().maximize(); 263 | } 264 | 265 | } 266 | -------------------------------------------------------------------------------- /src/test/java/com/testcases/HomePageTests.java: -------------------------------------------------------------------------------- 1 | package com.testcases; 2 | 3 | import java.lang.reflect.Method; 4 | import java.util.Hashtable; 5 | 6 | import org.testng.ITestResult; 7 | import org.testng.annotations.AfterMethod; 8 | import org.testng.annotations.AfterSuite; 9 | 10 | 11 | import org.testng.annotations.Test; 12 | 13 | import com.main.DriverManager; 14 | import com.pages.HomePage; 15 | import com.pages.SignInPage; 16 | import com.relevantcodes.extentreports.LogStatus; 17 | import com.reports.ExtentFactory; 18 | import com.utilities.ExcelUtilities; 19 | 20 | 21 | public class HomePageTests extends BaseTest{ 22 | 23 | HomePage homepage; 24 | SignInPage signinpage; 25 | 26 | 27 | 28 | 29 | 30 | @Test 31 | public void validateSearchInHomePage(Hashtable data) throws Exception { 32 | test=report.startTest("validate Search In HomePage"+data.get("browser")); 33 | ExtentFactory.setExtentTest(test); 34 | openBrowser(data.get("browser")); 35 | navigateToURL(DriverManager.getDriver()); 36 | homepage=new HomePage(DriverManager.getDriver()); 37 | homepage.enterValueToSearch(data.get("searchvalue")).clickSearch(); 38 | homepage.clickSignIn(); 39 | 40 | } 41 | 42 | @Test 43 | public void validateErrorMessageOnLogin(Hashtable data) throws Exception { 44 | 45 | 46 | test=report.startTest("validate Error Message On Login"+" :"+data.get("browser")); 47 | ExtentFactory.setExtentTest(test); 48 | openBrowser(data.get("browser")); 49 | navigateToURL(DriverManager.getDriver()); 50 | homepage= new HomePage(DriverManager.getDriver()); 51 | signinpage=homepage.clickSignIn(); 52 | signinpage.validateErrorMessage(data.get("email"),data.get("password"),data.get("errormessage")); 53 | 54 | } 55 | 56 | 57 | @AfterMethod 58 | public void quitBrowser() { 59 | if(report!=null) { 60 | report.endTest(ExtentFactory.getExtTest()); 61 | 62 | } 63 | 64 | if(DriverManager.getDriver()!=null) 65 | DriverManager.getDriver().quit(); 66 | } 67 | 68 | @AfterSuite 69 | public void tearDown() { 70 | report.flush(); 71 | } 72 | 73 | 74 | 75 | 76 | 77 | } 78 | -------------------------------------------------------------------------------- /src/test/java/com/testcases/SignInPageTests.java: -------------------------------------------------------------------------------- 1 | package com.testcases; 2 | 3 | import java.util.Hashtable; 4 | 5 | import org.testng.ITestResult; 6 | import org.testng.annotations.AfterMethod; 7 | import org.testng.annotations.Test; 8 | 9 | import com.main.DriverManager; 10 | import com.pages.HomePage; 11 | import com.pages.SignInPage; 12 | import com.reports.ExtentFactory; 13 | import com.utilities.ExcelUtilities; 14 | 15 | 16 | public class SignInPageTests extends BaseTest{ 17 | 18 | HomePage homepage; 19 | SignInPage signinpage; 20 | 21 | 22 | @Test 23 | public void validateErrorMessageOnLoginSignInPage(Hashtable data) throws Exception { 24 | 25 | test=report.startTest("validate ErrorMessage On Login SignInPage"+data.get("browser")); 26 | ExtentFactory.setExtentTest(test); 27 | openBrowser(data.get("browser")); 28 | navigateToURL(DriverManager.getDriver()); 29 | homepage= new HomePage(DriverManager.getDriver()); 30 | signinpage=homepage.clickSignIn(); 31 | signinpage.validateErrorMessage(data.get("email"),data.get("password"),data.get("errormessage")); 32 | 33 | } 34 | 35 | @AfterMethod 36 | public void quitBrowser() { 37 | if(report!=null) { 38 | report.endTest(ExtentFactory.getExtTest()); 39 | report.flush(); 40 | } 41 | if(DriverManager.getDriver()!=null) 42 | DriverManager.getDriver().quit(); 43 | } 44 | 45 | 46 | 47 | 48 | 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/test/resources/chromedriver.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amuthansakthivel/ParallelExecutionWithDocker/cdc940702861dfcaf78fa61f45dec86b43e8119c/src/test/resources/chromedriver.exe -------------------------------------------------------------------------------- /src/test/resources/config.properties: -------------------------------------------------------------------------------- 1 | 2 | #Execution Configuration 3 | ExecutionMode=Remote 4 | 5 | #Remote Mode 6 | RemoteMode=Zalenium 7 | 8 | RemoteURL=http://localhost:4444/wd/hub 9 | 10 | #implicit Wait in seconds 11 | WaitTime=10 12 | 13 | #if yes existing results will be overridden. If no results will be dynamic with time stamp 14 | OverrideResults=yes 15 | 16 | #If screenshots are required use yes 17 | ScreenshotsRequired=yes 18 | 19 | #Test URL 20 | url=http://automationpractice.com/index.php 21 | 22 | TestDataLocation=.//src/test/resources/testdata.xlsx 23 | ExtentConfigLocation=.//src/test/resources/extentreport.xml 24 | 25 | 26 | #if result path is null home directory will be picked 27 | #Sample path is C:\\Users\\users\\Desktop 28 | ResultPath= 29 | 30 | #if screenshot path is null home directory will be picked 31 | #Sample path is C:\\Users\\users\\Desktop 32 | ScreenshotPath= 33 | 34 | #Needed screenshots for passed steps in reports then use yes 35 | PassedStepsScreenshots=yes 36 | 37 | #Needed screenshots for passed steps in reports then use yes 38 | FailedStepsScreenshots=yes 39 | 40 | #Needed screenshots for skipped steps in reports then use yes 41 | SkippedStepsScreenshots=no 42 | 43 | #Need to Send Mail to respective stakeholders with the extent report 44 | #Separate multiple emails by commas 45 | #Logic is written in sec,main,java.com.utils.testutils class 46 | SendExecutionResultsInEmail=No 47 | FromEmail=mech.amuthansakthivel@gmail.com 48 | EmailPassword=ambattur 49 | ToEmails=amuthanvec@gmail.com,mech.amuthansakthivel@gmail.com 50 | CCEmails= 51 | BCCEmails= 52 | 53 | ExecutablesPath=.//src/test//resources//chromedriver.exe -------------------------------------------------------------------------------- /src/test/resources/extentreport.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | standard 7 | 8 | 9 | 10 | UTF-8 11 | 12 | 13 | 14 | http 15 | 16 | 17 | DATA DRIVEN TESTS 18 | 19 | 20 | PROJECT AUTOMATION DEMO 21 | 22 | 23 | Automation Report 24 | 25 | 26 | 27 | yyyy-MM-dd 28 | 29 | 30 | 31 | HH:mm:ss 32 | 33 | 34 | 35 | 40 | 41 | 42 | 43 | 44 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/test/resources/geckodriver.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amuthansakthivel/ParallelExecutionWithDocker/cdc940702861dfcaf78fa61f45dec86b43e8119c/src/test/resources/geckodriver.exe -------------------------------------------------------------------------------- /src/test/resources/testdata.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amuthansakthivel/ParallelExecutionWithDocker/cdc940702861dfcaf78fa61f45dec86b43e8119c/src/test/resources/testdata.xlsx -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\pages\SignInPage.class 2 | com\reports\LogStatus.class 3 | com\utilities\TestUtils.class 4 | com\main\DriverManager.class 5 | com\reports\ExtentManager.class 6 | com\reports\ExtentFactory.class 7 | com\utilities\ExcelUtilities.class 8 | com\main\DriverFactory.class 9 | com\pages\HomePage.class 10 | com\listener\ListenerClass.class 11 | -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\main\java\com\pages\SignInPage.java 2 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\main\java\com\reports\LogStatus.java 3 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\main\java\com\utilities\ExcelUtilities.java 4 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\main\java\com\utilities\TestUtils.java 5 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\main\java\com\listener\RetryFailedTestCases.java 6 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\main\java\com\listener\ListenerClass.java 7 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\main\java\com\main\DriverFactory.java 8 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\main\java\com\main\DriverManager.java 9 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\main\java\com\utilities\Constants.java 10 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\main\java\com\listener\AnnotationTransformer.java 11 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\main\java\com\pages\HomePage.java 12 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\main\java\com\reports\ExtentManager.java 13 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\main\java\com\reports\ExtentFactory.java 14 | -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amuthansakthivel/ParallelExecutionWithDocker/cdc940702861dfcaf78fa61f45dec86b43e8119c/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\test\java\com\testcases\HomePageTests.java 2 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\test\java\com\testcases\BaseTest.java 3 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\src\test\java\com\testcases\SignInPageTests.java 4 | -------------------------------------------------------------------------------- /target/surefire-reports/Suite/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /target/surefire-reports/TEST-TestSuite.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /target/surefire-reports/TestSuite.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------- 2 | Test set: TestSuite 3 | ------------------------------------------------------------------------------- 4 | Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 46.379 sec - in TestSuite 5 | -------------------------------------------------------------------------------- /target/surefire-reports/collapseall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amuthansakthivel/ParallelExecutionWithDocker/cdc940702861dfcaf78fa61f45dec86b43e8119c/target/surefire-reports/collapseall.gif -------------------------------------------------------------------------------- /target/surefire-reports/emailable-report.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | TestNG Report 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
Test# Passed# Skipped# FailedTime (ms)Included GroupsExcluded Groups
Suite
Test00014,850
14 | 15 |
ClassMethodStartTime (ms)
Suite
16 |

Test

17 | 18 | -------------------------------------------------------------------------------- /target/surefire-reports/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | TestNG reports 7 | 8 | 9 | 10 | 11 | 12 | 18 | 21 | 22 | 23 | 24 |
25 | Test results 26 |
27 | 1 suite 28 |
29 | 103 |
104 |
105 |
106 |
107 |
108 |
109 | C:\Users\asakthiv\eclipse-workspace\UsingDocker\testng.xml 110 |
111 |
112 |
113 | <?xml version="1.0" encoding="UTF-8"?>
114 | <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
115 | <suite thread-count="3" guice-stage="DEVELOPMENT" verbose="0" name="Suite" parallel="methods">
116 |   <listeners>
117 |     <listener class-name="com.listener.ListenerClass"/>
118 |     <listener class-name="com.listener.AnnotationTransformer"/>
119 |   </listeners>
120 |   <test thread-count="3" verbose="0" name="Test" parallel="methods">
121 |     <classes>
122 |       <class name="com.testcases.HomePageTests"/>
123 |       <class name="com.testcases.SignInPageTests"/>
124 |       <class name="com.testcases.BaseTest"/>
125 |     </classes>
126 |   </test> <!-- Test -->
127 | </suite> <!-- Suite -->
128 |             
129 |
130 |
131 |
132 |
133 | Tests for Suite 134 |
135 |
136 |
    137 |
  • 138 | Test (3 classes) 139 |
  • 140 |
141 |
142 |
143 |
144 |
145 | Groups for Suite 146 |
147 |
148 |
149 |
150 |
151 |
152 | Times for Suite 153 |
154 |
155 |
156 | 169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 | Reporter output for Suite 177 |
178 |
179 |
180 |
181 |
182 |
183 | 4 ignored methods 184 |
185 |
186 |
187 | com.testcases.SignInPageTests 188 |
189 | setUp 190 |
191 | afterSuite 192 |
193 |
194 |
195 |
196 | com.testcases.BaseTest 197 |
198 | setUp 199 |
200 | afterSuite 201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 | Methods in chronological order 209 |
210 |
211 |
212 |
com.testcases.HomePageTests
213 |
214 | setUp 215 | 0 ms 216 |
217 |
218 | setUpExtentReports 219 | 30058 ms 220 |
221 |
222 |
223 |
com.testcases.SignInPageTests
224 |
225 | setUpExtentReports 226 | 30058 ms 227 |
228 |
229 |
230 |
com.testcases.HomePageTests
231 |
232 | 233 | 234 | validateSearchInHomePage({searchvalue=Blouse, password=, email=, browser=chrome, errormessage=, TestCaseName=validateSearchIn...) 235 | 30271 ms 236 |
237 |
238 | 239 | 240 | validateSearchInHomePage({searchvalue=Printed Dress, password=, email=, browser=firefox, errormessage=, TestCaseName=validate...) 241 | 30271 ms 242 |
243 |
244 | 245 | 246 | validateErrorMessageOnLogin({searchvalue=, password=abcd1234, email=abcd@gmail.com, browser=firefox, errormessage=There is 1 err...) 247 | 30271 ms 248 |
249 |
250 |
251 |
com.testcases.SignInPageTests
252 |
253 | 254 | 255 | validateErrorMessageOnLoginSignInPage({searchvalue=, password=abcd345, email=wer1234@gmail.com, browser=chrome, errormessage=There is 1 er...) 256 | 30272 ms 257 |
258 |
259 | 260 | 261 | validateErrorMessageOnLoginSignInPage({searchvalue=, password=abcd1234, email=abcd@gmail.com, browser=firefox, errormessage=There is 1 err...) 262 | 30272 ms 263 |
264 |
265 |
266 |
com.testcases.HomePageTests
267 |
268 | 269 | 270 | validateErrorMessageOnLogin({searchvalue=, password=abcd345, email=wer1234@gmail.com, browser=chrome, errormessage=There is 1 er...) 271 | 30272 ms 272 |
273 |
274 | tearDown 275 | 44982 ms 276 |
277 |
278 | afterSuite 279 | 45253 ms 280 |
281 |
282 |
283 |
284 |
285 | 286 | 287 | -------------------------------------------------------------------------------- /target/surefire-reports/junitreports/TEST-com.testcases.HomePageTests.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /target/surefire-reports/junitreports/TEST-com.testcases.SignInPageTests.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /target/surefire-reports/old/Suite/Test.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Test] -------------------------------------------------------------------------------- /target/surefire-reports/old/Suite/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |
Class nameMethod nameGroups
com.testcases.HomePageTests  
@Test
 validateErrorMessageOnLogin 
 validateSearchInHomePage 
@BeforeClass
 setUpExtentReports 
@BeforeMethod
@AfterMethod
 quitBrowser 
@AfterClass
com.testcases.SignInPageTests  
@Test
 validateErrorMessageOnLoginSignInPage 
@BeforeClass
 setUpExtentReports 
@BeforeMethod
@AfterMethod
 quitBrowser 
@AfterClass
71 | -------------------------------------------------------------------------------- /target/surefire-reports/old/Suite/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

-------------------------------------------------------------------------------- /target/surefire-reports/old/Suite/index.html: -------------------------------------------------------------------------------- 1 | Results for Suite 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /target/surefire-reports/old/Suite/main.html: -------------------------------------------------------------------------------- 1 | Results for Suite 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /target/surefire-reports/old/Suite/methods-alphabetical.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Suite

(Hover the method name to see the test class name)

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
19/10/29 09:21:27 0 <<afterSuite      main@1750286943
19/10/29 09:20:41 -45248 >>setUp      main@1750286943
19/10/29 09:21:11 -15195   >>setUpExtentReports    TestNG-test=Test-1@675680182
19/10/29 09:21:11 -15195   >>setUpExtentReports    TestNG-test=Test-3@1127945571
19/10/29 09:21:26 -270 <<tearDown      main@1750286943
19/10/29 09:21:12 -14982      validateErrorMessageOnLoginTestNG-PoolService-1@76989334
19/10/29 09:21:12 -14981      validateErrorMessageOnLoginTestNG-PoolService-1@76989334
19/10/29 09:21:12 -14981      validateErrorMessageOnLoginSignInPageTestNG-PoolService-1@355872914
19/10/29 09:21:12 -14981      validateErrorMessageOnLoginSignInPageTestNG-PoolService-1@355872914
19/10/29 09:21:12 -14982      validateSearchInHomePageTestNG-PoolService-1@367019384
19/10/29 09:21:12 -14982      validateSearchInHomePageTestNG-PoolService-1@367019384
27 | -------------------------------------------------------------------------------- /target/surefire-reports/old/Suite/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

2 | 3 | 4 | 5 | 6 |
com.testcases.BaseTest.setUp
com.testcases.BaseTest.setUp
com.testcases.BaseTest.afterSuite
com.testcases.BaseTest.afterSuite
-------------------------------------------------------------------------------- /target/surefire-reports/old/Suite/methods.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Suite

(Hover the method name to see the test class name)

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
19/10/29 09:20:41 0 >>setUp      main@1750286943
19/10/29 09:21:11 30053   >>setUpExtentReports    TestNG-test=Test-1@675680182
19/10/29 09:21:11 30053   >>setUpExtentReports    TestNG-test=Test-3@1127945571
19/10/29 09:21:12 30266      validateSearchInHomePageTestNG-PoolService-1@367019384
19/10/29 09:21:12 30267      validateErrorMessageOnLoginSignInPageTestNG-PoolService-1@355872914
19/10/29 09:21:12 30266      validateSearchInHomePageTestNG-PoolService-1@367019384
19/10/29 09:21:12 30267      validateErrorMessageOnLoginSignInPageTestNG-PoolService-1@355872914
19/10/29 09:21:12 30266      validateErrorMessageOnLoginTestNG-PoolService-1@76989334
19/10/29 09:21:12 30267      validateErrorMessageOnLoginTestNG-PoolService-1@76989334
19/10/29 09:21:26 44978 <<tearDown      main@1750286943
19/10/29 09:21:27 45248 <<afterSuite      main@1750286943
27 | -------------------------------------------------------------------------------- /target/surefire-reports/old/Suite/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /target/surefire-reports/old/Suite/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for Suite<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="3" guice-stage="DEVELOPMENT" verbose="0" name="Suite" parallel="methods">
  <listeners>
    <listener class-name="com.listener.ListenerClass"/>
    <listener class-name="com.listener.AnnotationTransformer"/>
  </listeners>
  <test thread-count="3" verbose="0" name="Test" parallel="methods">
    <classes>
      <class name="com.testcases.HomePageTests"/>
      <class name="com.testcases.SignInPageTests"/>
      <class name="com.testcases.BaseTest"/>
    </classes>
  </test> <!-- Test -->
</suite> <!-- Suite -->
-------------------------------------------------------------------------------- /target/surefire-reports/old/Suite/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Results for Suite 4 | 5 | 6 | 7 | 8 |

Results for
Suite

9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 |
1 test2 classes3 methods:
14 |   chronological
15 |   alphabetical
16 |   not run (4)
0 groupreporter outputtestng.xml
23 | 24 |

29 |

25 |
Test (0/0/0) 26 | Results 27 |
28 |
30 | -------------------------------------------------------------------------------- /target/surefire-reports/old/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Test results

6 | 7 | 8 | 9 |
SuitePassedFailedSkippedtestng.xml
Total000 
Suite000Link
10 | -------------------------------------------------------------------------------- /target/surefire-reports/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /target/surefire-reports/testng-reports.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0px 0px 5px 5px; 3 | } 4 | 5 | ul { 6 | margin: 0px; 7 | } 8 | 9 | li { 10 | list-style-type: none; 11 | } 12 | 13 | a { 14 | text-decoration: none; 15 | } 16 | 17 | a:hover { 18 | text-decoration: underline; 19 | } 20 | 21 | .navigator-selected { 22 | background: #ffa500; 23 | } 24 | 25 | .wrapper { 26 | position: absolute; 27 | top: 60px; 28 | bottom: 0; 29 | left: 400px; 30 | right: 0; 31 | overflow: auto; 32 | } 33 | 34 | .navigator-root { 35 | position: absolute; 36 | top: 60px; 37 | bottom: 0; 38 | left: 0; 39 | width: 400px; 40 | overflow-y: auto; 41 | } 42 | 43 | .suite { 44 | margin: 0px 10px 10px 0px; 45 | background-color: #fff8dc; 46 | } 47 | 48 | .suite-name { 49 | padding-left: 10px; 50 | font-size: 25px; 51 | font-family: Times; 52 | } 53 | 54 | .main-panel-header { 55 | padding: 5px; 56 | background-color: #9FB4D9; //afeeee; 57 | font-family: monospace; 58 | font-size: 18px; 59 | } 60 | 61 | .main-panel-content { 62 | padding: 5px; 63 | margin-bottom: 10px; 64 | background-color: #DEE8FC; //d0ffff; 65 | } 66 | 67 | .rounded-window { 68 | border-radius: 10px; 69 | border-style: solid; 70 | border-width: 1px; 71 | } 72 | 73 | .rounded-window-top { 74 | border-top-right-radius: 10px 10px; 75 | border-top-left-radius: 10px 10px; 76 | border-style: solid; 77 | border-width: 1px; 78 | overflow: auto; 79 | } 80 | 81 | .light-rounded-window-top { 82 | border-top-right-radius: 10px 10px; 83 | border-top-left-radius: 10px 10px; 84 | } 85 | 86 | .rounded-window-bottom { 87 | border-style: solid; 88 | border-width: 0px 1px 1px 1px; 89 | border-bottom-right-radius: 10px 10px; 90 | border-bottom-left-radius: 10px 10px; 91 | overflow: auto; 92 | } 93 | 94 | .method-name { 95 | font-size: 12px; 96 | font-family: monospace; 97 | } 98 | 99 | .method-content { 100 | border-style: solid; 101 | border-width: 0px 0px 1px 0px; 102 | margin-bottom: 10; 103 | padding-bottom: 5px; 104 | width: 80%; 105 | } 106 | 107 | .parameters { 108 | font-size: 14px; 109 | font-family: monospace; 110 | } 111 | 112 | .stack-trace { 113 | white-space: pre; 114 | font-family: monospace; 115 | font-size: 12px; 116 | font-weight: bold; 117 | margin-top: 0px; 118 | margin-left: 20px; 119 | } 120 | 121 | .testng-xml { 122 | font-family: monospace; 123 | } 124 | 125 | .method-list-content { 126 | margin-left: 10px; 127 | } 128 | 129 | .navigator-suite-content { 130 | margin-left: 10px; 131 | font: 12px 'Lucida Grande'; 132 | } 133 | 134 | .suite-section-title { 135 | margin-top: 10px; 136 | width: 80%; 137 | border-style: solid; 138 | border-width: 1px 0px 0px 0px; 139 | font-family: Times; 140 | font-size: 18px; 141 | font-weight: bold; 142 | } 143 | 144 | .suite-section-content { 145 | list-style-image: url(bullet_point.png); 146 | } 147 | 148 | .top-banner-root { 149 | position: absolute; 150 | top: 0; 151 | height: 45px; 152 | left: 0; 153 | right: 0; 154 | padding: 5px; 155 | margin: 0px 0px 5px 0px; 156 | background-color: #0066ff; 157 | font-family: Times; 158 | color: #fff; 159 | text-align: center; 160 | } 161 | 162 | .top-banner-title-font { 163 | font-size: 25px; 164 | } 165 | 166 | .test-name { 167 | font-family: 'Lucida Grande'; 168 | font-size: 16px; 169 | } 170 | 171 | .suite-icon { 172 | padding: 5px; 173 | float: right; 174 | height: 20; 175 | } 176 | 177 | .test-group { 178 | font: 20px 'Lucida Grande'; 179 | margin: 5px 5px 10px 5px; 180 | border-width: 0px 0px 1px 0px; 181 | border-style: solid; 182 | padding: 5px; 183 | } 184 | 185 | .test-group-name { 186 | font-weight: bold; 187 | } 188 | 189 | .method-in-group { 190 | font-size: 16px; 191 | margin-left: 80px; 192 | } 193 | 194 | table.google-visualization-table-table { 195 | width: 100%; 196 | } 197 | 198 | .reporter-method-name { 199 | font-size: 14px; 200 | font-family: monospace; 201 | } 202 | 203 | .reporter-method-output-div { 204 | padding: 5px; 205 | margin: 0px 0px 5px 20px; 206 | font-size: 12px; 207 | font-family: monospace; 208 | border-width: 0px 0px 0px 1px; 209 | border-style: solid; 210 | } 211 | 212 | .ignored-class-div { 213 | font-size: 14px; 214 | font-family: monospace; 215 | } 216 | 217 | .ignored-methods-div { 218 | padding: 5px; 219 | margin: 0px 0px 5px 20px; 220 | font-size: 12px; 221 | font-family: monospace; 222 | border-width: 0px 0px 0px 1px; 223 | border-style: solid; 224 | } 225 | 226 | .border-failed { 227 | border-top-left-radius: 10px 10px; 228 | border-bottom-left-radius: 10px 10px; 229 | border-style: solid; 230 | border-width: 0px 0px 0px 10px; 231 | border-color: #f00; 232 | } 233 | 234 | .border-skipped { 235 | border-top-left-radius: 10px 10px; 236 | border-bottom-left-radius: 10px 10px; 237 | border-style: solid; 238 | border-width: 0px 0px 0px 10px; 239 | border-color: #edc600; 240 | } 241 | 242 | .border-passed { 243 | border-top-left-radius: 10px 10px; 244 | border-bottom-left-radius: 10px 10px; 245 | border-style: solid; 246 | border-width: 0px 0px 0px 10px; 247 | border-color: #19f52d; 248 | } 249 | 250 | .times-div { 251 | text-align: center; 252 | padding: 5px; 253 | } 254 | 255 | .suite-total-time { 256 | font: 16px 'Lucida Grande'; 257 | } 258 | 259 | .configuration-suite { 260 | margin-left: 20px; 261 | } 262 | 263 | .configuration-test { 264 | margin-left: 40px; 265 | } 266 | 267 | .configuration-class { 268 | margin-left: 60px; 269 | } 270 | 271 | .configuration-method { 272 | margin-left: 80px; 273 | } 274 | 275 | .test-method { 276 | margin-left: 100px; 277 | } 278 | 279 | .chronological-class { 280 | background-color: #0ccff; 281 | border-style: solid; 282 | border-width: 0px 0px 1px 1px; 283 | } 284 | 285 | .method-start { 286 | float: right; 287 | } 288 | 289 | .chronological-class-name { 290 | padding: 0px 0px 0px 5px; 291 | color: #008; 292 | } 293 | 294 | .after, .before, .test-method { 295 | font-family: monospace; 296 | font-size: 14px; 297 | } 298 | 299 | .navigator-suite-header { 300 | font-size: 22px; 301 | margin: 0px 10px 5px 0px; 302 | background-color: #deb887; 303 | text-align: center; 304 | } 305 | 306 | .collapse-all-icon { 307 | padding: 5px; 308 | float: right; 309 | } 310 | -------------------------------------------------------------------------------- /target/surefire-reports/testng-reports.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | $('a.navigator-link').click(function() { 3 | // Extract the panel for this link 4 | var panel = getPanelName($(this)); 5 | 6 | // Mark this link as currently selected 7 | $('.navigator-link').parent().removeClass('navigator-selected'); 8 | $(this).parent().addClass('navigator-selected'); 9 | 10 | showPanel(panel); 11 | }); 12 | 13 | installMethodHandlers('failed'); 14 | installMethodHandlers('skipped'); 15 | installMethodHandlers('passed', true); // hide passed methods by default 16 | 17 | $('a.method').click(function() { 18 | showMethod($(this)); 19 | return false; 20 | }); 21 | 22 | // Hide all the panels and display the first one (do this last 23 | // to make sure the click() will invoke the listeners) 24 | $('.panel').hide(); 25 | $('.navigator-link').first().click(); 26 | 27 | // Collapse/expand the suites 28 | $('a.collapse-all-link').click(function() { 29 | var contents = $('.navigator-suite-content'); 30 | if (contents.css('display') == 'none') { 31 | contents.show(); 32 | } else { 33 | contents.hide(); 34 | } 35 | }); 36 | }); 37 | 38 | // The handlers that take care of showing/hiding the methods 39 | function installMethodHandlers(name, hide) { 40 | function getContent(t) { 41 | return $('.method-list-content.' + name + "." + t.attr('panel-name')); 42 | } 43 | 44 | function getHideLink(t, name) { 45 | var s = 'a.hide-methods.' + name + "." + t.attr('panel-name'); 46 | return $(s); 47 | } 48 | 49 | function getShowLink(t, name) { 50 | return $('a.show-methods.' + name + "." + t.attr('panel-name')); 51 | } 52 | 53 | function getMethodPanelClassSel(element, name) { 54 | var panelName = getPanelName(element); 55 | var sel = '.' + panelName + "-class-" + name; 56 | return $(sel); 57 | } 58 | 59 | $('a.hide-methods.' + name).click(function() { 60 | var w = getContent($(this)); 61 | w.hide(); 62 | getHideLink($(this), name).hide(); 63 | getShowLink($(this), name).show(); 64 | getMethodPanelClassSel($(this), name).hide(); 65 | }); 66 | 67 | $('a.show-methods.' + name).click(function() { 68 | var w = getContent($(this)); 69 | w.show(); 70 | getHideLink($(this), name).show(); 71 | getShowLink($(this), name).hide(); 72 | showPanel(getPanelName($(this))); 73 | getMethodPanelClassSel($(this), name).show(); 74 | }); 75 | 76 | if (hide) { 77 | $('a.hide-methods.' + name).click(); 78 | } else { 79 | $('a.show-methods.' + name).click(); 80 | } 81 | } 82 | 83 | function getHashForMethod(element) { 84 | return element.attr('hash-for-method'); 85 | } 86 | 87 | function getPanelName(element) { 88 | return element.attr('panel-name'); 89 | } 90 | 91 | function showPanel(panelName) { 92 | $('.panel').hide(); 93 | var panel = $('.panel[panel-name="' + panelName + '"]'); 94 | panel.show(); 95 | } 96 | 97 | function showMethod(element) { 98 | var hashTag = getHashForMethod(element); 99 | var panelName = getPanelName(element); 100 | showPanel(panelName); 101 | var current = document.location.href; 102 | var base = current.substring(0, current.indexOf('#')) 103 | document.location.href = base + '#' + hashTag; 104 | var newPosition = $(document).scrollTop() - 65; 105 | $(document).scrollTop(newPosition); 106 | } 107 | 108 | function drawTable() { 109 | for (var i = 0; i < suiteTableInitFunctions.length; i++) { 110 | window[suiteTableInitFunctions[i]](); 111 | } 112 | 113 | for (var k in window.suiteTableData) { 114 | var v = window.suiteTableData[k]; 115 | var div = v.tableDiv; 116 | var data = v.tableData 117 | var table = new google.visualization.Table(document.getElementById(div)); 118 | table.draw(data, { 119 | showRowNumber : false 120 | }); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /target/surefire-reports/testng-results.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /target/surefire-reports/testng.css: -------------------------------------------------------------------------------- 1 | .invocation-failed, .test-failed { background-color: #DD0000; } 2 | .invocation-percent, .test-percent { background-color: #006600; } 3 | .invocation-passed, .test-passed { background-color: #00AA00; } 4 | .invocation-skipped, .test-skipped { background-color: #CCCC00; } 5 | 6 | .main-page { 7 | font-size: x-large; 8 | } 9 | 10 | -------------------------------------------------------------------------------- /target/test-classes/chromedriver.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amuthansakthivel/ParallelExecutionWithDocker/cdc940702861dfcaf78fa61f45dec86b43e8119c/target/test-classes/chromedriver.exe -------------------------------------------------------------------------------- /target/test-classes/config.properties: -------------------------------------------------------------------------------- 1 | 2 | #Execution Configuration 3 | ExecutionMode=Remote 4 | 5 | #Remote Mode 6 | RemoteMode=Zalenium 7 | 8 | RemoteURL=http://localhost:4444/wd/hub 9 | 10 | #implicit Wait in seconds 11 | WaitTime=10 12 | 13 | #if yes existing results will be overridden. If no results will be dynamic with time stamp 14 | OverrideResults=yes 15 | 16 | #If screenshots are required use yes 17 | ScreenshotsRequired=yes 18 | 19 | #Test URL 20 | url=http://automationpractice.com/index.php 21 | 22 | TestDataLocation=.//src/test/resources/testdata.xlsx 23 | ExtentConfigLocation=.//src/test/resources/extentreport.xml 24 | 25 | 26 | #if result path is null home directory will be picked 27 | #Sample path is C:\\Users\\users\\Desktop 28 | ResultPath= 29 | 30 | #if screenshot path is null home directory will be picked 31 | #Sample path is C:\\Users\\users\\Desktop 32 | ScreenshotPath= 33 | 34 | #Needed screenshots for passed steps in reports then use yes 35 | PassedStepsScreenshots=yes 36 | 37 | #Needed screenshots for passed steps in reports then use yes 38 | FailedStepsScreenshots=yes 39 | 40 | #Needed screenshots for skipped steps in reports then use yes 41 | SkippedStepsScreenshots=no 42 | 43 | #Need to Send Mail to respective stakeholders with the extent report 44 | #Separate multiple emails by commas 45 | #Logic is written in sec,main,java.com.utils.testutils class 46 | SendExecutionResultsInEmail=No 47 | FromEmail=mech.amuthansakthivel@gmail.com 48 | EmailPassword=ambattur 49 | ToEmails=amuthanvec@gmail.com,mech.amuthansakthivel@gmail.com 50 | CCEmails= 51 | BCCEmails= 52 | 53 | ExecutablesPath=.//src/test//resources//chromedriver.exe -------------------------------------------------------------------------------- /target/test-classes/extentreport.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | standard 7 | 8 | 9 | 10 | UTF-8 11 | 12 | 13 | 14 | http 15 | 16 | 17 | DATA DRIVEN TESTS 18 | 19 | 20 | PROJECT AUTOMATION DEMO 21 | 22 | 23 | Automation Report 24 | 25 | 26 | 27 | yyyy-MM-dd 28 | 29 | 30 | 31 | HH:mm:ss 32 | 33 | 34 | 35 | 40 | 41 | 42 | 43 | 44 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /target/test-classes/geckodriver.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amuthansakthivel/ParallelExecutionWithDocker/cdc940702861dfcaf78fa61f45dec86b43e8119c/target/test-classes/geckodriver.exe -------------------------------------------------------------------------------- /target/test-classes/testdata.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amuthansakthivel/ParallelExecutionWithDocker/cdc940702861dfcaf78fa61f45dec86b43e8119c/target/test-classes/testdata.xlsx -------------------------------------------------------------------------------- /test-output/Default suite/Default test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: Default test 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

Default test

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:0/0/1
Started on:Thu Oct 03 11:02:50 IST 2019
Total time:0 seconds (24 ms)
Included groups:
Excluded groups:

69 | (Hover the method name to see the test class name)

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 153 | 154 | 155 |
SKIPPED TESTS
Test methodExceptionTime (seconds)Instance
validateHomePageTitle
Test class: com.testcases.HomePageTests
java.lang.RuntimeException: java.lang.NullPointerException
 80 | 	at org.testng.internal.MethodInvocationHelper.invokeMethodNoCheckedException(MethodInvocationHelper.java:49)
 81 | 	at org.testng.internal.MethodInvocationHelper.invokeDataProvider(MethodInvocationHelper.java:131)
 82 | 	at org.testng.internal.Parameters.handleParameters(Parameters.java:706)
 83 | 	at org.testng.internal.ParameterHandler.handleParameters(ParameterHandler.java:49)
 84 | 	at org.testng.internal.ParameterHandler.createParameters(ParameterHandler.java:37)
 85 | 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:924)
 86 | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
 87 | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
 88 | 	at org.testng.TestRunner.privateRun(TestRunner.java:648)
 89 | 	at org.testng.TestRunner.run(TestRunner.java:505)
 90 | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
 91 | 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
 92 | 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
 93 | 	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
 94 | 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
 95 | 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
 96 | 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
 97 | 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
 98 | 	at org.testng.TestNG.runSuites(TestNG.java:1049)
 99 | 	at org.testng.TestNG.run(TestNG.java:1017)
100 | 	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
101 | 	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
102 | 	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
103 | Caused by: java.lang.NullPointerException
104 | 	at com.utilities.ExcelUtilities.getLastColumnNum(ExcelUtilities.java:94)
105 | 	at com.utilities.ExcelUtilities.getDataForDataprovider(ExcelUtilities.java:153)
106 | 	at com.utilities.ExcelUtilities.supplyDataForIterations(ExcelUtilities.java:144)
107 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
108 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
109 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
110 | 	at java.lang.reflect.Method.invoke(Method.java:498)
111 | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
112 | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:74)
113 | 	at org.testng.internal.MethodInvocationHelper.invokeMethodNoCheckedException(MethodInvocationHelper.java:45)
114 | 	... 22 more
115 | 
Click to show all stack frames 116 |
java.lang.RuntimeException: java.lang.NullPointerException
117 | 	at org.testng.internal.MethodInvocationHelper.invokeMethodNoCheckedException(MethodInvocationHelper.java:49)
118 | 	at org.testng.internal.MethodInvocationHelper.invokeDataProvider(MethodInvocationHelper.java:131)
119 | 	at org.testng.internal.Parameters.handleParameters(Parameters.java:706)
120 | 	at org.testng.internal.ParameterHandler.handleParameters(ParameterHandler.java:49)
121 | 	at org.testng.internal.ParameterHandler.createParameters(ParameterHandler.java:37)
122 | 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:924)
123 | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
124 | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
125 | 	at org.testng.TestRunner.privateRun(TestRunner.java:648)
126 | 	at org.testng.TestRunner.run(TestRunner.java:505)
127 | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
128 | 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
129 | 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
130 | 	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
131 | 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
132 | 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
133 | 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
134 | 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
135 | 	at org.testng.TestNG.runSuites(TestNG.java:1049)
136 | 	at org.testng.TestNG.run(TestNG.java:1017)
137 | 	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
138 | 	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
139 | 	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
140 | Caused by: java.lang.NullPointerException
141 | 	at com.utilities.ExcelUtilities.getLastColumnNum(ExcelUtilities.java:94)
142 | 	at com.utilities.ExcelUtilities.getDataForDataprovider(ExcelUtilities.java:153)
143 | 	at com.utilities.ExcelUtilities.supplyDataForIterations(ExcelUtilities.java:144)
144 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
145 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
146 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
147 | 	at java.lang.reflect.Method.invoke(Method.java:498)
148 | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
149 | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:74)
150 | 	at org.testng.internal.MethodInvocationHelper.invokeMethodNoCheckedException(MethodInvocationHelper.java:45)
151 | 	... 22 more
152 | 
0com.testcases.HomePageTests@670b40af

156 | 157 | -------------------------------------------------------------------------------- /test-output/Default suite/Default test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test-output/Default suite/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /test-output/Suite/Test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 32 | 33 | 34 | 35 | 36 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /test-output/Suite/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /test-output/collapseall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amuthansakthivel/ParallelExecutionWithDocker/cdc940702861dfcaf78fa61f45dec86b43e8119c/test-output/collapseall.gif -------------------------------------------------------------------------------- /test-output/emailable-report.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | TestNG Report 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
Test# Passed# Skipped# FailedTime (ms)Included GroupsExcluded Groups
Suite
Test00242,330
14 | 15 |
ClassMethodStartTime (ms)
Suite
Test — failed
com.testcases.HomePageTestsvalidateSearchInHomePage157232725261241940
validateSearchInHomePage
16 |

Test

com.testcases.HomePageTests#validateSearchInHomePage

Parameter #1
{searchvalue=Blouse, password=, email=, browser=chrome, errormessage=, TestCaseName=validateSearchInHomePage}
Exception
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of Proxy element for: DefaultElementLocator 'By.xpath: //input[@id='search_query_top']' (tried for 10 second(s) with 500 milliseconds interval) 17 | at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:95) 18 | at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:272) 19 | at com.utilities.TestUtils.explicitlyWait(TestUtils.java:47) 20 | at com.utilities.TestUtils.sendKeys(TestUtils.java:40) 21 | at com.pages.HomePage.enterValueToSearch(HomePage.java:33) 22 | at com.testcases.HomePageTests.validateSearchInHomePage(HomePageTests.java:37) 23 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) 24 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 25 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) 26 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 27 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 28 | at java.lang.Thread.run(Thread.java:748) 29 | Caused by: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@id='search_query_top']"} 30 | (Session info: chrome=77.0.3865.90) 31 | For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html 32 | Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' 33 | System info: host: 'INMAAWN53000190', ip: '10.0.75.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_221' 34 | Driver info: org.openqa.selenium.remote.RemoteWebDriver 35 | Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 77.0.3865.90, chrome: {chromedriverVersion: 77.0.3865.40 (f484704e052e0..., userDataDir: /tmp/.com.google.Chrome.sjPaVp}, goog:chromeOptions: {debuggerAddress: localhost:39613}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webdriver.remote.sessionid: bc8ec3ebdce47ec2d4e38563ef0...} 36 | Session ID: bc8ec3ebdce47ec2d4e38563ef0dee89 37 | *** Element info: {Using=xpath, value=//input[@id='search_query_top']} 38 | at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187) 39 | at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122) 40 | at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49) 41 | at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158) 42 | at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) 43 | at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:323) 44 | at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:428) 45 | at org.openqa.selenium.By$ByXPath.findElement(By.java:353) 46 | at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:315) 47 | at org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:69) 48 | at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:38) 49 | at com.sun.proxy.$Proxy12.isDisplayed(Unknown Source) 50 | at org.openqa.selenium.support.ui.ExpectedConditions.elementIfVisible(ExpectedConditions.java:314) 51 | at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:43) 52 | at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:300) 53 | at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:297) 54 | at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:249) 55 | ... 19 more 56 | ... Removed 13 stack frames

back to summary

57 |

com.testcases.HomePageTests#validateSearchInHomePage

Parameter #1
{searchvalue=Printed Dress, password=, email=, browser=firefox, errormessage=, TestCaseName=validateSearchInHomePage}
Exception
org.openqa.selenium.WebDriverException: Reached error page: about:neterror?e=connectionFailure&u=http%3A//automationpractice.com/index.php&c=UTF-8&f=regular&d=Firefox%20can%E2%80%99t%20establish%20a%20connection%20to%20the%20server%20at%20automationpractice.com. 58 | Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' 59 | System info: host: 'INMAAWN53000190', ip: '10.0.75.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_221' 60 | Driver info: org.openqa.selenium.remote.RemoteWebDriver 61 | Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 69.0, javascriptEnabled: true, moz:accessibilityChecks: false, moz:buildID: 20190827005903, moz:geckodriverVersion: 0.25.0, moz:headless: false, moz:processID: 405, moz:profile: /tmp/rust_mozprofileX5c7Rs, moz:shutdownTimeout: 60000, moz:useNonSpecCompliantPointerOrigin: false, moz:webdriverClick: true, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, platformVersion: 4.9.184-linuxkit, rotatable: false, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webdriver.remote.sessionid: bd33bf0d-9420-44fb-bcf4-0d3...} 62 | Session ID: bd33bf0d-9420-44fb-bcf4-0d3069ad1572 63 | at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187) 64 | at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122) 65 | at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49) 66 | at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158) 67 | at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) 68 | at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:277) 69 | at com.testcases.BaseTest.navigateToURL(BaseTest.java:194) 70 | at com.testcases.HomePageTests.validateSearchInHomePage(HomePageTests.java:35) 71 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) 72 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 73 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) 74 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 75 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 76 | at java.lang.Thread.run(Thread.java:748) 77 | ... Removed 13 stack frames

back to summary

78 | 79 | 80 | -------------------------------------------------------------------------------- /test-output/junitreports/TEST-com.testcases.HomePageTests.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 60 | 61 | 62 | 63 | 69 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /test-output/junitreports/TEST-com.testcases.SignInPageTests.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-output/old/Default suite/Default test.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Default test] -------------------------------------------------------------------------------- /test-output/old/Default suite/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
Class nameMethod nameGroups
com.testcases.HomePageTests  
@Test
 validateHomePageTitle 
@BeforeClass
@BeforeMethod
 setUp 
@AfterMethod
 tearDown 
@AfterClass
37 | -------------------------------------------------------------------------------- /test-output/old/Default suite/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

-------------------------------------------------------------------------------- /test-output/old/Default suite/index.html: -------------------------------------------------------------------------------- 1 | Results for Default suite 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-output/old/Default suite/main.html: -------------------------------------------------------------------------------- 1 | Results for Default suite 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /test-output/old/Default suite/methods-alphabetical.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Default suite

(Hover the method name to see the test class name)

2 | 3 | -------------------------------------------------------------------------------- /test-output/old/Default suite/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

2 |
-------------------------------------------------------------------------------- /test-output/old/Default suite/methods.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Default suite

(Hover the method name to see the test class name)

2 | 3 | -------------------------------------------------------------------------------- /test-output/old/Default suite/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /test-output/old/Default suite/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for Default suite<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite guice-stage="DEVELOPMENT" name="Default suite">
  <test thread-count="5" verbose="2" name="Default test">
    <classes>
      <class name="com.testcases.HomePageTests"/>
    </classes>
  </test> <!-- Default test -->
</suite> <!-- Default suite -->
-------------------------------------------------------------------------------- /test-output/old/Default suite/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Results for Default suite 4 | 5 | 6 | 7 | 8 |

Results for
Default suite

9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 |
1 test1 class1 method:
14 |   chronological
15 |   alphabetical
16 |   not run (0)
0 groupreporter outputtestng.xml
23 | 24 |

29 |

25 |
Default test (0/0/1) 26 | Results 27 |
28 |
30 | -------------------------------------------------------------------------------- /test-output/old/Suite/Test.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Test] -------------------------------------------------------------------------------- /test-output/old/Suite/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
Class nameMethod nameGroups
com.testcases.HomePageTests  
@Test
 validateErrorMessageOnLogin 
 validateSearchInHomePage 
@BeforeClass
 setUpExtentReports 
@BeforeMethod
@AfterMethod
 quitBrowser 
@AfterClass
41 | -------------------------------------------------------------------------------- /test-output/old/Suite/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

-------------------------------------------------------------------------------- /test-output/old/Suite/index.html: -------------------------------------------------------------------------------- 1 | Results for Suite 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-output/old/Suite/main.html: -------------------------------------------------------------------------------- 1 | Results for Suite 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /test-output/old/Suite/methods-alphabetical.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Suite

(Hover the method name to see the test class name)

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
19/10/29 11:04:55 0 <<afterSuite      main@310623126
19/10/29 11:04:38 -16348     <<quitBrowser  TestNG-PoolService-0@504519439
19/10/29 11:04:54 -308     <<quitBrowser  TestNG-PoolService-0@504519439
19/10/29 11:03:52 -62581 >>setUp      main@310623126
19/10/29 11:04:12 -42552   >>setUpExtentReports    TestNG-test=Test-1@2023927109
19/10/29 11:04:54 -202 <<tearDown      main@310623126
19/10/29 11:04:12 -42426      validateSearchInHomePageTestNG-PoolService-1@1984275195
19/10/29 11:04:12 -42426      validateSearchInHomePageTestNG-PoolService-1@1984275195
21 | -------------------------------------------------------------------------------- /test-output/old/Suite/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

2 | 3 | 4 | 5 | 6 | 7 | 8 |
com.testcases.HomePageTests.validateErrorMessageOnLogin
    Validate the error message for incorrect login
com.testcases.SignInPageTests.validateErrorMessageOnLoginSignInPage
    Validate the error message for incorrect login from SigninPageTests
com.testcases.BaseTest.setUp
com.testcases.BaseTest.setUp
com.testcases.BaseTest.afterSuite
com.testcases.BaseTest.afterSuite
-------------------------------------------------------------------------------- /test-output/old/Suite/methods.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Suite

(Hover the method name to see the test class name)

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
19/10/29 11:03:52 0 >>setUp      main@310623126
19/10/29 11:04:12 20029   >>setUpExtentReports    TestNG-test=Test-1@2023927109
19/10/29 11:04:12 20155      validateSearchInHomePageTestNG-PoolService-1@1984275195
19/10/29 11:04:12 20155      validateSearchInHomePageTestNG-PoolService-1@1984275195
19/10/29 11:04:38 46233     <<quitBrowser  TestNG-PoolService-0@504519439
19/10/29 11:04:54 62273     <<quitBrowser  TestNG-PoolService-0@504519439
19/10/29 11:04:54 62379 <<tearDown      main@310623126
19/10/29 11:04:55 62581 <<afterSuite      main@310623126
21 | -------------------------------------------------------------------------------- /test-output/old/Suite/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /test-output/old/Suite/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for Suite<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="3" guice-stage="DEVELOPMENT" name="Suite" parallel="methods">
  <listeners>
    <listener class-name="com.listener.ListenerClass"/>
    <listener class-name="com.listener.AnnotationTransformer"/>
  </listeners>
  <test thread-count="3" name="Test" parallel="methods">
    <classes>
      <class name="com.testcases.HomePageTests"/>
      <class name="com.testcases.SignInPageTests"/>
      <class name="com.testcases.BaseTest"/>
    </classes>
  </test> <!-- Test -->
</suite> <!-- Suite -->
-------------------------------------------------------------------------------- /test-output/old/Suite/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Results for Suite 4 | 5 | 6 | 7 | 8 |

Results for
Suite

9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 |
1 test1 class1 method:
14 |   chronological
15 |   alphabetical
16 |   not run (6)
0 groupreporter outputtestng.xml
23 | 24 |

29 |

25 |
Test (0/2/0) 26 | Results 27 |
28 |
30 | -------------------------------------------------------------------------------- /test-output/old/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Test results

6 | 7 | 8 | 9 |
SuitePassedFailedSkippedtestng.xml
Total020 
Suite020Link
10 | -------------------------------------------------------------------------------- /test-output/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /test-output/testng-reports.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0px 0px 5px 5px; 3 | } 4 | 5 | ul { 6 | margin: 0px; 7 | } 8 | 9 | li { 10 | list-style-type: none; 11 | } 12 | 13 | a { 14 | text-decoration: none; 15 | } 16 | 17 | a:hover { 18 | text-decoration: underline; 19 | } 20 | 21 | .navigator-selected { 22 | background: #ffa500; 23 | } 24 | 25 | .wrapper { 26 | position: absolute; 27 | top: 60px; 28 | bottom: 0; 29 | left: 400px; 30 | right: 0; 31 | overflow: auto; 32 | } 33 | 34 | .navigator-root { 35 | position: absolute; 36 | top: 60px; 37 | bottom: 0; 38 | left: 0; 39 | width: 400px; 40 | overflow-y: auto; 41 | } 42 | 43 | .suite { 44 | margin: 0px 10px 10px 0px; 45 | background-color: #fff8dc; 46 | } 47 | 48 | .suite-name { 49 | padding-left: 10px; 50 | font-size: 25px; 51 | font-family: Times; 52 | } 53 | 54 | .main-panel-header { 55 | padding: 5px; 56 | background-color: #9FB4D9; //afeeee; 57 | font-family: monospace; 58 | font-size: 18px; 59 | } 60 | 61 | .main-panel-content { 62 | padding: 5px; 63 | margin-bottom: 10px; 64 | background-color: #DEE8FC; //d0ffff; 65 | } 66 | 67 | .rounded-window { 68 | border-radius: 10px; 69 | border-style: solid; 70 | border-width: 1px; 71 | } 72 | 73 | .rounded-window-top { 74 | border-top-right-radius: 10px 10px; 75 | border-top-left-radius: 10px 10px; 76 | border-style: solid; 77 | border-width: 1px; 78 | overflow: auto; 79 | } 80 | 81 | .light-rounded-window-top { 82 | border-top-right-radius: 10px 10px; 83 | border-top-left-radius: 10px 10px; 84 | } 85 | 86 | .rounded-window-bottom { 87 | border-style: solid; 88 | border-width: 0px 1px 1px 1px; 89 | border-bottom-right-radius: 10px 10px; 90 | border-bottom-left-radius: 10px 10px; 91 | overflow: auto; 92 | } 93 | 94 | .method-name { 95 | font-size: 12px; 96 | font-family: monospace; 97 | } 98 | 99 | .method-content { 100 | border-style: solid; 101 | border-width: 0px 0px 1px 0px; 102 | margin-bottom: 10; 103 | padding-bottom: 5px; 104 | width: 80%; 105 | } 106 | 107 | .parameters { 108 | font-size: 14px; 109 | font-family: monospace; 110 | } 111 | 112 | .stack-trace { 113 | white-space: pre; 114 | font-family: monospace; 115 | font-size: 12px; 116 | font-weight: bold; 117 | margin-top: 0px; 118 | margin-left: 20px; 119 | } 120 | 121 | .testng-xml { 122 | font-family: monospace; 123 | } 124 | 125 | .method-list-content { 126 | margin-left: 10px; 127 | } 128 | 129 | .navigator-suite-content { 130 | margin-left: 10px; 131 | font: 12px 'Lucida Grande'; 132 | } 133 | 134 | .suite-section-title { 135 | margin-top: 10px; 136 | width: 80%; 137 | border-style: solid; 138 | border-width: 1px 0px 0px 0px; 139 | font-family: Times; 140 | font-size: 18px; 141 | font-weight: bold; 142 | } 143 | 144 | .suite-section-content { 145 | list-style-image: url(bullet_point.png); 146 | } 147 | 148 | .top-banner-root { 149 | position: absolute; 150 | top: 0; 151 | height: 45px; 152 | left: 0; 153 | right: 0; 154 | padding: 5px; 155 | margin: 0px 0px 5px 0px; 156 | background-color: #0066ff; 157 | font-family: Times; 158 | color: #fff; 159 | text-align: center; 160 | } 161 | 162 | .top-banner-title-font { 163 | font-size: 25px; 164 | } 165 | 166 | .test-name { 167 | font-family: 'Lucida Grande'; 168 | font-size: 16px; 169 | } 170 | 171 | .suite-icon { 172 | padding: 5px; 173 | float: right; 174 | height: 20; 175 | } 176 | 177 | .test-group { 178 | font: 20px 'Lucida Grande'; 179 | margin: 5px 5px 10px 5px; 180 | border-width: 0px 0px 1px 0px; 181 | border-style: solid; 182 | padding: 5px; 183 | } 184 | 185 | .test-group-name { 186 | font-weight: bold; 187 | } 188 | 189 | .method-in-group { 190 | font-size: 16px; 191 | margin-left: 80px; 192 | } 193 | 194 | table.google-visualization-table-table { 195 | width: 100%; 196 | } 197 | 198 | .reporter-method-name { 199 | font-size: 14px; 200 | font-family: monospace; 201 | } 202 | 203 | .reporter-method-output-div { 204 | padding: 5px; 205 | margin: 0px 0px 5px 20px; 206 | font-size: 12px; 207 | font-family: monospace; 208 | border-width: 0px 0px 0px 1px; 209 | border-style: solid; 210 | } 211 | 212 | .ignored-class-div { 213 | font-size: 14px; 214 | font-family: monospace; 215 | } 216 | 217 | .ignored-methods-div { 218 | padding: 5px; 219 | margin: 0px 0px 5px 20px; 220 | font-size: 12px; 221 | font-family: monospace; 222 | border-width: 0px 0px 0px 1px; 223 | border-style: solid; 224 | } 225 | 226 | .border-failed { 227 | border-top-left-radius: 10px 10px; 228 | border-bottom-left-radius: 10px 10px; 229 | border-style: solid; 230 | border-width: 0px 0px 0px 10px; 231 | border-color: #f00; 232 | } 233 | 234 | .border-skipped { 235 | border-top-left-radius: 10px 10px; 236 | border-bottom-left-radius: 10px 10px; 237 | border-style: solid; 238 | border-width: 0px 0px 0px 10px; 239 | border-color: #edc600; 240 | } 241 | 242 | .border-passed { 243 | border-top-left-radius: 10px 10px; 244 | border-bottom-left-radius: 10px 10px; 245 | border-style: solid; 246 | border-width: 0px 0px 0px 10px; 247 | border-color: #19f52d; 248 | } 249 | 250 | .times-div { 251 | text-align: center; 252 | padding: 5px; 253 | } 254 | 255 | .suite-total-time { 256 | font: 16px 'Lucida Grande'; 257 | } 258 | 259 | .configuration-suite { 260 | margin-left: 20px; 261 | } 262 | 263 | .configuration-test { 264 | margin-left: 40px; 265 | } 266 | 267 | .configuration-class { 268 | margin-left: 60px; 269 | } 270 | 271 | .configuration-method { 272 | margin-left: 80px; 273 | } 274 | 275 | .test-method { 276 | margin-left: 100px; 277 | } 278 | 279 | .chronological-class { 280 | background-color: #0ccff; 281 | border-style: solid; 282 | border-width: 0px 0px 1px 1px; 283 | } 284 | 285 | .method-start { 286 | float: right; 287 | } 288 | 289 | .chronological-class-name { 290 | padding: 0px 0px 0px 5px; 291 | color: #008; 292 | } 293 | 294 | .after, .before, .test-method { 295 | font-family: monospace; 296 | font-size: 14px; 297 | } 298 | 299 | .navigator-suite-header { 300 | font-size: 22px; 301 | margin: 0px 10px 5px 0px; 302 | background-color: #deb887; 303 | text-align: center; 304 | } 305 | 306 | .collapse-all-icon { 307 | padding: 5px; 308 | float: right; 309 | } 310 | -------------------------------------------------------------------------------- /test-output/testng-reports.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | $('a.navigator-link').click(function() { 3 | // Extract the panel for this link 4 | var panel = getPanelName($(this)); 5 | 6 | // Mark this link as currently selected 7 | $('.navigator-link').parent().removeClass('navigator-selected'); 8 | $(this).parent().addClass('navigator-selected'); 9 | 10 | showPanel(panel); 11 | }); 12 | 13 | installMethodHandlers('failed'); 14 | installMethodHandlers('skipped'); 15 | installMethodHandlers('passed', true); // hide passed methods by default 16 | 17 | $('a.method').click(function() { 18 | showMethod($(this)); 19 | return false; 20 | }); 21 | 22 | // Hide all the panels and display the first one (do this last 23 | // to make sure the click() will invoke the listeners) 24 | $('.panel').hide(); 25 | $('.navigator-link').first().click(); 26 | 27 | // Collapse/expand the suites 28 | $('a.collapse-all-link').click(function() { 29 | var contents = $('.navigator-suite-content'); 30 | if (contents.css('display') == 'none') { 31 | contents.show(); 32 | } else { 33 | contents.hide(); 34 | } 35 | }); 36 | }); 37 | 38 | // The handlers that take care of showing/hiding the methods 39 | function installMethodHandlers(name, hide) { 40 | function getContent(t) { 41 | return $('.method-list-content.' + name + "." + t.attr('panel-name')); 42 | } 43 | 44 | function getHideLink(t, name) { 45 | var s = 'a.hide-methods.' + name + "." + t.attr('panel-name'); 46 | return $(s); 47 | } 48 | 49 | function getShowLink(t, name) { 50 | return $('a.show-methods.' + name + "." + t.attr('panel-name')); 51 | } 52 | 53 | function getMethodPanelClassSel(element, name) { 54 | var panelName = getPanelName(element); 55 | var sel = '.' + panelName + "-class-" + name; 56 | return $(sel); 57 | } 58 | 59 | $('a.hide-methods.' + name).click(function() { 60 | var w = getContent($(this)); 61 | w.hide(); 62 | getHideLink($(this), name).hide(); 63 | getShowLink($(this), name).show(); 64 | getMethodPanelClassSel($(this), name).hide(); 65 | }); 66 | 67 | $('a.show-methods.' + name).click(function() { 68 | var w = getContent($(this)); 69 | w.show(); 70 | getHideLink($(this), name).show(); 71 | getShowLink($(this), name).hide(); 72 | showPanel(getPanelName($(this))); 73 | getMethodPanelClassSel($(this), name).show(); 74 | }); 75 | 76 | if (hide) { 77 | $('a.hide-methods.' + name).click(); 78 | } else { 79 | $('a.show-methods.' + name).click(); 80 | } 81 | } 82 | 83 | function getHashForMethod(element) { 84 | return element.attr('hash-for-method'); 85 | } 86 | 87 | function getPanelName(element) { 88 | return element.attr('panel-name'); 89 | } 90 | 91 | function showPanel(panelName) { 92 | $('.panel').hide(); 93 | var panel = $('.panel[panel-name="' + panelName + '"]'); 94 | panel.show(); 95 | } 96 | 97 | function showMethod(element) { 98 | var hashTag = getHashForMethod(element); 99 | var panelName = getPanelName(element); 100 | showPanel(panelName); 101 | var current = document.location.href; 102 | var base = current.substring(0, current.indexOf('#')) 103 | document.location.href = base + '#' + hashTag; 104 | var newPosition = $(document).scrollTop() - 65; 105 | $(document).scrollTop(newPosition); 106 | } 107 | 108 | function drawTable() { 109 | for (var i = 0; i < suiteTableInitFunctions.length; i++) { 110 | window[suiteTableInitFunctions[i]](); 111 | } 112 | 113 | for (var k in window.suiteTableData) { 114 | var v = window.suiteTableData[k]; 115 | var div = v.tableDiv; 116 | var data = v.tableData 117 | var table = new google.visualization.Table(document.getElementById(div)); 118 | table.draw(data, { 119 | showRowNumber : false 120 | }); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /test-output/testng-results.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 106 | 107 | 108 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /test-output/testng.css: -------------------------------------------------------------------------------- 1 | .invocation-failed, .test-failed { background-color: #DD0000; } 2 | .invocation-percent, .test-percent { background-color: #006600; } 3 | .invocation-passed, .test-passed { background-color: #00AA00; } 4 | .invocation-skipped, .test-skipped { background-color: #CCCC00; } 5 | 6 | .main-page { 7 | font-size: x-large; 8 | } 9 | 10 | -------------------------------------------------------------------------------- /testng.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /zaleniumDown.bat: -------------------------------------------------------------------------------- 1 | docker stop zalenium -------------------------------------------------------------------------------- /zaleniumUp.bat: -------------------------------------------------------------------------------- 1 | docker run --rm -ti --name zalenium -p 4444:4444 -v /var/run/docker.sock:/var/run/docker.sock --privileged dosel/zalenium start >>output.txt --------------------------------------------------------------------------------