0% found this document useful (0 votes)
93 views6 pages

DDF Framework TestNG

The document discusses the key aspects of a data driven test automation framework including the use of a data driven framework (DDF), Maven project structure, page object model (POM), page factory, TestNG, browsers, test data, property files, log4j, extent reports, utility classes, GitHub repository, and Jenkins. The DDF allows test data to be easily modified without changing test code by separating test data from test cases and storing it in Excel, CSV or property files. Maven provides standard project structure and dependencies. The POM follows encapsulation by declaring private page elements initialized in constructors. Page factory initializes elements annotated with @FindBy. TestNG supports test suites, parallel execution, reports, priorities

Uploaded by

shubham ahire
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views6 pages

DDF Framework TestNG

The document discusses the key aspects of a data driven test automation framework including the use of a data driven framework (DDF), Maven project structure, page object model (POM), page factory, TestNG, browsers, test data, property files, log4j, extent reports, utility classes, GitHub repository, and Jenkins. The DDF allows test data to be easily modified without changing test code by separating test data from test cases and storing it in Excel, CSV or property files. Maven provides standard project structure and dependencies. The POM follows encapsulation by declaring private page elements initialized in constructors. Page factory initializes elements annotated with @FindBy. TestNG supports test suites, parallel execution, reports, priorities

Uploaded by

shubham ahire
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Data Driven Framework (DDF): -

We use data driven framework in organization because once test data are
separated from test case it can easily modified for specific functionality without
changing the code.
We use excel, .csv, property File to store data.
Maven project:
We use maven in our framework because it provides structure format, build,
execution and dependency.
Maven provides the standard folder structure in src/main/java we store all pom
classes and library files (base class utility class).
Maven life cycle
1.default: handle project deployment
2.clean: project cleaning
3.site: creation of projects website
in src/test/java we store all test class.
In maven pom.xml file use to add the dependency.
All the downloaded jar file store in the maven dependency folder.
In our framework super most class is base class which is extended to each test
class this is nothing but inheritance in our framework.
To design test script, we use java as programming language and selenium as
tool.

Page Object Model: -


We consider every webpage consider as pom class & each web element
consider as variable and pom follows encapsulation
Encapsulation
Declare variable with private scope
Initialize variable in constructor with public scope using page factory class
static initelement method.
Use variable in method with public scope.
Page factory: -
Class provided by selenium web driver to support page object design pattern.
Use for initialize web element that are an noted by @findby using initelement
method of pom.
Ajax element locator factory is lazy load concept in pagefactory. This is use to
identify web element only when used in any operation
TestNG:
To design our test script(class), we use testNG supporting framework
Why testNG
Test suite
Parallel execution
Emailable report
Priorities test cases
Assertions (Hard assertion and soft assertion)
Cross browser testing
Folders
Browser: -
We store all exe file in browser folders
Chrome.exe, gekobrowser.exe
Test data: -
To store the excel sheets we use test data folder.
Screenshot:
To store the screenshot, we use screenshot folder.

Property file: -
In our framework we use property file to store login credential and URL
Log4J jar file:
We use Log4j jar to store logs of the execution
Every time log4j generate new file
Txt file
Extent reporter jar file: -
In our project to generate the report we use extent reporter
Every time extent reporter generates new report
We can attach fail testcase screenshot to test cases.
Utility class:
To create selenium related common function we use utility class.
Screenshot, get Test Data, get Property data

GitHub repository:
We use GitHub repository to maintain source code of framework.

Jenkins ci tool: -
For scheduling

Github
GitHub Repository

1 github acc--> multiple repository


1 repository--> multiple branches (Master)

1 project =1 repository

Steps to create repository in github server

1. Create a project in eclipse


2. Create acc in github
3. Create repository in github

Step1: Create local Repository(git)


right click on project-->Team-->Share project--select checkbox
-->select checkbox-->Create repository-->Finish

Step2: Open local repository(git) window


click on quick access-->search "git repositories" --> git repositories(git)

Step3: Commit source code from local machine (project/package explorer) to


local repository(git)
right click on project-->Team-->Add to index-->
right click on project-->Team-->Commit--->add commit message-->commit

Step4: push source code from local repository (…


[
diffrence between Hashmap & HashTable

Hashtable HashMap
1. legacy class not legacy class

2. performance: low performance: high

3. HashTable is synchronized HashMap is not synchronized.


It is thread safe It is not thread safe

--------------------------------------
4. Diff between final, finally & finalize
Final: is a keyword
Finally: finally is the block in Java Exception Handling to execute the important
code whether the exception occurs or not
Finalize: finalize is the method in Java which is used to perform clean up
processing just before object is garbage collected.

5. Diff between Throw & Throws


Throw: use to handle user defined exception
Throws: use to handle pre-defined exception
[9:54 am, 07/03/2023] Shubham: 1 gitHub acc --> multiple repository
1 repository---> multiple branches (master)

how to solve conflict issue-->

Teal lead create 2 more branches for 2 TE


master--> pre-defined branch
vishal,pratik--> user defined branches

multiple branches__>
1. master
2. Vishal
3. pratik

--> pull request(pr)(Notification) to TL from vishal & pratik


TL --> code review of vishal & pratik

case1: Seperate files(No conflict) ->ok-->move vishal & pratik code to master
branch
case2: Code correction(Conflict)--> rpl code change to pratik/vishal--->code
pull--> code modify--> code push--> TL pull request-->master branach

next day--> pull latest code from master branch

You might also like