You are on page 1of 17

1.Explain about your framework?

Ans. In our Selenium Project we are using Java language. Even though Selenium supports multiple
languages, we are using Java language is just because most of the automation developers have
knowledge on Selenium with Java.

Type of Framework: In our project, we are using Data-driven Framework by using Page Object Model
design pattern with Page Factory.

POM: As per the Page Object Model, we have maintained a class for every web page. Each web page
has a separate class and that class holds the functionality and members of that web page. Separate
classes for every individual test.

We have separate packages for Pages and Tests. All the web page related classes come under Pages
package and all the tests related classes come under Tests package.

Home Page and Login Page,we have a separate classes to store element locators. For the login test
there would be a separate class which calls the methods from the Home Page class and Login Page
class.

As per the maven project, all the tests are kept in the ‘src/test/java‘ and remaining files (such as
config.properties, element locators (POM classes), utility files, test data, etc.,) kept under
‘src/main/java‘.

Test Base class (TestBase.java) deals with all the common functions used by all the pages. This class
is responsible for loading the configurations from properties files, Initializing the WebDriver, Implicit
Waits, Extent Reports and also to create the object of FileInputStream which is responsible for
pointing towards the file from which the data should be read.

Utility Class (AKA Functions Class): Utility class (TestUtil.java) stores and handles the functions (The
code which is repetitive in nature such as waits, actions, capturing screenshots, accessing excels,
sending email etc.,) which can be commonly used across the entire framework. The reason behind
creating utility class is to achieve reusability. This class extends the TestBase class to inherit the
properties of TestBase in TestUtil.

Properties file: This file (config.properties) stores the information that remains static throughout the
framework such as browser specific information, application URL, screenshots path etc.

All the details which change as per the environment and authorization such as URL, Login Credentials
are kept in the config.properties file. Keeping these details in a separate file makes easy to maintain.

Screenshots will be captured and stored in a separate folder and also the screenshots of a failed test
cases will be added in the extent reports.

All the historical test data will be kept in excel sheet (controller.xlsx). By using ‘controller.xlsx’, we
pass test data and handle data driven testing. We use Apache POI to handle excel sheets.

Using TestNG for Assertions, Grouping and Parallel execution.

Using Maven for build, execution and dependency purpose. Integrating the TestNG dependency in
POM.xml file and running this POM.xml file using Jenkins.

We use Git as a repository to store our test scripts.


By using Jenkins CI (Continuous Integration) Tool, we execute test cases on daily basis and also for
nightly execution based on the schedule. Test Result will be sent to the peers using Jenkins.

For the reporting purpose, we are using Extent Reports. It generates beautiful HTML reports. We use
the extent reports for maintaining logs and also to include the screenshots of failed test cases in the
Extent Report.

Or

. Language used: Java

2. Type of Framework: Behavioral-driven Framework by using Page Object Model design pattern
with page factory

3. POM: As per pom, we have maintained a class for every web page. Each webpage has a seperate
class for functionality and members of that webpage. Seperate classes for every individual test.

4. Packages: We have seperate packages for test case, test data, utilities

5. Test Base class: It will deal with all the common functions used by all the pages. This class is
responsible for loading the configurations from properties file, initializing the Webdriver, Implicit
waits, Extent Reports and also to create the object of FileInputStream which is responsible for
pointing towards the file from which the data should be read.

6. Utility class: It stores and handles the the functions which are repetitive (Waits, actions, capturing
screenshots,accessing excels, Sending mails etc).This class extends the Test Base class to inherit the
properties.

2.What is Page Factory?

Selenium Page Factory Pattern is like an extension to Page Object Model , but Page Factory is much
enhanced model. To start with, we just need to import package
‘org.openqa.selenium.support.PageFactory’

Factory class can be used to make using Page Objects simpler and easier.

We use Page Factory pattern to initialize web elements which are defined in Page Objects.

We should initialize page objects using initElements() method from PageFactory Class as below,
Once we call initElements() method, all elements will get initialized. PageFactory.initElements() static
method takes the driver instance of the given class and the class type, and returns a Page Object
with its fields fully initialized.

3.Suppose you have 7 pages in your application then to achieve POM what u will do?

Ans. We will create 7 different classes for 7 different pages of the application with Web elements
defined.

Create different feature files with test scenarios related to these page
Create test data file with test data to be used

Or

1. Create 7 class files for each page and define all the objects and methods of that page in each class
respectively

