└── MyStoreProject ├── .gitignore ├── test-output ├── old │ ├── Suite │ │ ├── Test.properties │ │ ├── Sanity.properties │ │ ├── Test_All.properties │ │ ├── Regression.properties │ │ ├── reporter-output.html │ │ ├── main.html │ │ ├── index.html │ │ ├── methods-not-run.html │ │ ├── toc.html │ │ ├── testng.xml.html │ │ ├── groups.html │ │ ├── classes.html │ │ └── methods.html │ ├── CrossBrowser │ │ ├── reporter-output.html │ │ ├── methods-not-run.html │ │ ├── IETest.properties │ │ ├── FirefoxTest.properties │ │ ├── ChromeTest.properties │ │ ├── main.html │ │ ├── index.html │ │ ├── groups.html │ │ ├── classes.html │ │ ├── toc.html │ │ ├── testng.xml.html │ │ ├── methods.html │ │ └── methods-alphabetical.html │ ├── Default suite │ │ ├── Default test.properties │ │ ├── reporter-output.html │ │ ├── methods-not-run.html │ │ ├── main.html │ │ ├── index.html │ │ ├── groups.html │ │ ├── testng.xml.html │ │ ├── classes.html │ │ ├── methods.html │ │ ├── methods-alphabetical.html │ │ └── toc.html │ └── index.html ├── failed.png ├── passed.png ├── skipped.png ├── collapseall.gif ├── bullet_point.png ├── navigator-bullet.png ├── testng.css ├── CrossBrowser │ ├── ChromeTest.xml │ ├── FirefoxTest.xml │ ├── IETest.xml │ ├── testng-failed.xml │ ├── ChromeTest.html │ ├── FirefoxTest.html │ └── IETest.html ├── junitreports │ ├── TEST-com.mystore.testcases.OderPageTest.xml │ ├── TEST-com.mystore.testcases.EndToEndTest.xml │ ├── TEST-com.mystore.testcases.LoginPageTest.xml │ ├── TEST-com.mystore.testcases.OrderPageTest.xml │ ├── TEST-com.mystore.testcases.AddToCartPageTest.xml │ ├── TEST-com.mystore.testcases.SearchResultPageTest.xml │ ├── TEST-com.mystore.testcases.AccountCreationPageTest.xml │ ├── TEST-com.mystore.testcases.HomePageTest.xml │ └── TEST-com.mystore.testcases.IndexPageTest.xml ├── Default suite │ ├── testng-failed.xml │ ├── Default test.xml │ └── Default test.html ├── testng-failed.xml ├── Suite │ ├── testng-failed.xml │ ├── Test.xml │ ├── Regression.html │ ├── Sanity.html │ ├── Sanity.xml │ ├── Regression.xml │ ├── Test_All.xml │ ├── Test.html │ └── Test_All.html ├── testng-reports.js ├── testng-reports.css └── emailable-report.html ├── Logo └── MyStore.png ├── Documentation ├── PageNavigation.png ├── FrameworkArchitecture.png └── Steps for Log4j,Extent,DataProvider.txt ├── .settings ├── org.eclipse.m2e.core.prefs └── org.eclipse.jdt.core.prefs ├── ScreenShots ├── verifyTitle_20200717114112.png ├── createAccountTest_20200727052435.png └── orderHistoryandDetailsTest_20200717113854.png ├── src ├── test │ ├── resources │ │ └── TestData │ │ │ └── TestData.xlsx │ └── java │ │ └── com │ │ └── mystore │ │ └── testcases │ │ ├── IndexPageTest.java │ │ ├── SearchResultPageTest.java │ │ ├── AddToCartPageTest.java │ │ ├── LoginPageTest.java │ │ ├── OrderPageTest.java │ │ ├── HomePageTest.java │ │ ├── AccountCreationPageTest.java │ │ └── EndToEndTest.java └── main │ └── java │ └── com │ └── mystore │ ├── pageobjects │ ├── AddressPage.java │ ├── OrderConfirmationPage.java │ ├── OrderSummary.java │ ├── PaymentPage.java │ ├── SearchResultPage.java │ ├── ShippingPage.java │ ├── HomePage.java │ ├── OrderPage.java │ ├── IndexPage.java │ ├── AddToCartPage.java │ ├── LoginPage.java │ └── AccountCreationPage.java │ ├── utility │ ├── Log.java │ ├── ExtentManager.java │ └── ListenerClass.java │ ├── actioninterface │ └── ActionInterface.java │ ├── base │ └── BaseClass.java │ └── dataprovider │ └── DataProviders.java ├── Configuration └── Config.properties ├── log4j.dtd ├── .project ├── testng_crossbrowser.xml ├── testng_all.xml ├── testng_smoke.xml ├── testng_sanity.xml ├── testng_regression.xml ├── log4j.xml ├── .classpath ├── extent-config.xml └── pom.xml /MyStoreProject/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Suite/Test.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Test] -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Suite/Sanity.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Sanity] -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Suite/Test_All.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Test_All] -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Suite/Regression.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Regression] -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Suite/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /MyStoreProject/test-output/old/CrossBrowser/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Default suite/Default test.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Default test] -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Default suite/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /MyStoreProject/Logo/MyStore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hverma22/MyProject/HEAD/MyStoreProject/Logo/MyStore.png -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/CrossBrowser/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

2 |
-------------------------------------------------------------------------------- /MyStoreProject/test-output/old/CrossBrowser/IETest.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=IETest][SuiteResult context=FirefoxTest] -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Default suite/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

2 |
-------------------------------------------------------------------------------- /MyStoreProject/test-output/failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hverma22/MyProject/HEAD/MyStoreProject/test-output/failed.png -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/CrossBrowser/FirefoxTest.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=IETest][SuiteResult context=FirefoxTest] -------------------------------------------------------------------------------- /MyStoreProject/test-output/passed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hverma22/MyProject/HEAD/MyStoreProject/test-output/passed.png -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/CrossBrowser/ChromeTest.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=ChromeTest][SuiteResult context=FirefoxTest] -------------------------------------------------------------------------------- /MyStoreProject/test-output/skipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hverma22/MyProject/HEAD/MyStoreProject/test-output/skipped.png -------------------------------------------------------------------------------- /MyStoreProject/test-output/collapseall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hverma22/MyProject/HEAD/MyStoreProject/test-output/collapseall.gif -------------------------------------------------------------------------------- /MyStoreProject/test-output/bullet_point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hverma22/MyProject/HEAD/MyStoreProject/test-output/bullet_point.png -------------------------------------------------------------------------------- /MyStoreProject/Documentation/PageNavigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hverma22/MyProject/HEAD/MyStoreProject/Documentation/PageNavigation.png -------------------------------------------------------------------------------- /MyStoreProject/test-output/navigator-bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hverma22/MyProject/HEAD/MyStoreProject/test-output/navigator-bullet.png -------------------------------------------------------------------------------- /MyStoreProject/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /MyStoreProject/Documentation/FrameworkArchitecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hverma22/MyProject/HEAD/MyStoreProject/Documentation/FrameworkArchitecture.png -------------------------------------------------------------------------------- /MyStoreProject/ScreenShots/verifyTitle_20200717114112.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hverma22/MyProject/HEAD/MyStoreProject/ScreenShots/verifyTitle_20200717114112.png -------------------------------------------------------------------------------- /MyStoreProject/src/test/resources/TestData/TestData.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hverma22/MyProject/HEAD/MyStoreProject/src/test/resources/TestData/TestData.xlsx -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Suite/main.html: -------------------------------------------------------------------------------- 1 | Results for Suite 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /MyStoreProject/ScreenShots/createAccountTest_20200727052435.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hverma22/MyProject/HEAD/MyStoreProject/ScreenShots/createAccountTest_20200727052435.png -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/CrossBrowser/main.html: -------------------------------------------------------------------------------- 1 | Results for CrossBrowser 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Default suite/main.html: -------------------------------------------------------------------------------- 1 | Results for Default suite 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /MyStoreProject/ScreenShots/orderHistoryandDetailsTest_20200717113854.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hverma22/MyProject/HEAD/MyStoreProject/ScreenShots/orderHistoryandDetailsTest_20200717113854.png -------------------------------------------------------------------------------- /MyStoreProject/Configuration/Config.properties: -------------------------------------------------------------------------------- 1 | url=http://automationpractice.com/index.php? 2 | username=admin@xyz.com 3 | password=admin@123 4 | browser=Chrome 5 | implicitWait= 10 6 | pageLoadTimeOut=40 -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Suite/index.html: -------------------------------------------------------------------------------- 1 | Results for Suite 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/CrossBrowser/index.html: -------------------------------------------------------------------------------- 1 | Results for CrossBrowser 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Default suite/index.html: -------------------------------------------------------------------------------- 1 | Results for Default suite 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MyStoreProject/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 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Default suite/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

2 | 3 |
Group nameMethods
SanityAccountCreationPageTest.verifyCreateAccountPageTest(java.lang.String)[pri:0, instance:com.mystore.testcases.AccountCreationPageTest@6ee52dcd]
4 | -------------------------------------------------------------------------------- /MyStoreProject/.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.enablePreviewFeatures=disabled 5 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 6 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore 7 | org.eclipse.jdt.core.compiler.release=disabled 8 | org.eclipse.jdt.core.compiler.source=1.8 9 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/CrossBrowser/ChromeTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/CrossBrowser/FirefoxTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/junitreports/TEST-com.mystore.testcases.OderPageTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/junitreports/TEST-com.mystore.testcases.EndToEndTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/junitreports/TEST-com.mystore.testcases.LoginPageTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/junitreports/TEST-com.mystore.testcases.OrderPageTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/junitreports/TEST-com.mystore.testcases.AddToCartPageTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/junitreports/TEST-com.mystore.testcases.SearchResultPageTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/junitreports/TEST-com.mystore.testcases.AccountCreationPageTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MyStoreProject/log4j.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /MyStoreProject/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | MyStoreProject 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 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/CrossBrowser/IETest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Test results

6 | 7 | 8 | 9 |
SuitePassedFailedSkippedtestng.xml
Total820 
Suite820Link
10 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/CrossBrowser/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

2 | 3 |
Group nameMethods
SmokeIndexPageTest.verifyLogo()[pri:0, instance:com.mystore.testcases.IndexPageTest@2781e022]
IndexPageTest.verifyLogo()[pri:0, instance:com.mystore.testcases.IndexPageTest@51e2adc7]
IndexPageTest.verifyLogo()[pri:0, instance:com.mystore.testcases.IndexPageTest@3d921e20]
IndexPageTest.verifyTitle()[pri:0, instance:com.mystore.testcases.IndexPageTest@2781e022]
IndexPageTest.verifyTitle()[pri:0, instance:com.mystore.testcases.IndexPageTest@51e2adc7]
IndexPageTest.verifyTitle()[pri:0, instance:com.mystore.testcases.IndexPageTest@3d921e20]
4 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Default suite/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for Default suite<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "https://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.mystore.testcases.AccountCreationPageTest"/>
    </classes>
  </test> <!-- Default test -->
