Selenium Class 38 - Selenium Project - Maven Integration with Selenium

preview_player
Показать описание
Maven Integration with Selenium, Create Maven Project, Add Software dependencies to Maven POM XML and Create Test Cases in Maven Project.
Functional Test Automation of the Software Project using Selenium WebDriver, Java and TestNG Testing Framework.
Software Testing Live Project Explanation, Software Test project Descriptions, Interfaces of the Project, Users of the Project, Features to be Tested and Features not to be Tested.
Software Test Requirements, Test Scenarios, Test Cases and Test Data.
Рекомендации по теме
Комментарии
Автор

Selenium Class 38 Selenium Project Part 3


6) Derive Smoke Test Scenarios for User Interface of the Application

i) Verify "Launch the User Interface" of the Application
ii) Verify required Elements availablility in the User Interface Home Page
iii) Verify Customer Registration with valid data
iv) Verify Customer Login with Valid Data
v) Verify Add Product to Shopping Card
vi) Verify Checkout Process
Etc..,

Automation Test Cases using Selenium WebDriver, Java, TestNG and Maven

For Selenium Testing:

i) Selenium Environment Setup
ii) Common Configuration for all Team Members
iii) Maintenance of the Environment

Steps (if No Maven like tool then ):
1. Select tools for Automations (Selenium WebDriver, Java, TestNG, jxl, etc., )
2. Set the Environment in one computer and share the environment details to all team members
3. All Team members will set up the environment as per Test Lead or Team Lead
4. Verify the all team members Environment
5. Update the Environement (if required) in all the computers manually

Steps (if we use Maven Integrations)
1. Create Maven Project (built-in in Ecliplse IDE)
2. Add all Software dependencies to Maven POM XML then Maven can download the software and add

to your project
3. Share the POM XML file to all team members. By using the POM XML all can get same configuration
4. If any update is there, update the Software Dependency in one computer and share the XML

Selenium Integration with Maven:

Advantages of Maven Integration:

1. You can add all required dependences like Selenium WebDriver, TestNG, etc., to Maven Project (POM

XML) then it will download and add those JAR files to your project

2. If any update is there then just add that software dependency to POM XML then it will update

3. All of your test team members can get same configuration (by using the POM XML)

Create Maven Project:

File Menu
> Project
> Type Maven and select Maven Project
> Enter > Next > Next > Enter Group ID > Enter Artifact ID > Finish

Test Cases:

i) Verify "Launch the User Interface" of the Application
ii) Verify required Elements availablility in the User Interface Home Page
iii) Verify Customer Registration with valid data
iv) Verify Customer Login with Valid Data

Pre Condition : Launch Browser
Post Condition : Close Browser

POM File:



<groupId>SmokeTest</groupId>


<packaging>jar</packaging>

<name>OnlineShopping</name>

<properties>

</properties>

<dependencies>
<dependency>


<version>3.11.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>

<version>6.10</version>
<scope>test</scope>
</dependency>



<dependency>
<groupId>junit</groupId>

<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

Test Case:
package SmokeTest.OnlineShopping;

import
import
import
import org.testng.annotations.Test;

public class User {

//Declare WebDriver as Global
WebDriver driver;

@BeforeMethod
public void launchBrowser() {
System.setProperty("webdriver.chrome.driver", "E:/chromedriver.exe");
driver = new ChromeDriver();
}
@Test
public void openURL() {
}

}

venkateshinakollu