2. Based on the flow reference the methods from page class in the test class file ""

""Have you used interface in your framework other then selenium interfaces?

1. Runnable Interface - Parallel Thread execution

2. ITestListener - Test NG listener interface

3. Define all the methods in interface and implement in page clas to hide the implementation.

4.What is xpath?Type of X path.Explain each type?

Xpath is a query language for selecting nodes from an XML document. In selenium Xpath is the most
synatx or way of finding web elements existing on a web page

Syntax - Xpath=//tagname[@attribute='value']

Two types of xpath exist - relative and absolute

relative - this xpath starts with double slash // which means it can search element anywhere on the
web page. Its the best way of finding an xpath, because in this way we need not to go through each
an every tag to reach a specific web element

relative xpath of amazon.in search bar:

//input[@id='twotabsearchtextbox']

absolute - direct way of finding the webelement. One of the huge disadvantage is the if there are
any changes in the future in the code , the xpath may fail.

Eg - /html/body/div[2]/div[1]/div/h4[1]/b/html[1]/body[1]/div[2]/div[1]/div[1]/h4[1]

5. How does Selenium work?

Ans.

6. Can you describe scrum ceremony?

Ans. The Scrum divides the project backlog into small iterations where each iteration makes an
improvement into the product which can be delivered to customer if need be. The iterations are
called sprints, the duration is typically 1–4 weeks. The team which is cross functional tries to make
incremental improvement in the product in each sprint.

Backlog Grooming
Product backlog is a prioritized work items/userstories that are needed to bring the product in to
fruition. It is managed by the product owner in collaboration with Scrum Master and the team.
Backlog of the product is an ever changing list based on the new features, modifications, findings
etc. The aim of grooming is to keep the userstories in a prioritized manner where immediate ones
are also properly estimated and ready for consumption in the sprints.

Sprint Planning

The first ceremony is the sprint planning where the team sits and decide which backlog items. During
this session the product owner who has the customer inputs and release planning gives the team
information on the priority of the backlog items.

Daily Standup

Daily Standup/Daily Scrum is a daily meeting for the team to do a quick check on the status and
resolves issues blocking the team. This is a short meeting where each member of the team answers
the following questions,

• What did I do yesterday?

• What will I be doing today?

• Is there anything blocking my progress which can effect the goal of the sprint.

The scrum master has the role here to make sure that the updates are specific and the meeting does
not diverge into unrelated discussions.

Sprint Review

This meeting is at the end of the sprint where the team along with Product Owner, potentially
customer meets to make sure that the sprint goal is achieved. The team goes through the
demonstration of the product and confirms that the outcome is as the expectation of product owner
and customer

Sprint Retrospective

This is the meeting to analyze the sprint data and see to answer following questions,

• What went well

• What went wrong

• What could have been better

In this meeting the team comes up with a plan to correct the mistakes, resolve the team conflicts.
This is an opportunity where team members openly discuss about the problems and corrective
actions that need to be taken in the sub-sequent sprints.

7.Have you used interface in your framework other then selenium interfaces?

Ans I have used selenium interfaces only in my selenium project while initializing any browser using
selenium webdriver.

8. Synchronization in selenium? syntax for implicit wait?


Ans Synchronization in selenium:

1. Getting the application under test to be in sync with the testing tool - Selenium

2. How to achieve - Wait concept: Using Implicit wait and explicit wait

Implicit wait

driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

9. How u will handle popup window ?other then get window handle?

Have you used POM in your framework?

Yes, We have used Page Object Model design pattern with page factory. As per pom, we have
maintained a class for every web page. Each webpage has a seperate class for functionality and
members of that webpage. Seperate classes for every individual test.

What is Page Factory?

1. Page Factory in Selenium webdriver is an integrated concept of API. Here we follow again the
same principles of keeping repository objects or page classes seperate from test cases.

2. POM and page factory are same design patterns but differs in the way we define the locators
when you are working with page object patterns.

3. Here we use @FindBy annotation to find elements and to initialize webelements using
initelements process.

Suppose you have 7 pages in your application then to achieve POM what u will do?

Yes, We have used Page Object Model design pattern with page factory. As per pom, we have
maintained a class for every web page. Each webpage has a seperate class for functionality and
members of that webpage. Seperate classes for every individual test.

Have you used interface in your framework other then selenium interfaces?

