1) Test Strategy Vs Test Plan?
1) Test Strategy Vs Test Plan?
1) Test Strategy Vs Test Plan?
A Test Strategy is a set of instructions, guidelines or principles that determine the test design and
how the testing process will be carried out. It sets the testing process standards. Documents like test
plans derive their content from the test strategy document. It can comprise of the principles used to
detail the scope and overview of the testing process, testing methodology, specifications for testing
environment, tools used for testing, release control, risk analysis and mitigation, review and
approval of a product before its official release.
A Test Plan is a document that describes the various actions that will be carried out in the testing
process – ranging from a strategy for development to error detection criteria in detail. This
document also specifies the methods to resolve any risks detected. It defines the approach, assets,
and time schedule of the planned testing activities. It identifies the scope and objective of the
software testing process, the various features that need to be tested, tasks that need to be carried
out during testing, techniques used to design the tests, and so much more. Basically, it records the
whole process of planning tests that need to be carried out on the product.
What's the importance of a test plan? A test plan is the foundation of every testing effort. It helps
set out how the software will be checked, what specifically will be tested, and who will be
performing the test. By creating a clear test plan all team members can follow, everyone can work
together effectively.
Page | 1
Parameter Test Plan Test Strategy
It is derived with the help of
Use case documents, software It is derived from the business requirement
Derivation
requirement specification documents, specification document.
and product description documents.
Existence It is usually found to exist individually. It can be a part of test plans, in some cases.
Basis It is based on testing strategies. It is based on standards that have been pre-defined.
Analytical strategy, model-based strategy, methodical
Level-specific test plans, type-specific test
strategy, standard-compliant strategy, reactive
Types plans, and master test plans are the
strategy, consultative strategy, and regression averse
different types of test plans.
strategy are the different types of test strategies.
Influence It affects only a single project at a time. It affects many projects at a time.
It narrates the common specifications in
Narration It narrates the approaches in testing.
the testing of a particular project.
The test strategy should be prepared during the initial phase of the project. It is always advisable to
have the test strategy documented at the earliest possible stage of the project because it gives a
clear idea to test lead/manager about the project scope. However if there are any open points or
dependencies due to which it could not be frozen, better to have the other parts covered and not to
wait for all dependencies resolved to start with.
Test strategy is made before the test plan.To summarize, the Test Plan is a vision of what you want
to achieve and the Test Strategy is an action plan designed to achieve this vision!
Page | 2
3)Defect Bug and Failure
A mistake in coding is called Error, error found by tester is called Defect, defect accepted by
development team then it is called Bug, build does not meet the requirements then it Is Failure
There are different types of bugs, some of them are given below.
• Functional Errors
• Compilation Errors
• Missing commands
• Run time Errors
• Logical errors
• Inappropriate error handling
Failure : Once the product is completed and it is delivered to the customers and if the customer find
any issues in product or software then it is the condition of failure of product.
In other words, if an end user finds an issue in product then that particular issue is called as failure.
Verification is done at the starting of the development process. It includes reviews and meetings,
walkthroughs, inspection, etc. to evaluate documents, plans, code, requirements and specifications.
Quality Assurance focuses on preventing defect. Quality Assurance ensures that the approaches,
techniques, methods and processes are designed for the projects are implemented correctly.
Page | 3
5)In SDLC model where does STLC fits in?
As we have seen, testing is a vital phase in SDLC, and STLC is just a framework for defining the tasks
performed during testing, so STLC is a subset of SDLC.
During project development, the team may decide to follow different models. These can vary from
waterfall, iterative, or Agile, but whatever the model, development and testing activity begin in
parallel. Therefore, SDLC and STLC run in parallel.
SDLC life cycle is a process of developing software through a phased manner in the following order
1. Requirements Gathering
2. Design the software
3. Build the Software
4. Test
5. Deployment
6. Maintenance.
Each stage has a definite entry and exit criteria along with deliverables.
STLC is part of SDLC. It can be said that STLC is a subset of the SDLC set. STLC is limited to the testing
phase where quality of software or product ensures. SDLC has vast and vital role in complete
development of a software or product.
Page | 4
5. More customer involvement
Agile sees the customer as part of the implementation team and includes them at each part of the
process. In contrast, Waterfall tends to spend a lot of time with the customer at the start, trying to
document all the perceived requirements. But once this has happened, the implementation team
usually take over.
TRUNCATE Command is a Data Definition Language operation. It is used to remove all the records
from a table. It deletes all the records from an existing table but not the table itself. The structure or
schema of the table is preserved.
Truncate statement is equivalent to DELETE operation without a WHERE clause. The truncate
command removes the records from a table without scanning it. This is why it is faster than the
DELETE statement.
DELETE
The DELETE statement in SQL is a Data Manipulation Language(DML) Command. It is used to delete
existing records from an existing table. We can delete a single record or multiple records depending
on the condition specified in the query. TRUNCATE TABLE Employees;
The conditions are specified in the WHERE clause of the DELETE statement. If we omit the WHERE
clause then all of the records will be deleted and the table will be empty.
The DELETE statement scans every row before deleting it. Thus it is slower as compared to
TRUNCATE command. If we want to delete all the records of a table, it is preferable to use
TRUNCATE in place of DELETE as the former is faster than the latter.
DELETE is a DML Command so it can be rolled back.
The DELETE command returns the number of records that were deleted by its execution.
DROP
DROP statement is a Data Definition Language(DDL) Command which is used to delete existing
database objects. It can be used to delete databases, tables, views, triggers, etc.
A DROP statement in SQL removes a component from a relational database management system
(RDBMS).
DROP is a DDL Command. Objects deleted using DROP are permanently lost and it cannot be rolled
back. DELETE FROM Employees;
Unlike TRUNCATE which only deletes the data of the tables, the DROP command deletes the data of
the table as well as removes the entire schema/structure of the table from the database.
DROP TABLE Employees;
This query will remove the whole table Employees from the database.
DROP DATABASE Company;
This query will delete the database Company.
DROP Command removes the table definition and all the data, indexes, triggers, constraints and
permission specifications for that table.
8) Joins in SQL?
→INNER JOIN
SELECT columns
FROM table1
INNER JOIN table2
ON table1.column = table2.column;
Page | 5
customer_id last_name first_name favorite_website
This example would return all rows from the customers and orders tables where there is a
matching customer_id value in both the customers and orders tables.
The rows where customer_id is equal to 6000 and 9000 in the customers table would be omitted,
since they do not exist in both tables. The row where the order_id is 5 from the orders table would
be omitted, since the customer_id of NULL does not exist in the customers table.
Page | 6
→SQL LEFT OUTER JOIN
SELECT columns
FROM table1
LEFT [OUTER] JOIN table2
ON table1.column = table2.column;
SELECT columns
FROM table1
RIGHT [OUTER] JOIN table2
ON table1.column = table2.column;
Page | 7
customer_id last_name first_name favorite_website
4000 Jackson Joe techonthenet.com
5000 Smith Jane digminecraft.com
6000 Ferguson Samantha bigactivities.com
7000 Reynolds Allen checkyourmath.com
8000 Anderson Paige NULL
9000 Johnson Derek techonthenet.com
And the orders table with the following data:
order_id customer_id order_date
1 7000 2016/04/18
2 5000 2016/04/18
3 8000 2016/04/19
4 4000 2016/04/20
5 NULL 2016/05/01
SELECT customers.customer_id, orders.order_id, orders.order_date
FROM customers
RIGHT OUTER JOIN orders
ON customers.customer_id = orders.customer_id
ORDER BY customers.customer_id;
There will be 5 records selected. These are the results that you should see:
SELECT columns
FROM table1
FULL [OUTER] JOIN table2
ON table1.column = table2.column;
customer_id last_name first_name favorite_website
4000 Jackson Joe techonthenet.com
5000 Smith Jane digminecraft.com
6000 Ferguson Samantha bigactivities.com
7000 Reynolds Allen checkyourmath.com
Page | 8
customer_id last_name first_name favorite_website
8000 Anderson Paige NULL
9000 Johnson Derek techonthenet.com
And the orders table with the following data:
order_id customer_id order_date
1 7000 2016/04/18
2 5000 2016/04/18
3 8000 2016/04/19
4 4000 2016/04/20
5 NULL 2016/05/01
11) What are the ways you ensure that the team members receive proper training?
Ans. Get feedback from all the team members on their strengths and weaknesses to make a note of
what type of training is necessary for the team. Also, new members who join the team should be
trained on time so as to be inducted as quickly as possible.
12) What will be your criteria for hiring team members? Ans. The criteria for hiring team members
are 1) his/her technical strength is as per project requirements, 2) his/her attitude towards the
profile he will be hiring for, and 3) will he/she be a good fit with the rest of the team members?
Page | 9
13) Name the different types of Test Plans?
Ans. There are three types of Test Plans: 1) Master Test Plan, 2) Testing Level Specific Test Plan and
3) Testing Type Specific Test Plan.
Agile methodology is a practice that helps continuous iteration of development and testing in the
SDLC process. Agile breaks the product into smaller builds.
In this methodology, development and testing activities are concurrent, unlike other software
development methodologies. It also encourages teamwork and face-to-face communication.
Business, stakeholders, and developers and clients must work together to develop a product.
Agile is an approach or philosophy to project management that aims to achieve a goal in small
increments. So instead of having one large reveal or launch, an Agile project comprises smaller
chunks of tasks that can be delivered in shorter time frames continuously. This makes it easier for
project teams to adapt to changing priorities, respond to problems that arise, and cut down on cost,
time, and inefficiencies.
There are four values that drive the Agile philosophy of project management:
• Individuals and interactions over processes and tools
• Working software over comprehensive documentation
• Customer collaboration over contract negotiation
• Responding to change over following a plan
Agile is well-suited for ongoing projects and projects where certain details aren’t clear from the
start. This makes Agile good for industries that deal with constant or unpredictable change, or teams
creating a new product. More traditional project management styles such as Waterfall might work
better for projects that have strict constraints—like a firm time or fixed budget—such as event
planning.
Page | 10
• Adaptation: The project and work can change to mirror new priorities.
• Inspection: The team strives to continuously improve the product and the process.
KEY DIFFERENCE
• Agile is a continuous iteration of development and testing in the software development
process whereas Scrum is an Agile process to focus on delivering the business value in the
shortest time.
• Agile methodology delivers the software on a regular basis for feedback while Scrum delivers
the software after each sprint.
• In the Agile process, leadership plays a vital role; on the other hand, Scrum fosters a self-
organizing, cross-functional team.
• Agile involves collaborations and face-to-face interactions between the members of various
cross-functional teams whereas Scrum collaboration is achieved in daily stand up meetings.
• In Agile process design and execution should be kept simple whereas in Scrum process
design and execution can be innovative and experimental.
Page | 11
continuous loop of planning, doing, checking, and acting that is useful for testing improvement
measures.
23) How would you choose a Testing tool for your project?
Ans. The steps to select the right testing tool for a project are:
Identify and understand the requirement for the project
Evaluate the tools and vendors that meet the requirements
Consider budget and estimate cost and benefit
Make the final decision
25) What are some of the software quality assurance best practices?
Ans. Below are some of the software quality assurance best practices:
• Continuous Improvement
• Two-Tier Test Automation Approach
Page | 12
• Metrics
• Shared responsibilities
• Teamwork
• Run a regression cycle
27) What are the different ways to manage or mitigate risks in a Test Project?
Ans. The following are the four ways to manage or mitigate the risk:
Avoidance: avoid the risk factor that is involved
Acceptance & Sharing: Accept the risk and develop a planned budget for the risks involved and
collaborate with others to share responsibility
Reduction: Develop a mitigation plan to decrease the impact of risks
Risk transfer: Transfer the risk to another resource or party
28) How can you determine the quality of the test execution?
Ans. You can determine the quality of test execution by:
Defect rejection ratio: (No. of defects rejected/ total no. of defects raised) X 100
Defect leakage ratio: (No. of defect missed/total defects of software) X 100
A smaller value of DRR and DLR indicates a better quality of test execution.
30) What is the difference between Assert and Verify commands in test automation?
Ans. Both Assert and Verify commands are used to check if the code conditions are true. The
difference is what happens next. There are some differences between Assert and Verify:
If the Assert condition is true then the program control will execute the next test step. If the
command fails, the execution will stop and further test steps will not be executed. There are two
types of assets, namely Hard and Soft Asserts.
When a Verify command fails, the test will continue executing the rest of the code and logging the
failure. The Verify command is used to check non-critical things.
Page | 13
31) What is the difference between Beta and Pilot Testing?
Ans. The differences between Beta and Pilot testing are:
Beta Testing
Beta testing is done when the project is about to release. The application is given to the end-users to
check whether the application meets the user’s requirements or not. It is done before the final
release when the development and testing are essentially completed. The Beta version is released to
a limited number of end-users to obtain feedback on the product quality. The purpose of Beta
testing is to identify defects and improve the quality of the application.
Pilot Testing
It is the real-world testing that is performed by a group of end-users before an application’s full
deployment. A group of users uses the application in totality before the final launch. The purpose of
Pilot testing is to evaluate the feasibility, time, cost, risk, and performance of the project.
Verification Validation
Verification evaluates the steps during the development Validation evaluates the product after the development
phase and determines if they meet the user requirements. process to determine if it meets the specified
requirements.
Verification is performed before validation. Validation is performed after verification.
It includes checking documents, design, code, and It tests and validates the actual product
program.
Verification does not involve executing the code. Validation involves executing the code.
Verification used methods, such as reviews, walkthroughs, Validation includes methods such as black-box testing,
inspections, and desk checking. white box testing, and non-functional testing.
It finds the bugs before the development cycle. It finds the bugs after the development cycle – the bugs
that the verification process could not detect.
Verification conforms to the requirements specified in the Validation checks whether it meets the specified
SRS document. requirements or not.
Its focus is on – Are we building the product right? Its focus is on – Are we building the right product?
Page | 14
Defect density is counted per thousand lines of code also known as KLOC.
• Code complexity
• The type of defects taken into account for the calculation
• Time duration which is considered for Defect density calculation
• Developer or Tester skills
36) What will happen if we use both implicit wait and explicit wait?
As per the official Selenium documentation, it is suggested not to mix both Implicit waits and Explicit
Waits. Mixing both of them can cause unpredictable wait times.
Implicit wait is defined only once in the code. It will remain same throughout the driver object
instance.
Page | 15
Explicit wait is defined whenever it is necessary in the code. This wait will call at the time of
execution. It is a conditional wait.
Explicit wait will override the implicit wait wherever explicit wait is applied. So, Explicit Wait gets first
preference then Implicit Wait.
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(
features = {"C:\\Users\\ankur.jain\\eclipse-workspace\\Cucumber_Test\\src\\main\\java\\
com\\qa\\FeatuerFile\\Login.feature",
}, //the path of the feature files
//format= {"html:target/site/cucumber-pretty;json:target/cucumber.json""},
//tags = {"@all"}
)
}
Step 2: We Need to Create another Runner File. Let’s Name it as ReRunRunner.Java and inside
feature we need to provide the name of this failed_scenario.txt file along with @.
features = {"@rerun/failed_scenarios.txt",
},
Now once any of our scenarios will get failed this failed_scenarios.txt the file will be generated inside
the rerun folder with failed feature file name and using the ReRunner.Java file created in Step 2 we
can easily rerun our failed scenario in Cucumber-Junit.
Page | 16
Dry-run is used to compile feature files and step definitions in cucumber. It is specially used in the
stage when you will have to see if there are any compilation errors, to check that you can use dry-
run. Dry-run options can either set as true or false. If it is set to true, it will mean that Cucumber
checks every Step mentioned in the Feature File have corresponding code written in Step Definition
file or not. So, if in any case any of the functions are missed in the Step Definition for any Step in
Feature File, it will give us the message.
38 ) Cucumber Tags?
Let's say you have got many different feature files that cover all the different functionality of the
application. Now there can be a certain situation in the project where you like to execute just
a SmokeTests or End2EndTests or may be RegressionTests. One approach is that you start creating
new feature files with the name of the type like SmokeTests.features or End2EndTests.feature and
copy-paste your existing tests in the same. But this would make the project filthy and would require
more maintenance in future. So how to manage execution in such cases?
For this, Cucumber has already provided a way to organize your scenario execution by using tags in
feature file. We can define each scenario with a useful tag. Later, in the runner file, we can decide
which specific tag (and so as the scenario(s)) we want Cucumber to execute. Tag starts with “@”.
After “@” you can have any relevant text to define your tag like @SmokeTests just above the
scenarios you like to mark. Then to target these tagged scenarios just specify the tags names in
the CucumberOptions as tags = {"@SmokeTests"}.
Tagging not just specifically works with Scenarios, it also works with Features. Means you can also
tag your features files. Any tag that exists on a Feature will be inherited by Scenario, Scenario
Outline or Examples.
Things to Note:
• Few scenarios are part of the Smoke Test, Regression Test, and End2End Test.
Page | 17
• Few scenarios are part of two or more Test Types. For example, the first test is considered as
Smoke as well as Regression.
• Few scenarios are not at all tagged
• The last scenario of Payment Declined, it is a single scenario but has five different test data.
So this will be considered as five different scenarios.
Note: In the excel sheet and in the feature file paste above if you count the scenarios which are
tagged as @SmokeTests, you will find the count is 6 and the same count is also displayed under Junit
tab.
Page | 18
How to Ignore Cucumber Tests
This is again a good feature of Cucumber Tags that you can even skip tests in the group execution.
Special Character ~ is used to skip the tags. This also works both for Scenarios and Features. And this
can also works in conjunction with AND or OR.
Execute all tests of the feature tagged as @FunctionalTests but skip scenarios tagged as
@SmokeTest
Note: This is AND condition, which means all the scenarios tagged as @FunctionalTest but not
@SmokeTest. So total tests are 15 and smoke tests are 6, so it ran just 9 tests.
Execute all tests which are not at all tagged in all the Features
Page | 19
39) Invocation count is used when you want to run the same tests multiple times. Below example
illustrates how to use invocation count in TestNG. In below example, test1 will be executed 5 times.
We have also used threadPoolSize parameter with value as 2. It means that 2 threads will be created
to run the test in parallel.
Page | 20
Page | 21
Page | 22