</suite> <!-- Default suite -->
-------------------------------------------------------------------------------- /MyStoreProject/test-output/Default suite/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/CrossBrowser/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/pageobjects/AddressPage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.pageobjects; 5 | 6 | import org.openqa.selenium.WebElement; 7 | import org.openqa.selenium.support.FindBy; 8 | import org.openqa.selenium.support.PageFactory; 9 | 10 | import com.mystore.actiondriver.Action; 11 | import com.mystore.base.BaseClass; 12 | 13 | /** 14 | * @author Hitendra 15 | * 16 | */ 17 | public class AddressPage extends BaseClass { 18 | 19 | Action action= new Action(); 20 | 21 | @FindBy(xpath="//span[text()='Proceed to checkout']") 22 | private WebElement proceedToCheckOut; 23 | 24 | public AddressPage() { 25 | PageFactory.initElements(getDriver(), this); 26 | } 27 | 28 | public ShippingPage clickOnCheckOut() throws Throwable { 29 | action.click(getDriver(), proceedToCheckOut); 30 | return new ShippingPage(); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/pageobjects/OrderConfirmationPage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.pageobjects; 5 | 6 | import org.openqa.selenium.WebElement; 7 | import org.openqa.selenium.support.FindBy; 8 | import org.openqa.selenium.support.PageFactory; 9 | 10 | import com.mystore.actiondriver.Action; 11 | import com.mystore.base.BaseClass; 12 | 13 | /** 14 | * @author Hitendra 15 | * 16 | */ 17 | public class OrderConfirmationPage extends BaseClass { 18 | 19 | Action action= new Action(); 20 | 21 | @FindBy(xpath="//p/strong[contains(text(),'Your order on My Store is complete.')]") 22 | private WebElement confirmMessag; 23 | 24 | public OrderConfirmationPage() { 25 | PageFactory.initElements(getDriver(), this); 26 | } 27 | 28 | public String validateConfirmMessage() { 29 | String confirmMsg=confirmMessag.getText(); 30 | return confirmMsg; 31 | } 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Suite/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
com.mystore.base.BaseClass.loadConfig
com.mystore.base.BaseClass.loadConfig
com.mystore.base.BaseClass.loadConfig
com.mystore.base.BaseClass.loadConfig
com.mystore.base.BaseClass.loadConfig
com.mystore.base.BaseClass.loadConfig
com.mystore.base.BaseClass.loadConfig
com.mystore.base.BaseClass.afterSuite
com.mystore.base.BaseClass.afterSuite
com.mystore.base.BaseClass.afterSuite
com.mystore.base.BaseClass.afterSuite
com.mystore.base.BaseClass.afterSuite
com.mystore.base.BaseClass.afterSuite
com.mystore.base.BaseClass.afterSuite
-------------------------------------------------------------------------------- /MyStoreProject/testng_crossbrowser.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 | -------------------------------------------------------------------------------- /MyStoreProject/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 | 37 | 38 | 39 |
Class nameMethod nameGroups
com.mystore.testcases.AccountCreationPageTest  
@Test
 verifyCreateAccountPageTestSanity
@BeforeClass
@BeforeMethod
 setupSanity Regression Smoke
@AfterMethod
 tearDownSanity Regression Smoke
@AfterClass
40 | -------------------------------------------------------------------------------- /MyStoreProject/testng_all.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/pageobjects/OrderSummary.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.pageobjects; 5 | 6 | import java.security.PublicKey; 7 | 8 | import org.openqa.selenium.WebElement; 9 | import org.openqa.selenium.support.FindBy; 10 | import org.openqa.selenium.support.PageFactory; 11 | 12 | import com.mystore.actiondriver.Action; 13 | import com.mystore.base.BaseClass; 14 | 15 | /** 16 | * @author Hitendra 17 | * 18 | */ 19 | public class OrderSummary extends BaseClass { 20 | 21 | Action action= new Action(); 22 | 23 | @FindBy(xpath="//span[contains(text(),'I confirm my order')]") 24 | private WebElement confirmOrderBtn; 25 | 26 | public OrderSummary() { 27 | PageFactory.initElements(getDriver(), this); 28 | } 29 | 30 | public OrderConfirmationPage clickOnconfirmOrderBtn() throws Throwable { 31 | action.click(getDriver(), confirmOrderBtn); 32 | return new OrderConfirmationPage(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/pageobjects/PaymentPage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.pageobjects; 5 | 6 | import org.openqa.selenium.WebElement; 7 | import org.openqa.selenium.support.FindBy; 8 | import org.openqa.selenium.support.PageFactory; 9 | 10 | import com.mystore.actiondriver.Action; 11 | import com.mystore.base.BaseClass; 12 | 13 | /** 14 | * @author Hitendra 15 | * 16 | */ 17 | public class PaymentPage extends BaseClass { 18 | 19 | Action action= new Action(); 20 | 21 | @FindBy(xpath = "//a[contains(text(),'Pay by bank wire')]") 22 | private WebElement bankWireMethod; 23 | 24 | @FindBy(xpath = "//a[contains(text(),'Pay by check')]") 25 | private WebElement payByCheckMethod; 26 | 27 | public PaymentPage() { 28 | PageFactory.initElements(getDriver(), this); 29 | } 30 | 31 | public OrderSummary clickOnPaymentMethod() throws Throwable { 32 | action.click(getDriver(), bankWireMethod); 33 | return new OrderSummary(); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/CrossBrowser/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 |
Class nameMethod nameGroups
com.mystore.testcases.IndexPageTest  
@Test
 verifyLogoSmoke
 verifyTitleSmoke
@BeforeClass
@BeforeMethod
 setupSanity Regression Smoke
@AfterMethod
 tearDownSanity Regression Smoke
@AfterClass
45 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/pageobjects/SearchResultPage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.pageobjects; 5 | 6 | import org.openqa.selenium.WebElement; 7 | import org.openqa.selenium.support.FindBy; 8 | import org.openqa.selenium.support.PageFactory; 9 | 10 | import com.mystore.actiondriver.Action; 11 | import com.mystore.base.BaseClass; 12 | 13 | /** 14 | * @author Hitendra 15 | * 16 | */ 17 | public class SearchResultPage extends BaseClass { 18 | 19 | Action action= new Action(); 20 | 21 | @FindBy(xpath="//*[@id=\"center_column\"]//img") 22 | private WebElement productResult; 23 | 24 | public SearchResultPage() { 25 | PageFactory.initElements(getDriver(), this); 26 | } 27 | 28 | public boolean isProductAvailable() throws Throwable { 29 | return action.isDisplayed(getDriver(), productResult); 30 | } 31 | 32 | public AddToCartPage clickOnProduct() throws Throwable { 33 | action.click(getDriver(), productResult); 34 | return new AddToCartPage(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /MyStoreProject/testng_smoke.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 | -------------------------------------------------------------------------------- /MyStoreProject/testng_sanity.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 | -------------------------------------------------------------------------------- /MyStoreProject/testng_regression.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 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/pageobjects/ShippingPage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.pageobjects; 5 | 6 | import org.openqa.selenium.WebElement; 7 | import org.openqa.selenium.support.FindBy; 8 | import org.openqa.selenium.support.PageFactory; 9 | 10 | import com.mystore.actiondriver.Action; 11 | import com.mystore.base.BaseClass; 12 | 13 | /** 14 | * @author Hitendra 15 | * 16 | */ 17 | public class ShippingPage extends BaseClass { 18 | 19 | Action action= new Action(); 20 | 21 | @FindBy(id="cgv") 22 | private WebElement terms; 23 | 24 | @FindBy(xpath="//button/span[contains(text(),'Proceed to checkout')]") 25 | private WebElement proceedToCheckOutBtn; 26 | 27 | public ShippingPage() { 28 | PageFactory.initElements(getDriver(), this); 29 | } 30 | 31 | public void checkTheTerms() throws Throwable { 32 | action.click(getDriver(), terms); 33 | } 34 | 35 | public PaymentPage clickOnProceedToCheckOut() throws Throwable { 36 | action.click(getDriver(), proceedToCheckOutBtn); 37 | return new PaymentPage(); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /MyStoreProject/log4j.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /MyStoreProject/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 | 4 | 5 | 6 | 7 | 8 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
20/07/14 16:26:31 0 >>beforeSuite      main@1897115967
20/07/14 16:26:32 157  >>loadConfig     main@1897115967
9 | -------------------------------------------------------------------------------- /MyStoreProject/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 | 4 | 5 | 6 | 7 | 8 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
20/07/14 16:26:31 0 >>beforeSuite      main@1897115967
20/07/14 16:26:32 157  >>loadConfig     main@1897115967
9 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/pageobjects/HomePage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.pageobjects; 5 | 6 | import org.openqa.selenium.WebElement; 7 | import org.openqa.selenium.support.FindBy; 8 | import org.openqa.selenium.support.PageFactory; 9 | 10 | import com.mystore.actiondriver.Action; 11 | import com.mystore.base.BaseClass; 12 | 13 | /** 14 | * @author Hitendra 15 | * 16 | */ 17 | public class HomePage extends BaseClass { 18 | 19 | Action action= new Action(); 20 | 21 | @FindBy(xpath="//span[text()='My wishlists']") 22 | private WebElement myWishList; 23 | 24 | @FindBy(xpath = "//span[text()='Order history and details']") 25 | private WebElement orderHistory; 26 | 27 | public HomePage() { 28 | PageFactory.initElements(getDriver(), this); 29 | } 30 | 31 | 32 | public boolean validateMyWishList() throws Throwable { 33 | return action.isDisplayed(getDriver(), myWishList); 34 | } 35 | 36 | public boolean validateOrderHistory() throws Throwable { 37 | return action.isDisplayed(getDriver(), orderHistory); 38 | } 39 | 40 | public String getCurrURL() throws Throwable { 41 | String homePageURL=action.getCurrentURL(getDriver()); 42 | return homePageURL; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/utility/Log.java: -------------------------------------------------------------------------------- 1 | package com.mystore.utility; 2 | 3 | import org.apache.log4j.Logger; 4 | 5 | public class Log { 6 | 7 | // Initialize Log4j logs 8 | public static Logger Log = Logger.getLogger(Log.class.getName()); 9 | 10 | public static void startTestCase(String sTestCaseName){ 11 | Log.info("====================================="+sTestCaseName+" TEST START========================================="); 12 | } 13 | 14 | public static void endTestCase(String sTestCaseName){ 15 | Log.info("====================================="+sTestCaseName+" TEST END========================================="); 16 | } 17 | 18 | // Need to create below methods, so that they can be called 19 | 20 | public static void info(String message) { 21 | 22 | Log.info(message); 23 | 24 | } 25 | 26 | public static void warn(String message) { 27 | 28 | Log.warn(message); 29 | 30 | } 31 | 32 | public static void error(String message) { 33 | 34 | Log.error(message); 35 | 36 | } 37 | 38 | public static void fatal(String message) { 39 | 40 | Log.fatal(message); 41 | 42 | } 43 | 44 | public static void debug(String message) { 45 | 46 | Log.debug(message); 47 | 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /MyStoreProject/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 test8 classes10 methods:
14 |   chronological
15 |   alphabetical
16 |   not run (14)
3 groupsreporter outputtestng.xml
23 | 24 |

29 |

25 |
Test_All (8/2/0) 26 | Results 27 |
28 |
30 | -------------------------------------------------------------------------------- /MyStoreProject/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)
1 groupreporter outputtestng.xml
23 | 24 |

29 |

25 |
Default test (0/1/0) 26 | Results 27 |
28 |
30 | -------------------------------------------------------------------------------- /MyStoreProject/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 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /MyStoreProject/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 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /MyStoreProject/.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 | -------------------------------------------------------------------------------- /MyStoreProject/src/test/java/com/mystore/testcases/IndexPageTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.testcases; 5 | import org.testng.Assert; 6 | import org.testng.annotations.AfterMethod; 7 | import org.testng.annotations.BeforeMethod; 8 | import org.testng.annotations.Parameters; 9 | import org.testng.annotations.Test; 10 | import com.mystore.base.BaseClass; 11 | import com.mystore.pageobjects.IndexPage; 12 | import com.mystore.utility.Log; 13 | 14 | /** 15 | * @author Hitendra 16 | * 17 | */ 18 | public class IndexPageTest extends BaseClass { 19 | private IndexPage indexPage; 20 | 21 | @Parameters("browser") 22 | @BeforeMethod(groups = {"Smoke","Sanity","Regression"}) 23 | public void setup(String browser) { 24 | launchApp(browser); 25 | } 26 | 27 | @AfterMethod(groups = {"Smoke","Sanity","Regression"}) 28 | public void tearDown() { 29 | getDriver().quit(); 30 | } 31 | 32 | @Test(groups = "Smoke") 33 | public void verifyLogo() throws Throwable { 34 | Log.startTestCase("verifyLogo"); 35 | indexPage= new IndexPage(); 36 | boolean result=indexPage.validateLogo(); 37 | Assert.assertTrue(result); 38 | Log.endTestCase("verifyLogo"); 39 | } 40 | 41 | @Test(groups = "Smoke") 42 | public void verifyTitle() { 43 | Log.startTestCase("verifyTitle"); 44 | String actTitle=indexPage.getMyStoreTitle(); 45 | Assert.assertEquals(actTitle, "My Store1"); 46 | Log.endTestCase("verifyTitle"); 47 | } 48 | 49 | 50 | } 51 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/pageobjects/OrderPage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.pageobjects; 5 | 6 | import org.openqa.selenium.WebElement; 7 | import org.openqa.selenium.support.FindBy; 8 | import org.openqa.selenium.support.PageFactory; 9 | 10 | import com.mystore.actiondriver.Action; 11 | import com.mystore.base.BaseClass; 12 | 13 | /** 14 | * @author Hitendra 15 | * 16 | */ 17 | public class OrderPage extends BaseClass { 18 | 19 | Action action= new Action(); 20 | 21 | @FindBy(xpath="//td[@class='cart_unit']/span/span") 22 | private WebElement unitPrice; 23 | 24 | @FindBy(id="total_price") 25 | private WebElement totalPrice; 26 | 27 | @FindBy(xpath="//span[text()='Proceed to checkout']") 28 | private WebElement proceedToCheckOut; 29 | 30 | public OrderPage() { 31 | PageFactory.initElements(getDriver(), this); 32 | } 33 | 34 | public double getUnitPrice() { 35 | String unitPrice1=unitPrice.getText(); 36 | String unit=unitPrice1.replaceAll("[^a-zA-Z0-9]",""); 37 | double finalUnitPrice=Double.parseDouble(unit); 38 | return finalUnitPrice/100; 39 | } 40 | 41 | public double getTotalPrice() { 42 | String totalPrice1=totalPrice.getText(); 43 | String tot=totalPrice1.replaceAll("[^a-zA-Z0-9]",""); 44 | double finalTotalPrice=Double.parseDouble(tot); 45 | return finalTotalPrice/100; 46 | } 47 | 48 | public LoginPage clickOnCheckOut() throws Throwable { 49 | action.click(getDriver(), proceedToCheckOut); 50 | return new LoginPage(); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /MyStoreProject/src/test/java/com/mystore/testcases/SearchResultPageTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.testcases; 5 | 6 | import org.testng.Assert; 7 | import org.testng.annotations.AfterMethod; 8 | import org.testng.annotations.BeforeMethod; 9 | import org.testng.annotations.Parameters; 10 | import org.testng.annotations.Test; 11 | 12 | import com.mystore.base.BaseClass; 13 | import com.mystore.dataprovider.DataProviders; 14 | import com.mystore.pageobjects.IndexPage; 15 | import com.mystore.pageobjects.SearchResultPage; 16 | import com.mystore.utility.Log; 17 | 18 | /** 19 | * @author Hitendra 20 | * 21 | */ 22 | public class SearchResultPageTest extends BaseClass { 23 | private IndexPage index; 24 | private SearchResultPage searchResultPage; 25 | 26 | @Parameters("browser") 27 | @BeforeMethod(groups = {"Smoke","Sanity","Regression"}) 28 | public void setup(String browser) { 29 | launchApp(browser); 30 | } 31 | 32 | @AfterMethod(groups = {"Smoke","Sanity","Regression"}) 33 | public void tearDown() { 34 | getDriver().quit(); 35 | } 36 | 37 | @Test(groups = "Smoke",dataProvider = "searchProduct", dataProviderClass = DataProviders.class) 38 | public void productAvailabilityTest(String productName) throws Throwable { 39 | Log.startTestCase("productAvailabilityTest"); 40 | index= new IndexPage(); 41 | searchResultPage=index.searchProduct(productName); 42 | boolean result=searchResultPage.isProductAvailable(); 43 | Assert.assertTrue(result); 44 | Log.endTestCase("productAvailabilityTest"); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/utility/ExtentManager.java: -------------------------------------------------------------------------------- 1 | package com.mystore.utility; 2 | 3 | import com.aventstack.extentreports.ExtentReports; 4 | import com.aventstack.extentreports.ExtentTest; 5 | import com.aventstack.extentreports.reporter.ExtentHtmlReporter; 6 | /** 7 | * @author Hitendra: ExtentManager class is used for Extent Report 8 | * 9 | */ 10 | public class ExtentManager { 11 | 12 | public static ExtentHtmlReporter htmlReporter; 13 | public static ExtentReports extent; 14 | public static ExtentTest test; 15 | 16 | public static void setExtent() { 17 | //htmlReporter= new ExtentHtmlReporter(System.getProperty("user.dir")+"/test-output/ExtentReport/"+"MyReport_"+BaseClass.getCurrentTime()+".html"); 18 | htmlReporter= new ExtentHtmlReporter(System.getProperty("user.dir")+"/test-output/ExtentReport/"+"MyReport.html"); 19 | htmlReporter.loadXMLConfig(System.getProperty("user.dir")+"/extent-config.xml"); 20 | //htmlReporter.config().setDocumentTitle("Automation Test Report"); 21 | //htmlReporter.config().setReportName("OrangeHRM Test Automation Report"); 22 | //htmlReporter.config().setTheme(Theme.DARK); 23 | 24 | extent = new ExtentReports(); 25 | extent.attachReporter(htmlReporter); 26 | 27 | extent.setSystemInfo("HostName", "MyHost"); 28 | extent.setSystemInfo("ProjectName", "MyStoreProject"); 29 | extent.setSystemInfo("Tester", "Hitendra"); 30 | extent.setSystemInfo("OS", "Win10"); 31 | extent.setSystemInfo("Browser", "Chrome"); 32 | } 33 | public static void endReport() { 34 | extent.flush(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/CrossBrowser/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Results for CrossBrowser 4 | 5 | 6 | 7 | 8 |

Results for
CrossBrowser

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

29 |

25 |
FirefoxTest (2/0/0) 26 | Results 27 |
28 |
30 | 31 | 32 |

37 |

33 |
IETest (2/0/0) 34 | Results 35 |
36 |
38 | -------------------------------------------------------------------------------- /MyStoreProject/extent-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | standard 7 | 8 | 9 | 10 | UTF-8 11 | 12 | 13 | 14 | http 15 | 16 | 17 | MyStoreProject 18 | 19 | 20 | MyStoreProject Report 21 | 23 | ]]> 24 | 25 | 26 | 27 | 28 | 29 | bottom 30 | 31 | 32 | 33 | 38 | 39 | 40 | 41 | 42 | img { float: 44 | left;height: 90%;margin-left: 30px;margin-top: 3px;width: auto; } 45 | ]]> 46 | 47 | 48 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/pageobjects/IndexPage.java: -------------------------------------------------------------------------------- 1 | package com.mystore.pageobjects; 2 | 3 | import org.openqa.selenium.WebElement; 4 | import org.openqa.selenium.support.FindBy; 5 | import org.openqa.selenium.support.PageFactory; 6 | 7 | import com.mystore.actiondriver.Action; 8 | import com.mystore.base.BaseClass; 9 | 10 | public class IndexPage extends BaseClass { 11 | 12 | Action action= new Action(); 13 | 14 | @FindBy(xpath = "//a[@class='login']") 15 | private WebElement signInBtn; 16 | 17 | @FindBy(xpath = "//img[@class='logo img-responsive']") 18 | private WebElement myStoreLogo; 19 | 20 | @FindBy(id="search_query_top") 21 | private WebElement searchProductBox; 22 | 23 | @FindBy(name="submit_search") 24 | private WebElement searchButton; 25 | 26 | public IndexPage() { 27 | PageFactory.initElements(getDriver(), this); 28 | } 29 | 30 | public LoginPage clickOnSignIn() throws Throwable { 31 | action.fluentWait(getDriver(), signInBtn, 10); 32 | action.click(getDriver(), signInBtn); 33 | return new LoginPage(); 34 | } 35 | 36 | public boolean validateLogo() throws Throwable { 37 | return action.isDisplayed(getDriver(), myStoreLogo); 38 | } 39 | 40 | public String getMyStoreTitle() { 41 | String myStoreTitel=getDriver().getTitle(); 42 | return myStoreTitel; 43 | } 44 | 45 | public SearchResultPage searchProduct(String productName) throws Throwable { 46 | action.type(searchProductBox, productName); 47 | action.scrollByVisibilityOfElement(getDriver(), searchButton); 48 | action.click(getDriver(), searchButton); 49 | Thread.sleep(3000); 50 | return new SearchResultPage(); 51 | } 52 | 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Suite/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for Suite<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite guice-stage="DEVELOPMENT" name="Suite">
  <listeners>
    <listener class-name="com.mystore.utility.ListenerClass"/>
  </listeners>
  <test thread-count="5" name="Test_All">
    <parameter name="browser" value="Chrome"/>
    <classes>
      <class name="com.mystore.testcases.AccountCreationPageTest"/>
      <class name="com.mystore.testcases.AddToCartPageTest"/>
      <class name="com.mystore.testcases.HomePageTest"/>
      <class name="com.mystore.testcases.OrderPageTest"/>
      <class name="com.mystore.testcases.SearchResultPageTest"/>
      <class name="com.mystore.testcases.LoginPageTest"/>
      <class name="com.mystore.testcases.IndexPageTest"/>
      <class name="com.mystore.testcases.EndToEndTest"/>
    </classes>
  </test> <!-- Test_All -->
</suite> <!-- Suite -->
-------------------------------------------------------------------------------- /MyStoreProject/test-output/old/CrossBrowser/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for CrossBrowser<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite thread-count="6" guice-stage="DEVELOPMENT" name="CrossBrowser" parallel="tests">
  <test thread-count="6" name="ChromeTest" parallel="tests">
    <parameter name="browser" value="Chrome"/>
    <classes>
      <class name="com.mystore.testcases.IndexPageTest"/>
    </classes>
  </test> <!-- ChromeTest -->
  <test thread-count="6" name="FirefoxTest" parallel="tests">
    <parameter name="browser" value="Firefox"/>
    <classes>
      <class name="com.mystore.testcases.IndexPageTest"/>
    </classes>
  </test> <!-- FirefoxTest -->
  <test thread-count="6" name="IETest" parallel="tests">
    <parameter name="browser" value="IE"/>
    <classes>
      <class name="com.mystore.testcases.IndexPageTest"/>
    </classes>
  </test> <!-- IETest -->
</suite> <!-- CrossBrowser -->
-------------------------------------------------------------------------------- /MyStoreProject/src/test/java/com/mystore/testcases/AddToCartPageTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.testcases; 5 | 6 | import org.testng.Assert; 7 | import org.testng.annotations.AfterMethod; 8 | import org.testng.annotations.BeforeMethod; 9 | import org.testng.annotations.Parameters; 10 | import org.testng.annotations.Test; 11 | 12 | import com.mystore.base.BaseClass; 13 | import com.mystore.dataprovider.DataProviders; 14 | import com.mystore.pageobjects.AddToCartPage; 15 | import com.mystore.pageobjects.IndexPage; 16 | import com.mystore.pageobjects.SearchResultPage; 17 | import com.mystore.utility.Log; 18 | 19 | /** 20 | * @author Hitendra 21 | * 22 | */ 23 | public class AddToCartPageTest extends BaseClass { 24 | 25 | private IndexPage index; 26 | private SearchResultPage searchResultPage; 27 | private AddToCartPage addToCartPage; 28 | 29 | @Parameters("browser") 30 | @BeforeMethod(groups = {"Smoke","Sanity","Regression"}) 31 | public void setup(String browser) { 32 | launchApp(browser); 33 | } 34 | 35 | @AfterMethod(groups = {"Smoke","Sanity","Regression"}) 36 | public void tearDown() { 37 | getDriver().quit(); 38 | } 39 | 40 | @Test(groups = {"Regression","Sanity"}, dataProvider = "getProduct", dataProviderClass = DataProviders.class) 41 | public void addToCartTest(String productName, String qty, String size) throws Throwable { 42 | Log.startTestCase("addToCartTest"); 43 | index= new IndexPage(); 44 | searchResultPage=index.searchProduct(productName); 45 | addToCartPage=searchResultPage.clickOnProduct(); 46 | addToCartPage.enterQuantity(qty); 47 | addToCartPage.selectSize(size); 48 | addToCartPage.clickOnAddToCart(); 49 | boolean result=addToCartPage.validateAddtoCart(); 50 | Assert.assertTrue(result); 51 | Log.endTestCase("addToCartTest"); 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/pageobjects/AddToCartPage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.pageobjects; 5 | 6 | import org.openqa.selenium.WebElement; 7 | import org.openqa.selenium.support.FindBy; 8 | import org.openqa.selenium.support.PageFactory; 9 | 10 | import com.mystore.actiondriver.Action; 11 | import com.mystore.base.BaseClass; 12 | 13 | /** 14 | * @author Hitendra 15 | * 16 | */ 17 | public class AddToCartPage extends BaseClass { 18 | 19 | Action action= new Action(); 20 | 21 | @FindBy(id="quantity_wanted") 22 | private WebElement quantity; 23 | 24 | @FindBy(name="group_1") 25 | private WebElement size; 26 | 27 | @FindBy(xpath="//span[text()='Add to cart']") 28 | private WebElement addToCartBtn; 29 | 30 | @FindBy(xpath="//*[@id=\"layer_cart\"]//h2/i") 31 | private WebElement addToCartMessag; 32 | 33 | @FindBy(xpath="//span[contains(text(),'Proceed to checkout')]") 34 | private WebElement proceedToCheckOutBtn; 35 | 36 | public AddToCartPage() { 37 | PageFactory.initElements(getDriver(), this); 38 | } 39 | 40 | public void enterQuantity(String quantity1) throws Throwable { 41 | action.type(quantity, quantity1); 42 | } 43 | 44 | public void selectSize(String size1) throws Throwable { 45 | action.selectByVisibleText(size1, size); 46 | } 47 | 48 | public void clickOnAddToCart() throws Throwable { 49 | action.click(getDriver(), addToCartBtn); 50 | } 51 | 52 | public boolean validateAddtoCart() throws Throwable { 53 | action.fluentWait(getDriver(), addToCartMessag, 10); 54 | return action.isDisplayed(getDriver(), addToCartMessag); 55 | } 56 | 57 | public OrderPage clickOnCheckOut() throws Throwable { 58 | action.fluentWait(getDriver(), proceedToCheckOutBtn, 10); 59 | action.JSClick(getDriver(), proceedToCheckOutBtn); 60 | return new OrderPage(); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/Suite/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

2 | 3 | 4 | 5 |
Group nameMethods
RegressionAddToCartPageTest.addToCartTest(java.lang.String, java.lang.String, java.lang.String)[pri:0, instance:com.mystore.testcases.AddToCartPageTest@33c7e1bb]
OrderPageTest.verifyTotalPrice(java.lang.String, java.lang.String, java.lang.String)[pri:0, instance:com.mystore.testcases.OrderPageTest@52feb982]
EndToEndTest.endToEndTest(java.lang.String, java.lang.String, java.lang.String)[pri:0, instance:com.mystore.testcases.EndToEndTest@3043fe0e]
SanityLoginPageTest.loginTest(java.lang.String, java.lang.String)[pri:0, instance:com.mystore.testcases.LoginPageTest@76b0bfab]
AddToCartPageTest.addToCartTest(java.lang.String, java.lang.String, java.lang.String)[pri:0, instance:com.mystore.testcases.AddToCartPageTest@33c7e1bb]
AccountCreationPageTest.verifyCreateAccountPageTest(java.lang.String)[pri:0, instance:com.mystore.testcases.AccountCreationPageTest@30a3107a]
SmokeHomePageTest.wishListTest(java.lang.String, java.lang.String)[pri:0, instance:com.mystore.testcases.HomePageTest@34c4973]
LoginPageTest.loginTest(java.lang.String, java.lang.String)[pri:0, instance:com.mystore.testcases.LoginPageTest@76b0bfab]
IndexPageTest.verifyLogo()[pri:0, instance:com.mystore.testcases.IndexPageTest@17d677df]
IndexPageTest.verifyTitle()[pri:0, instance:com.mystore.testcases.IndexPageTest@17d677df]
SearchResultPageTest.productAvailabilityTest(java.lang.String)[pri:0, instance:com.mystore.testcases.SearchResultPageTest@7a765367]
HomePageTest.orderHistoryandDetailsTest(java.lang.String, java.lang.String)[pri:0, instance:com.mystore.testcases.HomePageTest@34c4973]
6 | -------------------------------------------------------------------------------- /MyStoreProject/Documentation/Steps for Log4j,Extent,DataProvider.txt: -------------------------------------------------------------------------------- 1 | 2 | 1. Log4j 3 | ================================================================================ 4 | 5 | -->Add/Create Log4j.xml in project directory 6 | 7 | -->Add/Create Log Class in utility Package 8 | 9 | -->Configure @BeforeSuite at BaseClass to configure log4j.xml 10 | DOMConfigurator.configure("log4j.xml"); 11 | 12 | -->Need to just Call in methods in testCase from Log class 13 | 14 | 15 | 16 | 17 | 2. DataDriven Testing and DataProvider 18 | ================================================================================ 19 | 20 | -->Add/Create ExcelLibrary in utility package. 21 | 22 | -->Create a Folder and add TestData.xlxs in that. 23 | 24 | -->Create a package for DataProvider and add DataProvider class there 25 | and create the object of ExcelLibrary Class 26 | 27 | -->Add the DataProvider methods 28 | 29 | -->Call the DataProvider methods from testcases 30 | 31 | 32 | 33 | 3. Extent Report 34 | ================================================================================ 35 | 36 | -->Add/Create extent-config.xml file for Extent Report Configuration 37 | 38 | -->Add/Create ExtentManager Class in utility Package-- to create the object 39 | of ExtentHtmlReporter and load extent-config.xml 40 | 41 | -->Create a folder ro Save Extent Report under test-output 42 | 43 | -->Configure ExtentManager.setExtent() in @BeforeSuite method in BaseClass 44 | 45 | -->Configure ExtentManager.endReport() in @AfterSuite method in BaseClass 46 | 47 | -->Add/Create screenShot method in Action/BaseClass 48 | 49 | To attach the screenshot in extent report 50 | -->Add/Create a Listener Class -- ListenerClass 51 | 52 | -->To call the listener Add the below listener (inside suite tag) 53 | setting in testng.xml 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/pageobjects/LoginPage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.pageobjects; 5 | 6 | import org.openqa.selenium.WebElement; 7 | import org.openqa.selenium.support.FindBy; 8 | import org.openqa.selenium.support.PageFactory; 9 | 10 | import com.mystore.actiondriver.Action; 11 | import com.mystore.base.BaseClass; 12 | 13 | /** 14 | * @author Hitendra 15 | * 16 | */ 17 | public class LoginPage extends BaseClass { 18 | 19 | Action action= new Action(); 20 | 21 | @FindBy(id="email") 22 | private WebElement userName; 23 | 24 | @FindBy(id="passwd") 25 | private WebElement password; 26 | 27 | @FindBy(id="SubmitLogin") 28 | private WebElement signInBtn; 29 | 30 | @FindBy(name="email_create") 31 | private WebElement emailForNewAccount; 32 | 33 | @FindBy(name="SubmitCreate") 34 | private WebElement createNewAccountBtn; 35 | 36 | public LoginPage() { 37 | PageFactory.initElements(getDriver(), this); 38 | } 39 | 40 | public HomePage login(String uname, String pswd,HomePage homePage) throws Throwable { 41 | action.scrollByVisibilityOfElement(getDriver(), userName); 42 | action.type(userName, uname); 43 | action.type(password, pswd); 44 | action.JSClick(getDriver(), signInBtn); 45 | Thread.sleep(2000); 46 | homePage=new HomePage(); 47 | return homePage; 48 | } 49 | 50 | public AddressPage login(String uname, String pswd,AddressPage addressPage) throws Throwable { 51 | action.scrollByVisibilityOfElement(getDriver(), userName); 52 | action.type(userName, uname); 53 | action.type(password, pswd); 54 | action.click(getDriver(), signInBtn); 55 | Thread.sleep(2000); 56 | addressPage=new AddressPage(); 57 | return addressPage; 58 | } 59 | 60 | public AccountCreationPage createNewAccount(String newEmail) throws Throwable { 61 | action.type(emailForNewAccount, newEmail); 62 | action.click(getDriver(), createNewAccountBtn); 63 | return new AccountCreationPage(); 64 | } 65 | 66 | } 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /MyStoreProject/src/test/java/com/mystore/testcases/LoginPageTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.testcases; 5 | import org.testng.Assert; 6 | import org.testng.annotations.AfterMethod; 7 | import org.testng.annotations.BeforeMethod; 8 | import org.testng.annotations.DataProvider; 9 | import org.testng.annotations.Parameters; 10 | import org.testng.annotations.Test; 11 | 12 | import com.mystore.base.BaseClass; 13 | import com.mystore.dataprovider.DataProviders; 14 | import com.mystore.pageobjects.HomePage; 15 | import com.mystore.pageobjects.IndexPage; 16 | import com.mystore.pageobjects.LoginPage; 17 | import com.mystore.utility.Log; 18 | 19 | /** 20 | * @author Hitendra 21 | * 22 | */ 23 | public class LoginPageTest extends BaseClass { 24 | private IndexPage indexPage; 25 | private LoginPage loginPage; 26 | private HomePage homePage; 27 | 28 | @Parameters("browser") 29 | @BeforeMethod(groups = {"Smoke","Sanity","Regression"}) 30 | public void setup(String browser) { 31 | launchApp(browser); 32 | } 33 | 34 | @AfterMethod(groups = {"Smoke","Sanity","Regression"}) 35 | public void tearDown() { 36 | getDriver().quit(); 37 | } 38 | @Test(groups = {"Smoke","Sanity"},dataProvider = "credentials", dataProviderClass = DataProviders.class) 39 | public void loginTest(String uname, String pswd) throws Throwable { 40 | Log.startTestCase("loginTest"); 41 | indexPage= new IndexPage(); 42 | Log.info("user is going to click on SignIn"); 43 | loginPage=indexPage.clickOnSignIn(); 44 | Log.info("Enter Username and Password"); 45 | //homePage=loginPage.login(prop.getProperty("username"), prop.getProperty("password")); 46 | homePage=loginPage.login(uname,pswd,homePage); 47 | String actualURL=homePage.getCurrURL(); 48 | String expectedURL="http://automationpractice.com/index.php?controller=my-account"; 49 | Log.info("Verifying if user is able to login"); 50 | Assert.assertEquals(actualURL, expectedURL); 51 | Log.info("Login is Sucess"); 52 | Log.endTestCase("loginTest"); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /MyStoreProject/src/test/java/com/mystore/testcases/OrderPageTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.testcases; 5 | 6 | import org.testng.Assert; 7 | import org.testng.annotations.AfterMethod; 8 | import org.testng.annotations.BeforeMethod; 9 | import org.testng.annotations.Parameters; 10 | import org.testng.annotations.Test; 11 | 12 | import com.mystore.base.BaseClass; 13 | import com.mystore.dataprovider.DataProviders; 14 | import com.mystore.pageobjects.AddToCartPage; 15 | import com.mystore.pageobjects.IndexPage; 16 | import com.mystore.pageobjects.OrderPage; 17 | import com.mystore.pageobjects.SearchResultPage; 18 | import com.mystore.utility.Log; 19 | 20 | /** 21 | * @author Hitendra 22 | * 23 | */ 24 | public class OrderPageTest extends BaseClass { 25 | 26 | private IndexPage index; 27 | private SearchResultPage searchResultPage; 28 | private AddToCartPage addToCartPage; 29 | private OrderPage orderPage; 30 | 31 | @Parameters("browser") 32 | @BeforeMethod(groups = {"Smoke","Sanity","Regression"}) 33 | public void setup(String browser) { 34 | launchApp(browser); 35 | } 36 | 37 | @AfterMethod(groups = {"Smoke","Sanity","Regression"}) 38 | public void tearDown() { 39 | getDriver().quit(); 40 | } 41 | 42 | @Test(groups = "Regression",dataProvider = "getProduct", dataProviderClass = DataProviders.class) 43 | public void verifyTotalPrice(String productName, String qty, String size) throws Throwable { 44 | Log.startTestCase("verifyTotalPrice"); 45 | index= new IndexPage(); 46 | searchResultPage=index.searchProduct(productName); 47 | addToCartPage=searchResultPage.clickOnProduct(); 48 | addToCartPage.enterQuantity(qty); 49 | addToCartPage.selectSize(size); 50 | addToCartPage.clickOnAddToCart(); 51 | orderPage=addToCartPage.clickOnCheckOut(); 52 | Double unitPrice=orderPage.getUnitPrice(); 53 | Double totalPrice=orderPage.getTotalPrice(); 54 | Double totalExpectedPrice=(unitPrice*(Double.parseDouble(qty)))+2; 55 | Assert.assertEquals(totalPrice, totalExpectedPrice); 56 | Log.endTestCase("verifyTotalPrice"); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /MyStoreProject/src/test/java/com/mystore/testcases/HomePageTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.testcases; 5 | 6 | import org.testng.Assert; 7 | import org.testng.annotations.AfterMethod; 8 | import org.testng.annotations.BeforeMethod; 9 | import org.testng.annotations.Parameters; 10 | import org.testng.annotations.Test; 11 | 12 | import com.mystore.base.BaseClass; 13 | import com.mystore.dataprovider.DataProviders; 14 | import com.mystore.pageobjects.HomePage; 15 | import com.mystore.pageobjects.IndexPage; 16 | import com.mystore.pageobjects.LoginPage; 17 | import com.mystore.utility.Log; 18 | 19 | /** 20 | * @author Hitendra 21 | * 22 | */ 23 | public class HomePageTest extends BaseClass { 24 | private IndexPage indexPage; 25 | private LoginPage loginPage; 26 | private HomePage homePage; 27 | 28 | @Parameters("browser") 29 | @BeforeMethod(groups = {"Smoke","Sanity","Regression"}) 30 | public void setup(String browser) { 31 | launchApp(browser); 32 | } 33 | 34 | @AfterMethod(groups = {"Smoke","Sanity","Regression"}) 35 | public void tearDown() { 36 | getDriver().quit(); 37 | } 38 | 39 | @Test(groups = "Smoke",dataProvider = "credentials", dataProviderClass = DataProviders.class) 40 | public void wishListTest(String uname, String pswd) throws Throwable { 41 | Log.startTestCase("wishListTest"); 42 | indexPage= new IndexPage(); 43 | loginPage=indexPage.clickOnSignIn(); 44 | homePage=loginPage.login(uname,pswd,homePage); 45 | boolean result=homePage.validateMyWishList(); 46 | Assert.assertTrue(result); 47 | Log.endTestCase("wishListTest"); 48 | } 49 | 50 | @Test(groups = "Smoke",dataProvider = "credentials", dataProviderClass = DataProviders.class) 51 | public void orderHistoryandDetailsTest(String uname, String pswd) throws Throwable { 52 | Log.startTestCase("orderHistoryandDetailsTest"); 53 | indexPage= new IndexPage(); 54 | loginPage=indexPage.clickOnSignIn(); 55 | homePage=loginPage.login(uname,pswd,homePage); 56 | boolean result=homePage.validateOrderHistory(); 57 | Assert.assertTrue(result); 58 | Log.endTestCase("orderHistoryandDetailsTest"); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/utility/ListenerClass.java: -------------------------------------------------------------------------------- 1 | package com.mystore.utility; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import org.apache.commons.io.FileUtils; 6 | import org.testng.ITestContext; 7 | import org.testng.ITestListener; 8 | import org.testng.ITestResult; 9 | import com.aventstack.extentreports.MediaEntityBuilder; 10 | import com.aventstack.extentreports.Status; 11 | import com.aventstack.extentreports.markuputils.ExtentColor; 12 | import com.aventstack.extentreports.markuputils.MarkupHelper; 13 | import com.mystore.actiondriver.Action; 14 | import com.mystore.base.BaseClass; 15 | 16 | 17 | public class ListenerClass extends ExtentManager implements ITestListener { 18 | 19 | Action action= new Action(); 20 | 21 | public void onTestStart(ITestResult result) { 22 | test = extent.createTest(result.getName()); 23 | } 24 | 25 | public void onTestSuccess(ITestResult result) { 26 | if (result.getStatus() == ITestResult.SUCCESS) { 27 | test.log(Status.PASS, "Pass Test case is: " + result.getName()); 28 | } 29 | } 30 | 31 | public void onTestFailure(ITestResult result) { 32 | if (result.getStatus() == ITestResult.FAILURE) { 33 | try { 34 | test.log(Status.FAIL, 35 | MarkupHelper.createLabel(result.getName() + " - Test Case Failed", ExtentColor.RED)); 36 | test.log(Status.FAIL, 37 | MarkupHelper.createLabel(result.getThrowable() + " - Test Case Failed", ExtentColor.RED)); 38 | String imgPath = action.screenShot(BaseClass.getDriver(), result.getName()); 39 | 40 | test.fail("ScreenShot is Attached", MediaEntityBuilder.createScreenCaptureFromPath(imgPath).build()); 41 | 42 | } catch (IOException e) { 43 | // TODO Auto-generated catch block 44 | e.printStackTrace(); 45 | } 46 | } 47 | } 48 | 49 | public void onTestSkipped(ITestResult result) { 50 | if (result.getStatus() == ITestResult.SKIP) { 51 | test.log(Status.SKIP, "Skipped Test case is: " + result.getName()); 52 | } 53 | } 54 | 55 | public void onTestFailedButWithinSuccessPercentage(ITestResult result) { 56 | // TODO Auto-generated method stub 57 | } 58 | 59 | public void onStart(ITestContext context) { 60 | // TODO Auto-generated method stub 61 | 62 | } 63 | 64 | public void onFinish(ITestContext context) { 65 | // TODO Auto-generated method stub 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/Suite/Test.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 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/CrossBrowser/ChromeTest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: ChromeTest 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

ChromeTest

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:2/0/0
Started on:Fri Jul 17 19:11:37 IST 2020
Total time:30 seconds (30370 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 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
verifyLogo
Test class: com.mystore.testcases.IndexPageTest
0com.mystore.testcases.IndexPageTest@2781e022
verifyTitle
Test class: com.mystore.testcases.IndexPageTest
0com.mystore.testcases.IndexPageTest@2781e022

88 | 89 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/Default suite/Default test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /MyStoreProject/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | MyStoreProject 6 | MyStoreProject 7 | 0.0.1-SNAPSHOT 8 | 9 | 10 | org.seleniumhq.selenium 11 | selenium-java 12 | 3.141.59 13 | 14 | 15 | 16 | org.testng 17 | testng 18 | 7.1.0 19 | compile 20 | 21 | 22 | 23 | org.apache.poi 24 | poi 25 | 4.1.2 26 | 27 | 28 | org.apache.poi 29 | poi-ooxml 30 | 4.1.2 31 | 32 | 33 | com.aventstack 34 | extentreports 35 | 4.0.9 36 | 37 | 38 | commons-io 39 | commons-io 40 | 2.6 41 | 42 | 43 | log4j 44 | log4j 45 | 1.2.17 46 | 47 | 48 | io.github.bonigarcia 49 | webdrivermanager 50 | 4.0.0 51 | 52 | 53 | 54 | 55 | 56 | 57 | org.apache.maven.plugins 58 | maven-compiler-plugin 59 | 3.8.1 60 | 61 | 1.8 62 | 1.8 63 | 64 | 65 | 66 | 67 | org.apache.maven.plugins 68 | maven-release-plugin 69 | 3.0.0-M1 70 | 71 | 72 | 73 | org.codehaus.mojo 74 | exec-maven-plugin 75 | 1.6.0 76 | 77 | 78 | org.apache.maven.plugins 79 | maven-surefire-plugin 80 | 3.0.0-M4 81 | 82 | 83 | ${xmlFiles} 84 | 85 | 86 | ${url} 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /MyStoreProject/src/test/java/com/mystore/testcases/AccountCreationPageTest.java: -------------------------------------------------------------------------------- 1 | package com.mystore.testcases; 2 | import java.util.HashMap; 3 | import org.testng.Assert; 4 | import org.testng.annotations.AfterMethod; 5 | import org.testng.annotations.BeforeMethod; 6 | import org.testng.annotations.Parameters; 7 | import org.testng.annotations.Test; 8 | import com.mystore.base.BaseClass; 9 | import com.mystore.dataprovider.DataProviders; 10 | import com.mystore.pageobjects.AccountCreationPage; 11 | import com.mystore.pageobjects.HomePage; 12 | import com.mystore.pageobjects.IndexPage; 13 | import com.mystore.pageobjects.LoginPage; 14 | import com.mystore.utility.Log; 15 | 16 | public class AccountCreationPageTest extends BaseClass { 17 | private IndexPage indexPage; 18 | private LoginPage loginPage; 19 | private AccountCreationPage acountCreationPage; 20 | private HomePage homePage; 21 | 22 | @Parameters("browser") 23 | @BeforeMethod(groups = {"Smoke","Sanity","Regression"}) 24 | public void setup(String browser) { 25 | launchApp(browser); 26 | } 27 | 28 | @AfterMethod(groups = {"Smoke","Sanity","Regression"}) 29 | public void tearDown() { 30 | getDriver().quit(); 31 | } 32 | 33 | @Test(groups = "Sanity",dataProvider = "email", dataProviderClass = DataProviders.class) 34 | public void verifyCreateAccountPageTest(String email) throws Throwable { 35 | Log.startTestCase("verifyCreateAccountPageTest"); 36 | indexPage= new IndexPage(); 37 | loginPage=indexPage.clickOnSignIn(); 38 | acountCreationPage=loginPage.createNewAccount(email); 39 | boolean result=acountCreationPage.validateAcountCreatePage(); 40 | Assert.assertTrue(result); 41 | Log.endTestCase("verifyCreateAccountPageTest"); 42 | } 43 | 44 | @Test(groups = "Regression",dataProvider = "newAcountDetailsData",dataProviderClass = DataProviders.class) 45 | public void createAccountTest(HashMap hashMapValue) throws Throwable { 46 | Log.startTestCase("createAccountTest"); 47 | indexPage= new IndexPage(); 48 | loginPage=indexPage.clickOnSignIn(); 49 | acountCreationPage=loginPage.createNewAccount(hashMapValue.get("Email")); 50 | acountCreationPage.createAccount( 51 | hashMapValue.get("Gender"), 52 | hashMapValue.get("FirstName"), 53 | hashMapValue.get("LastName"), 54 | hashMapValue.get("SetPassword"), 55 | hashMapValue.get("Day"), 56 | hashMapValue.get("Month"), 57 | hashMapValue.get("Year"), 58 | hashMapValue.get("Company"), 59 | hashMapValue.get("Address"), 60 | hashMapValue.get("City"), 61 | hashMapValue.get("State"), 62 | hashMapValue.get("Zipcode"), 63 | hashMapValue.get("Country"), 64 | hashMapValue.get("MobilePhone")); 65 | homePage=acountCreationPage.validateRegistration(); 66 | Assert.assertEquals("http://automationpractice.com/index.php?controller=my-account", homePage.getCurrURL()); 67 | Log.endTestCase("createAccountTest"); 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/actioninterface/ActionInterface.java: -------------------------------------------------------------------------------- 1 | package com.mystore.actioninterface; 2 | 3 | import org.openqa.selenium.WebDriver; 4 | import org.openqa.selenium.WebElement; 5 | 6 | public interface ActionInterface { 7 | 8 | //Added all user actions abstract methods to achieve Abstraction 9 | public void scrollByVisibilityOfElement(WebDriver driver, WebElement ele); 10 | public void click(WebDriver ldriver, WebElement ele); 11 | public boolean isDisplayed(WebDriver ldriver, WebElement ele); 12 | public boolean type(WebElement ele, String text); 13 | public boolean findElement(WebDriver ldriver, WebElement ele); 14 | public boolean isSelected(WebDriver ldriver, WebElement ele); 15 | public boolean isEnabled(WebDriver ldriver, WebElement ele); 16 | public boolean selectBySendkeys(String value,WebElement ele); 17 | public boolean selectByIndex(WebElement element, int index); 18 | public boolean selectByValue(WebElement element,String value); 19 | public boolean selectByVisibleText(String visibletext, WebElement ele); 20 | public boolean mouseHoverByJavaScript(WebElement locator); 21 | public boolean JSClick(WebDriver driver, WebElement ele); 22 | public boolean switchToFrameByIndex(WebDriver driver,int index); 23 | public boolean switchToFrameById(WebDriver driver,String idValue); 24 | public boolean switchToFrameByName(WebDriver driver,String nameValue); 25 | public boolean switchToDefaultFrame(WebDriver driver); 26 | public void mouseOverElement(WebDriver driver,WebElement element); 27 | public boolean moveToElement(WebDriver driver, WebElement ele); 28 | public boolean mouseover(WebDriver driver, WebElement ele); 29 | public boolean draggable(WebDriver driver,WebElement source, int x, int y); 30 | public boolean draganddrop(WebDriver driver,WebElement source, WebElement target); 31 | public boolean slider(WebDriver driver,WebElement ele, int x, int y); 32 | public boolean rightclick(WebDriver driver,WebElement ele); 33 | public boolean switchWindowByTitle(WebDriver driver,String windowTitle, int count); 34 | public boolean switchToNewWindow(WebDriver driver); 35 | public boolean switchToOldWindow(WebDriver driver); 36 | public int getColumncount(WebElement row); 37 | public int getRowCount(WebElement table); 38 | public boolean Alert(WebDriver driver); 39 | public boolean launchUrl(WebDriver driver,String url); 40 | public boolean isAlertPresent(WebDriver driver); 41 | public String getCurrentURL(WebDriver driver); 42 | public String getTitle(WebDriver driver); 43 | public boolean click1(WebElement locator, String locatorName); 44 | public void fluentWait(WebDriver driver,WebElement element, int timeOut); 45 | public void implicitWait(WebDriver driver, int timeOut); 46 | public void explicitWait(WebDriver driver, WebElement element, int timeOut); 47 | public void pageLoadTimeOut(WebDriver driver, int timeOut); 48 | public String screenShot(WebDriver driver, String filename); 49 | public String getCurrentTime(); 50 | 51 | } 52 | -------------------------------------------------------------------------------- /MyStoreProject/src/test/java/com/mystore/testcases/EndToEndTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.testcases; 5 | 6 | import org.testng.Assert; 7 | import org.testng.annotations.AfterMethod; 8 | import org.testng.annotations.BeforeMethod; 9 | import org.testng.annotations.Parameters; 10 | import org.testng.annotations.Test; 11 | 12 | import com.mystore.base.BaseClass; 13 | import com.mystore.dataprovider.DataProviders; 14 | import com.mystore.pageobjects.AddToCartPage; 15 | import com.mystore.pageobjects.AddressPage; 16 | import com.mystore.pageobjects.IndexPage; 17 | import com.mystore.pageobjects.LoginPage; 18 | import com.mystore.pageobjects.OrderConfirmationPage; 19 | import com.mystore.pageobjects.OrderPage; 20 | import com.mystore.pageobjects.OrderSummary; 21 | import com.mystore.pageobjects.PaymentPage; 22 | import com.mystore.pageobjects.SearchResultPage; 23 | import com.mystore.pageobjects.ShippingPage; 24 | import com.mystore.utility.Log; 25 | 26 | /** 27 | * @author Hitendra 28 | * 29 | */ 30 | public class EndToEndTest extends BaseClass { 31 | 32 | private IndexPage index; 33 | private SearchResultPage searchResultPage; 34 | private AddToCartPage addToCartPage; 35 | private OrderPage orderPage; 36 | private LoginPage loginPage; 37 | private AddressPage addressPage; 38 | private ShippingPage shippingPage; 39 | private PaymentPage paymentPage; 40 | private OrderSummary orderSummary; 41 | private OrderConfirmationPage orderConfirmationPage; 42 | 43 | @Parameters("browser") 44 | @BeforeMethod(groups = {"Smoke","Sanity","Regression"}) 45 | public void setup(String browser) { 46 | launchApp(browser); 47 | } 48 | 49 | @AfterMethod(groups = {"Smoke","Sanity","Regression"}) 50 | public void tearDown() { 51 | getDriver().quit(); 52 | } 53 | 54 | @Test(groups = "Regression",dataProvider = "getProduct", dataProviderClass = DataProviders.class) 55 | public void endToEndTest(String productName, String qty, String size) throws Throwable { 56 | Log.startTestCase("endToEndTest"); 57 | index= new IndexPage(); 58 | searchResultPage=index.searchProduct(productName); 59 | addToCartPage=searchResultPage.clickOnProduct(); 60 | addToCartPage.enterQuantity(qty); 61 | addToCartPage.selectSize(size); 62 | addToCartPage.clickOnAddToCart(); 63 | orderPage=addToCartPage.clickOnCheckOut(); 64 | loginPage=orderPage.clickOnCheckOut(); 65 | addressPage=loginPage.login(prop.getProperty("username"), prop.getProperty("password"),addressPage); 66 | shippingPage=addressPage.clickOnCheckOut(); 67 | shippingPage.checkTheTerms(); 68 | paymentPage=shippingPage.clickOnProceedToCheckOut(); 69 | orderSummary=paymentPage.clickOnPaymentMethod(); 70 | orderConfirmationPage=orderSummary.clickOnconfirmOrderBtn(); 71 | String actualMessage=orderConfirmationPage.validateConfirmMessage(); 72 | String expectedMsg="Your order on My Store is complete."; 73 | Assert.assertEquals(actualMessage, expectedMsg); 74 | Log.endTestCase("endToEndTest"); 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/Suite/Regression.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: Regression 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

Regression

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:3/0/0
Started on:Fri Jul 17 19:13:25 IST 2020
Total time:105 seconds (105700 ms)
Included groups:Regression
Excluded groups:

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

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
addToCartTest
Test class: com.mystore.testcases.AddToCartPageTest
Parameters: t-shirt, 2.0, M
12com.mystore.testcases.AddToCartPageTest@3043fe0e
endToEndTest
Test class: com.mystore.testcases.EndToEndTest
Parameters: t-shirt, 2.0, M
33com.mystore.testcases.EndToEndTest@78e67e0a
verifyTotalPrice
Test class: com.mystore.testcases.OrderPageTest
Parameters: t-shirt, 2.0, M
16com.mystore.testcases.OrderPageTest@17d677df

93 | 94 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/Suite/Sanity.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: Sanity 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

Sanity

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:3/0/0
Started on:Fri Jul 17 19:15:37 IST 2020
Total time:68 seconds (68093 ms)
Included groups:Sanity
Excluded groups:

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

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
addToCartTest
Test class: com.mystore.testcases.AddToCartPageTest
Parameters: t-shirt, 2.0, M
9com.mystore.testcases.AddToCartPageTest@3043fe0e
loginTest
Test class: com.mystore.testcases.LoginPageTest
Parameters: admin@xyz.com, admin@123
9com.mystore.testcases.LoginPageTest@17d677df
verifyCreateAccountPageTest
Test class: com.mystore.testcases.AccountCreationPageTest
Parameters: ghfsdtyfg@gmail.com
7com.mystore.testcases.AccountCreationPageTest@78e67e0a

93 | 94 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/junitreports/TEST-com.mystore.testcases.HomePageTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/CrossBrowser/FirefoxTest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: FirefoxTest 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

FirefoxTest

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:2/0/0
Started on:Fri Jul 17 19:11:37 IST 2020
Total time:38 seconds (38380 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 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
verifyLogo
Test class: com.mystore.testcases.IndexPageTest
0com.mystore.testcases.IndexPageTest@2781e022
verifyLogo
Test class: com.mystore.testcases.IndexPageTest
0com.mystore.testcases.IndexPageTest@51e2adc7
verifyTitle
Test class: com.mystore.testcases.IndexPageTest
0com.mystore.testcases.IndexPageTest@2781e022
verifyTitle
Test class: com.mystore.testcases.IndexPageTest
0com.mystore.testcases.IndexPageTest@51e2adc7

98 | 99 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/junitreports/TEST-com.mystore.testcases.IndexPageTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/base/BaseClass.java: -------------------------------------------------------------------------------- 1 | package com.mystore.base; 2 | 3 | import java.io.FileInputStream; 4 | import java.io.FileNotFoundException; 5 | import java.io.IOException; 6 | import java.util.Properties; 7 | import java.util.concurrent.TimeUnit; 8 | 9 | import org.apache.log4j.xml.DOMConfigurator; 10 | import org.ietf.jgss.Oid; 11 | import org.openqa.selenium.WebDriver; 12 | import org.openqa.selenium.chrome.ChromeDriver; 13 | import org.openqa.selenium.firefox.FirefoxDriver; 14 | import org.openqa.selenium.ie.InternetExplorerDriver; 15 | import org.openqa.selenium.remote.RemoteWebDriver; 16 | import org.testng.annotations.AfterSuite; 17 | import org.testng.annotations.BeforeSuite; 18 | import org.testng.annotations.BeforeTest; 19 | import org.testng.annotations.Parameters; 20 | 21 | import com.beust.jcommander.Parameter; 22 | import com.mystore.actiondriver.Action; 23 | import com.mystore.utility.ExtentManager; 24 | 25 | import io.github.bonigarcia.wdm.WebDriverManager; 26 | /** 27 | * @author Hitendra: BaseClass is used to load the config file and Initialize 28 | * WebDriver 29 | * 30 | */ 31 | public class BaseClass { 32 | public static Properties prop; 33 | 34 | // Declare ThreadLocal Driver 35 | public static ThreadLocal driver = new ThreadLocal<>(); 36 | 37 | //loadConfig method is to load the configuration 38 | @BeforeSuite(groups = { "Smoke", "Sanity", "Regression" }) 39 | public void loadConfig() { 40 | ExtentManager.setExtent(); 41 | DOMConfigurator.configure("log4j.xml"); 42 | 43 | try { 44 | prop = new Properties(); 45 | FileInputStream ip = new FileInputStream( 46 | System.getProperty("user.dir") + "\\Configuration\\config.properties"); 47 | prop.load(ip); 48 | 49 | } catch (FileNotFoundException e) { 50 | e.printStackTrace(); 51 | } catch (IOException e) { 52 | e.printStackTrace(); 53 | } 54 | } 55 | 56 | public static WebDriver getDriver() { 57 | // Get Driver from threadLocalmap 58 | return driver.get(); 59 | } 60 | 61 | public void launchApp(String browserName) { 62 | // String browserName = prop.getProperty("browser"); 63 | if (browserName.equalsIgnoreCase("Chrome")) { 64 | WebDriverManager.chromedriver().setup(); 65 | // Set Browser to ThreadLocalMap 66 | driver.set(new ChromeDriver()); 67 | } else if (browserName.equalsIgnoreCase("FireFox")) { 68 | WebDriverManager.firefoxdriver().setup(); 69 | driver.set(new FirefoxDriver()); 70 | } else if (browserName.equalsIgnoreCase("IE")) { 71 | WebDriverManager.iedriver().setup(); 72 | driver.set(new InternetExplorerDriver()); 73 | } 74 | //Maximize the screen 75 | getDriver().manage().window().maximize(); 76 | //Delete all the cookies 77 | getDriver().manage().deleteAllCookies(); 78 | //Implicit TimeOuts 79 | getDriver().manage().timeouts().implicitlyWait 80 | (Integer.parseInt(prop.getProperty("implicitWait")),TimeUnit.SECONDS); 81 | //PageLoad TimeOuts 82 | getDriver().manage().timeouts().pageLoadTimeout 83 | (Integer.parseInt(prop.getProperty("pageLoadTimeOut")),TimeUnit.SECONDS); 84 | //Launching the URL 85 | getDriver().get(prop.getProperty("url")); 86 | } 87 | 88 | @AfterSuite(groups = { "Smoke", "Regression","Sanity" }) 89 | public void afterSuite() { 90 | ExtentManager.endReport(); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/pageobjects/AccountCreationPage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.pageobjects; 5 | import org.openqa.selenium.WebElement; 6 | import org.openqa.selenium.support.FindBy; 7 | import org.openqa.selenium.support.PageFactory; 8 | import com.mystore.actiondriver.Action; 9 | import com.mystore.base.BaseClass; 10 | 11 | /** 12 | * @author Hitendra 13 | * 14 | */ 15 | public class AccountCreationPage extends BaseClass { 16 | 17 | Action action= new Action(); 18 | 19 | @FindBy(xpath = "//h1[text()='Create an account']") 20 | private WebElement formTitle; 21 | 22 | @FindBy(id = "uniform-id_gender1") 23 | private WebElement mr; 24 | 25 | @FindBy(id = "id_gender2") 26 | private WebElement mrs; 27 | 28 | @FindBy(name = "customer_firstname") 29 | private WebElement firstName; 30 | 31 | @FindBy(name = "customer_lastname") 32 | private WebElement lastName; 33 | 34 | @FindBy(name = "passwd") 35 | private WebElement passWord; 36 | 37 | @FindBy(name = "days") 38 | private WebElement days; 39 | 40 | @FindBy(name = "months") 41 | private WebElement months; 42 | 43 | @FindBy(name = "years") 44 | private WebElement years; 45 | 46 | @FindBy(name = "firstname") 47 | private WebElement customerNirstName; 48 | 49 | @FindBy(name = "lastname") 50 | private WebElement customerLastName; 51 | 52 | @FindBy(name = "company") 53 | private WebElement companyName; 54 | 55 | @FindBy(name = "address1") 56 | private WebElement address; 57 | 58 | @FindBy(name = "city") 59 | private WebElement city; 60 | 61 | @FindBy(name = "id_state") 62 | private WebElement state; 63 | 64 | @FindBy(name = "postcode") 65 | private WebElement postCode; 66 | 67 | @FindBy(name = "id_country") 68 | private WebElement country; 69 | 70 | @FindBy(name = "phone") 71 | private WebElement phone; 72 | 73 | @FindBy(name = "phone_mobile") 74 | private WebElement mobile; 75 | 76 | @FindBy(name = "alias") 77 | private WebElement ref; 78 | 79 | @FindBy(name = "submitAccount") 80 | private WebElement registerBtn; 81 | 82 | public AccountCreationPage() { 83 | PageFactory.initElements(getDriver(), this); 84 | } 85 | 86 | public void createAccount(String gender,String fName, 87 | String lName, 88 | String pswd, 89 | String day, 90 | String month, 91 | String year, 92 | String comPany, 93 | String addr, 94 | String cityString, 95 | String stateName, 96 | String zip, 97 | String countryName, 98 | String mobilePhone) throws Throwable { 99 | 100 | if(gender.equalsIgnoreCase("Mr")) { 101 | action.click(getDriver(), mr); 102 | } else { 103 | action.click(getDriver(), mrs); 104 | } 105 | 106 | action.type(firstName, fName); 107 | action.type(lastName, lName); 108 | action.type(passWord, pswd); 109 | action.selectByValue(days, day); 110 | action.selectByValue(months, month); 111 | action.selectByValue(years, year); 112 | action.type(companyName, comPany); 113 | action.type(address, addr); 114 | action.type(city, cityString); 115 | action.selectByVisibleText(stateName, state); 116 | action.type(postCode, zip); 117 | action.selectByVisibleText(countryName, country); 118 | action.type(mobile, mobilePhone); 119 | } 120 | 121 | public HomePage validateRegistration() throws Throwable { 122 | registerBtn.click(); 123 | return new HomePage(); 124 | } 125 | 126 | public boolean validateAcountCreatePage() throws Throwable { 127 | return action.isDisplayed(getDriver(), formTitle); 128 | } 129 | 130 | } 131 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/CrossBrowser/IETest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: IETest 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

IETest

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:2/0/0
Started on:Fri Jul 17 19:11:37 IST 2020
Total time:27 seconds (27348 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 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
verifyLogo
Test class: com.mystore.testcases.IndexPageTest
0com.mystore.testcases.IndexPageTest@2781e022
verifyLogo
Test class: com.mystore.testcases.IndexPageTest
6com.mystore.testcases.IndexPageTest@3d921e20
verifyLogo
Test class: com.mystore.testcases.IndexPageTest
0com.mystore.testcases.IndexPageTest@51e2adc7
verifyTitle
Test class: com.mystore.testcases.IndexPageTest
0com.mystore.testcases.IndexPageTest@3d921e20
verifyTitle
Test class: com.mystore.testcases.IndexPageTest
0com.mystore.testcases.IndexPageTest@2781e022
verifyTitle
Test class: com.mystore.testcases.IndexPageTest
0com.mystore.testcases.IndexPageTest@51e2adc7

108 | 109 | -------------------------------------------------------------------------------- /MyStoreProject/src/main/java/com/mystore/dataprovider/DataProviders.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.mystore.dataprovider; 5 | 6 | import java.util.ArrayList; 7 | import java.util.HashMap; 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | import org.testng.annotations.DataProvider; 12 | 13 | import com.mystore.utility.NewExcelLibrary; 14 | 15 | /** 16 | * @author Hitendra 17 | * 18 | */ 19 | public class DataProviders { 20 | 21 | NewExcelLibrary obj = new NewExcelLibrary(); 22 | 23 | //Class --> LoginPageTest,HomePageTest Test Case--> loginTest, wishListTest, orderHistoryandDetailsTest 24 | 25 | @DataProvider(name = "credentials") 26 | public Object[][] getCredentials() { 27 | // Totals rows count 28 | int rows = obj.getRowCount("Credentials"); 29 | // Total Columns 30 | int column = obj.getColumnCount("Credentials"); 31 | int actRows = rows - 1; 32 | 33 | Object[][] data = new Object[actRows][column]; 34 | 35 | for (int i = 0; i < actRows; i++) { 36 | for (int j = 0; j < column; j++) { 37 | data[i][j] = obj.getCellData("Credentials", j, i + 2); 38 | } 39 | } 40 | return data; 41 | } 42 | 43 | //Class --> AccountCreationPage Test Case--> verifyCreateAccountPageTest 44 | @DataProvider(name = "email") 45 | public Object[][] getEmail() { 46 | // Totals rows count 47 | int rows = obj.getRowCount("Email"); 48 | // Total Columns 49 | int column = obj.getColumnCount("Email"); 50 | int actRows = rows - 1; 51 | 52 | Object[][] data = new Object[actRows][column]; 53 | 54 | for (int i = 0; i < actRows; i++) { 55 | for (int j = 0; j < column; j++) { 56 | data[i][j] = obj.getCellData("Email", j, i + 2); 57 | } 58 | } 59 | return data; 60 | } 61 | 62 | //Class --> AddToCartPageTest, EndToEndTest, Test Case--> addToCartTest, endToEndTest 63 | @DataProvider(name = "getProduct") 64 | public Object[][] getProduct() { 65 | // Totals rows count 66 | int rows = obj.getRowCount("ProductDetails"); 67 | // Total Columns 68 | int column = obj.getColumnCount("ProductDetails"); 69 | int actRows = rows - 1; 70 | 71 | Object[][] data = new Object[actRows][column]; 72 | 73 | for (int i = 0; i < actRows; i++) { 74 | for (int j = 0; j < column; j++) { 75 | data[i][j] = obj.getCellData("ProductDetails", j, i + 2); 76 | } 77 | } 78 | return data; 79 | } 80 | 81 | // Class --> SearchResultPageTest, Test Case--> productAvailabilityTest 82 | @DataProvider(name = "searchProduct") 83 | public Object[][] getProductPrice() { 84 | // Totals rows count 85 | int rows = obj.getRowCount("SearchProduct"); 86 | // Total Columns 87 | int column = obj.getColumnCount("SearchProduct"); 88 | int actRows = rows - 1; 89 | 90 | Object[][] data = new Object[actRows][column]; 91 | 92 | for (int i = 0; i < actRows; i++) { 93 | for (int j = 0; j < column; j++) { 94 | data[i][j] = obj.getCellData("SearchProduct", j, i + 2); 95 | } 96 | } 97 | return data; 98 | } 99 | 100 | @DataProvider(name = "newAcountDetailsData") 101 | public Object[][] accountCreation() { 102 | 103 | // Totals rows count 104 | int rows = obj.getRowCount("AccountCreationData"); 105 | // Total Columns 106 | int column = obj.getColumnCount("AccountCreationData"); 107 | int actRows = rows - 1; 108 | //Created an object of array to store data 109 | Object[][] data = new Object[actRows][1]; 110 | 111 | for (int i = 0; i < actRows; i++) { 112 | Map hashMap = new HashMap<>(); 113 | for (int j = 0; j < column; j++) { 114 | hashMap.put(obj.getCellData("AccountCreationData", j, 1), 115 | obj.getCellData("AccountCreationData", j, i + 2)); 116 | } 117 | data[i][0]=hashMap; 118 | } 119 | return data; 120 | } 121 | 122 | } 123 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/Suite/Sanity.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 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/Suite/Regression.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 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/testng-reports.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | $('a.navigator-link').on("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').on("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().trigger("click"); 26 | 27 | // Collapse/expand the suites 28 | $('a.collapse-all-link').on("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).on("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).on("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).trigger("click"); 78 | } else { 79 | $('a.show-methods.' + name).trigger("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 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/Suite/Test_All.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 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 | 71 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/Suite/Test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: Test 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

Test

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:9/0/0
Started on:Mon Jul 13 17:22:50 IST 2020
Total time:202 seconds (202075 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 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
addToCartTest
Test class: com.mystore.testcases.AddToCartPageTest
11com.mystore.testcases.AddToCartPageTest@7a1ebcd8
endToEndTest
Test class: com.mystore.testcases.EndToEndTest
35com.mystore.testcases.EndToEndTest@ea1a8d5
orderHistoryandDetailsTest
Test class: com.mystore.testcases.HomePageTest
8com.mystore.testcases.HomePageTest@458c1321
productAvailabilityTest
Test class: com.mystore.testcases.SearchResultPageTest
5com.mystore.testcases.SearchResultPageTest@34cd072c
verifyCreateAccountPageTest
Test class: com.mystore.testcases.AccountCreationPageTest
6com.mystore.testcases.AccountCreationPageTest@5faeada1
verifyLogo
Test class: com.mystore.testcases.IndexPageTest
0com.mystore.testcases.IndexPageTest@528931cf
verifyTitle
Test class: com.mystore.testcases.IndexPageTest
0com.mystore.testcases.IndexPageTest@528931cf
verifyTotalPrice
Test class: com.mystore.testcases.OrderPageTest
15com.mystore.testcases.OrderPageTest@11438d26
wishListTest
Test class: com.mystore.testcases.HomePageTest
9com.mystore.testcases.HomePageTest@458c1321

123 | 124 | -------------------------------------------------------------------------------- /MyStoreProject/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 | 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 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 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 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 |
Class nameMethod nameGroups
com.mystore.testcases.AccountCreationPageTest  
@Test
 verifyCreateAccountPageTestSanity
@BeforeClass
@BeforeMethod
 setupSanity Regression Smoke
@AfterMethod
 tearDownSanity Regression Smoke
@AfterClass
com.mystore.testcases.EndToEndTest  
@Test
 endToEndTestRegression
@BeforeClass
@BeforeMethod
 setupSanity Regression Smoke
@AfterMethod
 tearDownSanity Regression Smoke
@AfterClass
com.mystore.testcases.SearchResultPageTest  
@Test
 productAvailabilityTestSmoke
@BeforeClass
@BeforeMethod
 setupSanity Regression Smoke
@AfterMethod
 tearDownSanity Regression Smoke
@AfterClass
com.mystore.testcases.AddToCartPageTest  
@Test
 addToCartTestSanity Regression
@BeforeClass
@BeforeMethod
 setupSanity Regression Smoke
@AfterMethod
 tearDownSanity Regression Smoke
@AfterClass
com.mystore.testcases.IndexPageTest  
@Test
 verifyLogoSmoke
 verifyTitleSmoke
@BeforeClass
@BeforeMethod
 setupSanity Regression Smoke
@AfterMethod
 tearDownSanity Regression Smoke
@AfterClass
com.mystore.testcases.OrderPageTest  
@Test
 verifyTotalPriceRegression
@BeforeClass
@BeforeMethod
 setupSanity Regression Smoke
@AfterMethod
 tearDownSanity Regression Smoke
@AfterClass
com.mystore.testcases.HomePageTest  
@Test
 wishListTestSmoke
 orderHistoryandDetailsTestSmoke
@BeforeClass
@BeforeMethod
 setupSanity Regression Smoke
@AfterMethod
 tearDownSanity Regression Smoke
@AfterClass
com.mystore.testcases.LoginPageTest  
@Test
 loginTestSanity Smoke
@BeforeClass
@BeforeMethod
 setupSanity Regression Smoke
@AfterMethod
 tearDownSanity Regression Smoke
@AfterClass
281 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/testng-reports.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0 0 5px 5px; 3 | } 4 | 5 | ul { 6 | margin: 0; 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: 0 10px 10px 0; 45 | background-color: #fff8dc; 46 | } 47 | 48 | .suite-name { 49 | padding-left: 10px; 50 | font-size: 25px; 51 | font-family: Times, sans-serif; 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: 0 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: 0 0 1px 0; 102 | margin-bottom: 10px; 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: 0; 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 0 0 0; 139 | font-family: Times, sans-serif; 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: 0 0 5px 0; 156 | background-color: #0066ff; 157 | font-family: Times, sans-serif; 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', sans-serif; 168 | font-size: 16px; 169 | } 170 | 171 | .suite-icon { 172 | padding: 5px; 173 | float: right; 174 | height: 20px; 175 | } 176 | 177 | .test-group { 178 | font: 20px 'Lucida Grande'; 179 | margin: 5px 5px 10px 5px; 180 | border-width: 0 0 1px 0; 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: 0 0 5px 20px; 206 | font-size: 12px; 207 | font-family: monospace; 208 | border-width: 0 0 0 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: 0 0 5px 20px; 220 | font-size: 12px; 221 | font-family: monospace; 222 | border-width: 0 0 0 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: 0 0 0 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: 0 0 0 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: 0 0 0 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: skyblue; 281 | border-style: solid; 282 | border-width: 0 0 1px 1px; 283 | } 284 | 285 | .method-start { 286 | float: right; 287 | } 288 | 289 | .chronological-class-name { 290 | padding: 0 0 0 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: 0 10px 5px 0; 302 | background-color: #deb887; 303 | text-align: center; 304 | } 305 | 306 | .collapse-all-icon { 307 | padding: 5px; 308 | float: right; 309 | } 310 | -------------------------------------------------------------------------------- /MyStoreProject/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/1/0
Started on:Tue Jul 14 16:26:32 IST 2020
Total time:0 seconds (63 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 | 135 | 136 | 137 |
FAILED TESTS
Test methodExceptionTime (seconds)Instance
verifyCreateAccountPageTest
Test class: com.mystore.testcases.AccountCreationPageTest
org.testng.TestNGException: 
 80 | Method public void com.mystore.testcases.AccountCreationPageTest.verifyCreateAccountPageTest(java.lang.String) throws java.lang.Throwable requires a @DataProvider named : email
 81 | 	at org.testng.internal.Parameters.findDataProvider(Parameters.java:563)
 82 | 	at org.testng.internal.Parameters.handleParameters(Parameters.java:776)
 83 | 	at org.testng.internal.Parameters.handleParameters(Parameters.java:744)
 84 | 	at org.testng.internal.ParameterHandler.handleParameters(ParameterHandler.java:59)
 85 | 	at org.testng.internal.ParameterHandler.createParameters(ParameterHandler.java:38)
 86 | 	at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:783)
 87 | 	at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
 88 | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
 89 | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
 90 | 	at java.util.ArrayList.forEach(ArrayList.java:1257)
 91 | 	at org.testng.TestRunner.privateRun(TestRunner.java:766)
 92 | 	at org.testng.TestRunner.run(TestRunner.java:587)
 93 | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
 94 | 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
 95 | 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
 96 | 	at org.testng.SuiteRunner.run(SuiteRunner.java:286)
 97 | 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
 98 | 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
 99 | 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187)
100 | 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1109)
101 | 	at org.testng.TestNG.runSuites(TestNG.java:1039)
102 | 	at org.testng.TestNG.run(TestNG.java:1007)
103 | 	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
104 | 	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
105 | 	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
106 | 
Click to show all stack frames 107 |
org.testng.TestNGException: 
108 | Method public void com.mystore.testcases.AccountCreationPageTest.verifyCreateAccountPageTest(java.lang.String) throws java.lang.Throwable requires a @DataProvider named : email
109 | 	at org.testng.internal.Parameters.findDataProvider(Parameters.java:563)
110 | 	at org.testng.internal.Parameters.handleParameters(Parameters.java:776)
111 | 	at org.testng.internal.Parameters.handleParameters(Parameters.java:744)
112 | 	at org.testng.internal.ParameterHandler.handleParameters(ParameterHandler.java:59)
113 | 	at org.testng.internal.ParameterHandler.createParameters(ParameterHandler.java:38)
114 | 	at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:783)
115 | 	at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
116 | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
117 | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
118 | 	at java.util.ArrayList.forEach(ArrayList.java:1257)
119 | 	at org.testng.TestRunner.privateRun(TestRunner.java:766)
120 | 	at org.testng.TestRunner.run(TestRunner.java:587)
121 | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
122 | 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
123 | 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
124 | 	at org.testng.SuiteRunner.run(SuiteRunner.java:286)
125 | 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
126 | 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
127 | 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187)
128 | 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1109)
129 | 	at org.testng.TestNG.runSuites(TestNG.java:1039)
130 | 	at org.testng.TestNG.run(TestNG.java:1007)
131 | 	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
132 | 	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
133 | 	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
134 | 
0com.mystore.testcases.AccountCreationPageTest@6ee52dcd

138 | 139 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/emailable-report.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | TestNG Report 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
Test# Passed# Skipped# Retried# FailedTime (ms)Included GroupsExcluded Groups
Suite
Test_All8002278,888
14 | 15 |
ClassMethodStartTime (ms)
Suite
Test_All — failed
com.mystore.testcases.HomePageTestorderHistoryandDetailsTest159500932128513305
com.mystore.testcases.IndexPageTestverifyTitle159500947248366
Test_All — passed
com.mystore.testcases.AccountCreationPageTestverifyCreateAccountPageTest159500926774210141
com.mystore.testcases.AddToCartPageTestaddToCartTest159500929287813724
com.mystore.testcases.EndToEndTestendToEndTest159500948823638762
com.mystore.testcases.HomePageTestwishListTest159500934957612069
com.mystore.testcases.IndexPageTestverifyLogo1595009457238378
com.mystore.testcases.LoginPageTestloginTest159500943084212442
com.mystore.testcases.OrderPageTestverifyTotalPrice159500937600817556
com.mystore.testcases.SearchResultPageTestproductAvailabilityTest15950094083647865
16 |

Test_All

com.mystore.testcases.HomePageTest#orderHistoryandDetailsTest

Parameter #1Parameter #2
admin@xyz.comadmin@123
Exception
java.lang.AssertionError: expected [true] but found [false] 17 | at com.mystore.testcases.HomePageTest.orderHistoryandDetailsTest(HomePageTest.java:57) 18 | at java.util.ArrayList.forEach(ArrayList.java:1257) 19 | ... Removed 31 stack frames

back to summary

20 |

com.mystore.testcases.IndexPageTest#verifyTitle

Exception
java.lang.AssertionError: expected [My Store1] but found [My Store] 21 | at com.mystore.testcases.IndexPageTest.verifyTitle(IndexPageTest.java:45) 22 | at java.util.ArrayList.forEach(ArrayList.java:1257) 23 | ... Removed 32 stack frames

back to summary

24 |

com.mystore.testcases.AccountCreationPageTest#verifyCreateAccountPageTest

Parameter #1
ghfsdtyfg@gmail.com

back to summary

25 |

com.mystore.testcases.AddToCartPageTest#addToCartTest

Parameter #1Parameter #2Parameter #3
t-shirt2.0M

back to summary

26 |

com.mystore.testcases.EndToEndTest#endToEndTest

Parameter #1Parameter #2Parameter #3
t-shirt2.0M

back to summary

27 |

com.mystore.testcases.HomePageTest#wishListTest

Parameter #1Parameter #2
admin@xyz.comadmin@123

back to summary

28 |

com.mystore.testcases.IndexPageTest#verifyLogo

back to summary

29 |

com.mystore.testcases.LoginPageTest#loginTest

Parameter #1Parameter #2
admin@xyz.comadmin@123

back to summary

30 |

com.mystore.testcases.OrderPageTest#verifyTotalPrice

Parameter #1Parameter #2Parameter #3
t-shirt2.0M

back to summary

31 |

com.mystore.testcases.SearchResultPageTest#productAvailabilityTest

Parameter #1
t-shirt

back to summary

32 | 33 | 34 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/CrossBrowser/methods.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


CrossBrowser

(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 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
20/07/17 19:11:37 0 >>beforeSuite      main@1188753216
20/07/17 19:11:37 187  >>loadConfig     TestNG-tests-1@1319658452
20/07/17 19:11:37 191  >>loadConfig     TestNG-tests-2@1631315962
20/07/17 19:11:37 195  >>loadConfig     TestNG-tests-3@1246841284
20/07/17 19:11:37 239     >>setup  TestNG-tests-2@1631315962
20/07/17 19:11:37 239     >>setup  TestNG-tests-1@1319658452
20/07/17 19:11:37 239     >>setup  TestNG-tests-3@1246841284
20/07/17 19:11:48 10538      verifyLogoTestNG-tests-3@1246841284
20/07/17 19:11:53 15395      verifyLogoTestNG-tests-1@1319658452
20/07/17 19:11:53 15681     <<tearDown  TestNG-tests-1@1319658452
20/07/17 19:11:54 16390     >>setup  TestNG-tests-1@1319658452
20/07/17 19:11:55 17432     <<tearDown  TestNG-tests-3@1246841284
20/07/17 19:11:55 17982     >>setup  TestNG-tests-3@1246841284
20/07/17 19:11:56 19137      verifyLogoTestNG-tests-2@1631315962
20/07/17 19:11:56 19305     <<tearDown  TestNG-tests-2@1631315962
20/07/17 19:11:58 20843     >>setup  TestNG-tests-2@1631315962
20/07/17 19:12:04 26509      verifyTitleTestNG-tests-3@1246841284
20/07/17 19:12:04 26883     <<tearDown  TestNG-tests-3@1246841284
20/07/17 19:12:07 29724      verifyTitleTestNG-tests-1@1319658452
20/07/17 19:12:07 29760     <<tearDown  TestNG-tests-1@1319658452
20/07/17 19:12:14 37322      verifyTitleTestNG-tests-2@1631315962
20/07/17 19:12:15 37383     <<tearDown  TestNG-tests-2@1631315962
49 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/old/CrossBrowser/methods-alphabetical.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


CrossBrowser

(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 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
20/07/17 19:11:37 0 >>beforeSuite      main@1188753216
20/07/17 19:11:37 187  >>loadConfig     TestNG-tests-1@1319658452
20/07/17 19:11:37 191  >>loadConfig     TestNG-tests-2@1631315962
20/07/17 19:11:37 195  >>loadConfig     TestNG-tests-3@1246841284
20/07/17 19:11:37 239     >>setup  TestNG-tests-2@1631315962
20/07/17 19:11:37 239     >>setup  TestNG-tests-1@1319658452
20/07/17 19:11:37 239     >>setup  TestNG-tests-3@1246841284
20/07/17 19:11:54 16390     >>setup  TestNG-tests-1@1319658452
20/07/17 19:11:55 17982     >>setup  TestNG-tests-3@1246841284
20/07/17 19:11:58 20843     >>setup  TestNG-tests-2@1631315962
20/07/17 19:11:53 15681     <<tearDown  TestNG-tests-1@1319658452
20/07/17 19:11:55 17432     <<tearDown  TestNG-tests-3@1246841284
20/07/17 19:11:56 19305     <<tearDown  TestNG-tests-2@1631315962
20/07/17 19:12:04 26883     <<tearDown  TestNG-tests-3@1246841284
20/07/17 19:12:07 29760     <<tearDown  TestNG-tests-1@1319658452
20/07/17 19:12:15 37383     <<tearDown  TestNG-tests-2@1631315962
20/07/17 19:11:48 10538      verifyLogoTestNG-tests-3@1246841284
20/07/17 19:11:53 15395      verifyLogoTestNG-tests-1@1319658452
20/07/17 19:11:56 19137      verifyLogoTestNG-tests-2@1631315962
20/07/17 19:12:04 26509      verifyTitleTestNG-tests-3@1246841284
20/07/17 19:12:07 29724      verifyTitleTestNG-tests-1@1319658452
20/07/17 19:12:14 37322      verifyTitleTestNG-tests-2@1631315962
49 | -------------------------------------------------------------------------------- /MyStoreProject/test-output/Suite/Test_All.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: Test_All 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

Test_All

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:8/2/0
Started on:Fri Jul 17 23:37:28 IST 2020
Total time:278 seconds (278888 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 | 118 | 119 | 120 | 121 | 122 | 162 | 163 | 164 |
FAILED TESTS
Test methodExceptionTime (seconds)Instance
orderHistoryandDetailsTest
Test class: com.mystore.testcases.HomePageTest
Parameters: admin@xyz.com, admin@123
java.lang.AssertionError: expected [true] but found [false]
 80 | 	at com.mystore.testcases.HomePageTest.orderHistoryandDetailsTest(HomePageTest.java:57)
 81 | 	at java.util.ArrayList.forEach(ArrayList.java:1257)
 82 | ... Removed 31 stack frames
Click to show all stack frames 83 |
java.lang.AssertionError: expected [true] but found [false]
 84 | 	at org.testng.Assert.fail(Assert.java:97)
 85 | 	at org.testng.Assert.failNotEquals(Assert.java:969)
 86 | 	at org.testng.Assert.assertTrue(Assert.java:43)
 87 | 	at org.testng.Assert.assertTrue(Assert.java:53)
 88 | 	at com.mystore.testcases.HomePageTest.orderHistoryandDetailsTest(HomePageTest.java:57)
 89 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 90 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 91 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 92 | 	at java.lang.reflect.Method.invoke(Method.java:498)
 93 | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:134)
 94 | 	at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:597)
 95 | 	at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173)
 96 | 	at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
 97 | 	at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:816)
 98 | 	at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
 99 | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
100 | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
101 | 	at java.util.ArrayList.forEach(ArrayList.java:1257)
102 | 	at org.testng.TestRunner.privateRun(TestRunner.java:766)
103 | 	at org.testng.TestRunner.run(TestRunner.java:587)
104 | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
105 | 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
106 | 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
107 | 	at org.testng.SuiteRunner.run(SuiteRunner.java:286)
108 | 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
109 | 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
110 | 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187)
111 | 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1109)
112 | 	at org.testng.TestNG.runSuites(TestNG.java:1039)
113 | 	at org.testng.TestNG.run(TestNG.java:1007)
114 | 	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
115 | 	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
116 | 	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
117 | 
13com.mystore.testcases.HomePageTest@34c4973
verifyTitle
Test class: com.mystore.testcases.IndexPageTest
java.lang.AssertionError: expected [My Store1] but found [My Store]
123 | 	at com.mystore.testcases.IndexPageTest.verifyTitle(IndexPageTest.java:45)
124 | 	at java.util.ArrayList.forEach(ArrayList.java:1257)
125 | ... Removed 32 stack frames
Click to show all stack frames 126 |
java.lang.AssertionError: expected [My Store1] but found [My Store]
127 | 	at org.testng.Assert.fail(Assert.java:97)
128 | 	at org.testng.Assert.assertEqualsImpl(Assert.java:136)
129 | 	at org.testng.Assert.assertEquals(Assert.java:118)
130 | 	at org.testng.Assert.assertEquals(Assert.java:575)
131 | 	at org.testng.Assert.assertEquals(Assert.java:585)
132 | 	at com.mystore.testcases.IndexPageTest.verifyTitle(IndexPageTest.java:45)
133 | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
134 | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
135 | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
136 | 	at java.lang.reflect.Method.invoke(Method.java:498)
137 | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:134)
138 | 	at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:597)
139 | 	at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173)
140 | 	at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
141 | 	at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:816)
142 | 	at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
143 | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
144 | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
145 | 	at java.util.ArrayList.forEach(ArrayList.java:1257)
146 | 	at org.testng.TestRunner.privateRun(TestRunner.java:766)
147 | 	at org.testng.TestRunner.run(TestRunner.java:587)
148 | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
149 | 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
150 | 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
151 | 	at org.testng.SuiteRunner.run(SuiteRunner.java:286)
152 | 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
153 | 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
154 | 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187)
155 | 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1109)
156 | 	at org.testng.TestNG.runSuites(TestNG.java:1039)
157 | 	at org.testng.TestNG.run(TestNG.java:1007)
158 | 	at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
159 | 	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
160 | 	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
161 | 
0com.mystore.testcases.IndexPageTest@17d677df

165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
addToCartTest
Test class: com.mystore.testcases.AddToCartPageTest
Parameters: t-shirt, 2.0, M
13com.mystore.testcases.AddToCartPageTest@33c7e1bb
endToEndTest
Test class: com.mystore.testcases.EndToEndTest
Parameters: t-shirt, 2.0, M
38com.mystore.testcases.EndToEndTest@3043fe0e
loginTest
Test class: com.mystore.testcases.LoginPageTest
Parameters: admin@xyz.com, admin@123
12com.mystore.testcases.LoginPageTest@76b0bfab
productAvailabilityTest
Test class: com.mystore.testcases.SearchResultPageTest
Parameters: t-shirt
7com.mystore.testcases.SearchResultPageTest@7a765367
verifyCreateAccountPageTest
Test class: com.mystore.testcases.AccountCreationPageTest
Parameters: ghfsdtyfg@gmail.com
10com.mystore.testcases.AccountCreationPageTest@30a3107a
verifyLogo
Test class: com.mystore.testcases.IndexPageTest
0com.mystore.testcases.IndexPageTest@17d677df
verifyTotalPrice
Test class: com.mystore.testcases.OrderPageTest
Parameters: t-shirt, 2.0, M
17com.mystore.testcases.OrderPageTest@52feb982
wishListTest
Test class: com.mystore.testcases.HomePageTest
Parameters: admin@xyz.com, admin@123
12com.mystore.testcases.HomePageTest@34c4973

213 | 214 | -------------------------------------------------------------------------------- /MyStoreProject/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 | 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 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
20/07/17 23:37:28 0 >>loadConfig      main@2050835901
20/07/17 23:37:30 2344     >>setup  main@2050835901
20/07/17 23:37:47 19574      verifyCreateAccountPageTestmain@2050835901
20/07/17 23:37:57 29764     <<tearDown  main@2050835901
20/07/17 23:37:59 31117     >>setup  main@2050835901
20/07/17 23:38:12 44709      addToCartTestmain@2050835901
20/07/17 23:38:26 58438     <<tearDown  main@2050835901
20/07/17 23:38:27 59344     >>setup  main@2050835901
20/07/17 23:38:41 73117      orderHistoryandDetailsTestmain@2050835901
20/07/17 23:38:55 86959     <<tearDown  main@2050835901
20/07/17 23:38:56 87932     >>setup  main@2050835901
20/07/17 23:39:09 101408      wishListTestmain@2050835901
20/07/17 23:39:21 113480     <<tearDown  main@2050835901
20/07/17 23:39:22 114319     >>setup  main@2050835901
20/07/17 23:39:36 127840      verifyTotalPricemain@2050835901
20/07/17 23:39:53 145402     <<tearDown  main@2050835901
20/07/17 23:39:54 146201     >>setup  main@2050835901
20/07/17 23:40:08 160195      productAvailabilityTestmain@2050835901
20/07/17 23:40:16 168063     <<tearDown  main@2050835901
20/07/17 23:40:17 168975     >>setup  main@2050835901
20/07/17 23:40:30 182674      loginTestmain@2050835901
20/07/17 23:40:43 195118     <<tearDown  main@2050835901
20/07/17 23:40:44 195900     >>setup  main@2050835901
20/07/17 23:40:57 209069      verifyLogomain@2050835901
20/07/17 23:40:57 209451     <<tearDown  main@2050835901
20/07/17 23:40:58 210582     >>setup  main@2050835901
20/07/17 23:41:12 224315      verifyTitlemain@2050835901
20/07/17 23:41:13 225567     <<tearDown  main@2050835901
20/07/17 23:41:14 226804     >>setup  main@2050835901
20/07/17 23:41:28 240068      endToEndTestmain@2050835901
20/07/17 23:42:07 278835     <<tearDown  main@2050835901
20/07/17 23:42:07 279698 <<afterSuite      main@2050835901
69 | --------------------------------------------------------------------------------