Yes, I have used interface in my project to hide the actual implementation. Like I have created an
interface for user details and implemented it for the login page class and esignature class to use the
data.

What are all the selenium interfaces?


Webdriver is an interface in selenium which we used to initialize it, other than that WebElement,
TakesScreenshot, Alert,ITestListener.

How to connect to database?

Create Connection to DB -> Create Statement Object -> Execute the SQL Query. Store results in
ResultSet

Connection con = DriverManager.getConnection(dbUrl,username,password);

Statement stmt = con.createStatement();

ResultSet rs= stmt.executeQuery(query);

Suppose u have class and abstract class in class there is a user defined constructor and main method
which one will get execute first?

The main method will always execute first because it is a special static method that will be called
from Java itself to start an application.

What is the use of Pom.xml?

XML file that contains information about the project and configuration details used by Maven to
build the project.

What is the use of testng.xml?

TestNG. xml file is a configuration file that helps in organizing our tests. It allows testers to create
and handle multiple test classes, define test suites and tests. It makes a tester's job easier by
controlling the execution of tests by putting all the test cases together and run it under one XML file.

Annotation used in page object model?

Ans : @FindBy "

Tell me About bug life cycle?

A bug life cycle is the journey of bug, basically different stages which a bug goes through during its
life time. It differs from company to company and projects to projects depending upon the software
testing strategies and processes.
Common bug flow can be - Open, Assigned, In Progress, Dev Complete, In Testing, Closed or Reopen

Diff annotations in testing?

"@Test, @BeforeMethod, @AfterMethod, @AfterTest, @BeforeTest, @BeforeSuite, @AfterSuite".

What strategies you followed while building a Selenium framework from scratch?

a. What is the best tool available for building framework

b. Requirement of the project

c. Should we go with a BDD or TDD framework

d. Test data sheet will be required

e. Test Cases whether built for all the scenarios

d. How to structure Feature files and Java files

Roles and responsibilities?

• Analyzing business requirement in order to determine the test strategy covered by automation
testing

• Developing new test scripts

• Maintaining existing tests scripts/regression suites

• Attending Agile meetings (Daily scrum meeting/Sprint planning/Backlog refinement) on assigned


projects

• Executing regression suites

• Providing results to project managers/developers/manual testers and stakeholders

Explain wyat you done in SQL testing?

I have done

• The field size validation

• Constraints.

• Indexes are done or not (for performance-related issues)

• Stored procedures

• The field size defined in the application is matching with that in the DB.
Or

In SQL testing I basically tested various tables and data available in those tables. On an high level the
testing involved entry of correct data when certain request is sent from front end, whether the
intended table has the entry or not.

For example - When a user creates an account, there should be DB entry in a specific table, say
Registered_User with all the details - first name, last name etc

Similarly another example can be - a ecommerce site showing delivery date of a particular product.
This delivery date is fetched from a DB table, which in turn was calculated there. We test these DB
tables, with different SQL queries to evaluate whether the correct response in expected format is
visible or not

Explain inner join and outer join in SQL.?

nner join- table that has join within itself. Gives the resukt from the same table.

Outer join- Gives result from the left table.

Or

1. Inner Join: Returns only the rows that have matching values in both the tables

2. Outer Join: It includes the matching rows as well as some of the non-matching rows between the
two tables.

There are 3 types of Outer Join:

Left Outer Join: Returns all the rows from the LEFT table and matching records between both the
tables.

Right Outer Join: Returns all the rows from the RIGHT table and matching records between both the
tables.

Full Outer Join: It combines the result of the Left Outer Join and Right Outer Join.""

Sql query to find out total salary for all employee department wise?

SELECT DepartmentID, SUM(SALARY)

FROM EMPLOYEE

GROUP BY DepartmentID""

"

Explain about the usage of Jira ? How add testcases and defects?
JIRA: This software is like the central hub for the coding, collaboration, and release stages. QA teams
Use Jira for issues, customized screens, fields, and workflows to manage manual and automated
testing.

It is useful in the below scenarios:

a) For Agile Teams: -issue tracking, scrum boards, kanban boards, customizable workflows

b) For Project Management Teams:- Issue/Task Management, workflow customization, Reports and
Analytics, User Permission

c) For Software Development Teams:- Release Planning, Sprint Planning, CI/CD Integration, Issue
Management

d) For task management:- Project roadmap, Dependency mapping

e) For bug tracking:- Report bug/issues, workflows, email notification

f) For Task Management:- Email notification, custom fields, task change, sub tasks etc

Adding test cases in JIRA: Refer this link with step by step explanation
(https://blog.testlodge.com/how-to-write-test-cases-in-jira/)

Adding bug in JIRA: a) Verify the issue type: Bug is selected

b) Fill or select the following:

Defect ID

Defect title

Defect description (steps to reproduce)

Environment information

Screenshot(attachment)

Severity

Assign it to someone

Status- All the statuses in the bug life cycle

c) Click on Create button

34.How do you write your script in selenium

There are seven basic elements of a Selenium test script, which apply to any test case and any
application under test (AUT):
Create a WebDriver instance.

WebDriver driver = new FirefoxDriver();

Navigate to a Web page.

driver.get("https://www.udemy.com");

Locate an HTML element on the Web page.

driver.findElement(By.id("xxxx"))

driver.findElement(By.linkText("xxxx"))

driver.findElement(By.className("xxxx"))

driver.findElement(By.cssSelector("input#email"))

driver.findElement(By.name("xxxx"))

driver.findElement(By.xpath("//html/body/div/tablexxxx"))

driver.findElement(By.partialLinkText("xxxx"))

Perform an action on an HTML element.

driver.findElement(By.id("xxxx")).click();

driver.findElement(By.linkText("xxxx")).click();

Anticipate the browser response to the action.

Run tests and record test results using a test framework.

Conclude the test.

driver.close();

System.exit(0);
1)What are your roles and responsibilities as manual tester?

2)what are your roles and responsibilities as Automation test engineer?

3)what are the challenges you faced as a automation test engineer?

4)What is @dataprovider

5)syntax to perform parallel testing in TestNG and what do you write in

<suite tag> also what do you mention in double quotes like parallel =" "

"1>Understanding the Software Requirements specification document.

Understanding Application under test.

Make test cases and test data with user stories or test scenarios.

Perform test case execution with scenarios.

If the defect is found, then report it to the developer and fix it.

Where fault is found, re-test there.

Make sure the application is the free defect.

Send the test report to test lead.

"

"2>Selection or identification of test cases for automation from existing test case documentation.

Applying Designing and Test Automation Strategy Document

Creating an automation test plan and getting approval.

Configure Selenium Test Environment for setup(ex: Java, Selenium WebDriver and TestNG etc.).

Participation in Selenium Environmental Setup with IDE.

Automation framework design and implementation according to project structure.

Creating, Enhancing, Debugging and Running Test Cases.

Organizing, monitoring defect management process Handling changes and conducting regression
tests.

Find solutions for issues related to object identity issues and error handling.

Coordination of the members of the Test team and the development team to solve the issues.

1. Risk in agile

2. if one user moves to another sprint then what it is called

3. Bdd is behavior dependent or independent

4. What is most important things to define in a bug

5. Whom to contact if you are unable to understand the requirements


6. Day to day work

"1. Agile requires Experience, skilled people, requires planning and productivity. Also Agile is time
bound. Budget can go more than planned.

2. Spillover

3. BDD is Behaviour Driven Development. It means human-readable descriptions of software user


requirements as the basis for software tests. It is written in Gherkins.

4. Bug Summary, Description, Steps, Expected and Actual Result, Priority, Severity, Environment

5. BA

6. Team Lead activity of planning and assignment work, Test execution, working on JIRA tickets, issue
resolution , test matrices".

1.Tell me about yourself

2.Explain Sdlc and Stlc?

3.Explain Bug lifecycle?

4.What is assessment testing?

5.difference between Stress testing and load testing?

6.What is soak testing?

7.What is difference between bug and Defect?

8.tell me 10 test cases for item add to cart for ecommerce application?

9.how you will perform load testing and stress testing?

10.what is adhoc testing?

11.Exploratory testing?

12.what is build acceptance testing?

13.explain severity and priority and High severity with low priority, low severity and high priority?

14.what is data driven tetsing?

15.what test plan contains?

16.how to classified a defect?

17.Explain about agile methodology?

18.Tell me coulmns contains in testcase template?

19.What are the types of testing?

"1.Tell me about yourself

Stated in previous question.


2.Explain Sdlc and Stlc?

Software Development Life Cycle (SDLC) is a sequence of different activities performed during the
software development process.

Software Testing Life Cycle (STLC) is a sequence of different activities performed during the software
testing process.

3.Explain Bug lifecycle?

Bug life cycle is also known as Defect life cycle. In Software Development process, the bug has a life
cycle. The bug should go through the life cycle to be closed. Bug life cycle varies depends upon the
tools (QC, JIRA etc.,) used and the process followed in the organization.

New/open-assigned- fixed- retest- close or retest-open

5.difference between Stress testing and load testing?

Stress testing-

- Stress Testing is performed to test the robustness of the system or software application under
extreme load.

- load limit is above the threshold of a break.

- the performance is tested under varying data amounts.

- Stress testing is performed to find the behavior of the system under pressure.

Load Testing-

-Load Testing is performed to test the performance of the system or software application under
extreme load.

- load limit is the threshold of a break.

- the performance of the software is tested under multiple number of users

- Load testing is performed to find out the upper limit of the system or application.

6.What is soak testing?


Soak Testing is a type of non functional testing that is used to measure performance of a software
application under a huge volume of load for an extended period of time. The goal of Soak testing is
to ensure whether the software application sustains high volume of usage and to check what would
happen outside its design expectations.

7.What is difference between bug and Defect?

Defect-

The variation between the actual results and expected results is known as defect.If a developer finds
an issue and corrects it by himself in the development phase then it’s called a defect.

Bug-

If testers find any mismatch in the application/system in testing phase then they call it as Bug

9.how you will perform load testing and stress testing?

load testing-

1. Create a dedicated Test Environment for load testing

2. Determine the following

3. Load Test Scenarios

4. Determine load testing transactions for an application

o Prepare Data for each transaction

o Number of Users accessing the system need to be predicted

o Determine connection speeds. Some users may be connected via leased lines while others
may use dial-up

o Determine different browsers and operating systems used by the users

o A configuration of all the servers like web, application and DB Servers

5. Test Scenario execution and monitoring. Collecting various metrics

6. Analyze the results. Make recommendations

7. Fine-tune the System

8. Re-test

stress testing-
1. Plan the Stress Test – In this step, you gather the system data, analyze the system and define
the stress test goals.

2. Create Automation Scripts – Here, you need to create the Stress testing automation scripts and
generate the test data for the stress scenarios.

3. Script Execution – In the third step, you run the Stress testing automation scripts and store the
stress results.

4. Results Analysis – After storing the results, now you need to analyze the Stress Test results and
identify bottlenecks.

5. Tweaking and Optimization – In the final step, you fine-tune the system, change configurations,
and optimize the code to meet the desired benchmark.

10.what is adhoc testing?

When a software testing performed without proper planning and documentation, it is said to be
Adhoc Testing.

11.Exploratory testing?

EXPLORATORY TESTING is a type of software testing where Test cases are not created in advance but
testers check system on the fly. They may note down ideas about what to test before test execution.
The focus of exploratory testing is more on testing as a ""thinking"" activity.

12.what is build acceptance testing?

build acceptance testing is a set of tests run on every new build to verify that build is testable before
it is released to test team for further testing.

13.explain severity and priority and High severity with low priority, low severity and high priority?

-severity -The severity is a parameter set by the tester while he opens a defect and is mainly in
control of the tester.
-Priority: It defines the priority in which the defects should be resolved. if there are multiple defects,
the priority decides which defect has to be fixed and verified immediately versus which defect can
be fixed a bit later. It is usually set by the lead

-low severity with a high priority: A logo error for any shipment website, can be of low severity as it
not going to affect the functionality of the website but can be of high priority as you don't want any
further shipment to proceed with the wrong logo.

-high severity with a low priority: Likewise, for flight operating website, a defect in reservation
functionality may be of high severity but can be a low priority as it can be scheduled to release in a
next cycle.

14.what is data driven tetsing?

Data-driven testing is creation of test scripts where test data and/or output values are read from
data files instead of using the same hard-coded values each time the test runs. This way, testers can
test how the application handles various inputs effectively.

15.what test plan contains?

A test plan contains a product description, objectives, testing strategies, scope, schedule,
procedures, testing resources, and deliverables.

16.how to classified a defect?

Software Defects/ Bugs are normally classified as per:Severity / Impact ,Probability / Visibility
,Priority / Urgency ,Related Dimension of Quality ,Related Module / Component,Phase
Detected,Phase Injected

17.Explain about agile methodology?

AGILE methodology is a practice that promotes continuous iteration of development and testing
throughout the software development lifecycle of the project. In the Agile model, both development
and testing activities are concurrent

You might also like