0% found this document useful (0 votes)
12 views

TESTING

Uploaded by

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

TESTING

Uploaded by

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

Agile Process:

1. Agile Overview: Agile is a flexible software development methodology that


emphasizes iterative development and collaboration.

[agile is a software development methodology using which you can deliever the
product faster to your client and more frequently to the client and you
get the feedback from the customer in imporving the quality of software.agile
promotes team collabration it promotes continuos delivery and better effecient
quality]

2. Ceremonies: Agile ceremonies include Daily Stand-up, Sprint Reviews,


Retrospectives, and Planning.
3. Daily Stand-up: Team members share updates, discuss challenges, and plan
tasks for the day.
4. Sprint Reviews: Teams demonstrate features completed during the sprint and
gather feedback.
5. Retrospectives: Teams reflect on the sprint to identify improvements for the
next iteration.
6. Planning: Teams plan tasks for the upcoming sprint, considering priorities
and resources.

How would you create comprehensive test cases for a pen

Verify the type of pen, whether it is a ballpoint pen, ink pen, or gel pen.
Verify that the user is able to write clearly over different types of papers.
Check the weight of the pen.
Verify if the pen is with a cap or without a cap.
Verify the color of the ink on the pen.

Smoke and Sanity Testing:

smoke testing - wheneevr we get a new build we will check the major
functionality of an application is working fine or not for example login
functionality if we are unableto login then there will be difficult to perfom
further actions so thats where we perform smoke testing

sanity testing which is used to perform whenever we get a build with that
build there will be a default fix so we will test that defect fix thoroughly for
example there is a test box which is having some defect the developer has fixed it
and given you the build and now its our resposibilty to test that so that
particular testing is known as sanity testing

Regression and Retesting:

Regression
we know that regression testing is perfomed to make sure the existing feature
of applicationis working fine even after adding a new feature or some of the defect
fixes,so at that particular point some exsiting feature has been broken that will
be the huge loss to company so fro that reason making sure the exsisting feature is
working fine is very much important.suppose we can say phone pay if they added some
new feature to the application that shoukd work fine along with the existing
feature otherwise there will be a huge loss for company

Retesting
in retesting we will execute the already written test case which is already
written again and it is a part of defect life cycle if the defect is fixed and
working fine we will close it otherwise we will be reopening it.
Test Cases for Gmail:

1. Objective: Write test cases to validate the functionality of Gmail's login


page.
2. Positive Scenarios: Cases where correct email and password lead to successful
login.
3. Negative Scenarios: Cases where incorrect email, password, or both lead to
failed login attempts.
4. Password Recovery: Test the "Forgot Password" functionality and ensure users
can reset their passwords.
5. Multi-factor Authentication: Test if two-step verification process works
correctly.

Testing Types for Gmail Login:

1. Functional Testing: Test if login functionality works as intended, allowing


users to access their accounts.
2. Security Testing: Assess the login page for vulnerabilities and validate
security mechanisms.
3. Usability Testing: Ensure the login process is user-friendly and intuitive.
4. Compatibility Testing: Verify that the login page works seamlessly on
different browsers and devices.

Adhoc Testing:

adgoc testing is a unstrctured way of testing the application which basically


do not follow any methodological approach

1. Approach: Explore Gmail randomly without a predefined plan.


2. Steps: Click links, compose emails, attach files, and perform various
actions.
3. Purpose: Identify unexpected issues, usability problems, and inconsistencies.

Exploratory Testing:

[ As the name suggest that expolatory testing is about exploring,finding out


about the software,what it does what it dosent does,what it works and what it
dosent works this is an approch when there is a poor reqirement specifications and
when time is limited. it helps in finding uncovered/ undisovered features]

1. Approach: Freely navigate Gmail while using intuition and creativity.


2. Steps: Explore inbox management, email composition, labels, and settings.
3. Purpose: Uncover defects, user experience flaws, and areas not covered by
structured testing.

Browser Compatibility Testing:

1. Objective: Ensure Gmail works across different web browsers.


2. Steps: Access Gmail on Chrome, Firefox, Safari, and Edge.
3. Verification: Check if the layout, features, and responsiveness are
consistent.

UAT Testing:

[There are the parts in uat testing alpha testing and beta.alpha testing is
done by internal testers in your team.this will be done before the product is
launched into the market.
Beta testing is done by real users in real time environment to catch the
defects beta testing is very effective to get the feedback and you have to work
on it]

1. Objective: Validate Gmail's readiness for real users.


2. Steps: Involve actual users to test sending/receiving emails, organizing
inbox, and other functions.
3. Feedback: Gather user feedback to improve Gmail's features and usability.
4. User-Centric: Ensure Gmail aligns with user needs and expectations.

FindElement vs. FindElements:

• findElement(): This method in Selenium searches for the first web element
that matches the specified criteria and returns it. If no matching element is
found, it throws a NoSuchElementException.

• findElements(): This method also searches for web elements matching the
specified criteria, but it returns a list of all matching elements. If no
matching elements are found, it returns an empty list.

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;

public class FindElementVsFindElements {


public static void main(String[] args) {
WebDriver driver = new ChromeDriver();
driver.get("https://www.example.com");

// findElement() example
WebElement singleElement = driver.findElement(By.id("elementId"));

// findElements() example
List<WebElement> multipleElements = driver.findElements(By.tagName("a"));

driver.quit();
}
}

Initiating a Browser:

In Selenium, to start a browser session, you use the appropriate WebDriver class
(like ChromeDriver for Chrome) and instantiate it.
Example Java Code:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class InitiateBrowser {


public static void main(String[] args) {
WebDriver driver = new ChromeDriver(); // Initiates a Chrome browser
instance
driver.get("https://www.example.com");
driver.quit();
}
}
Test Automation Frameworks:

[ A framework can include support program,compliers,code


libraries,toolset,and apis to develop software and create systems ]

A test automation framework is a set of guidelines, standards, and practices


that help in structuring and organizing automated tests. It provides a
systematic approach to creating, maintaining, and executing automated test
scripts. The primary goal of a test automation framework is to enhance the
efficiency, maintainability, and scalability of test automation efforts.

Advantages of Using Test Automation Frameworks:

1. Modularity: Frameworks allow the division of tests into smaller, reusable


modules, making maintenance and updates easier.
2. Reusability: Components like test libraries, utilities, and data can be
reused across different test cases.
3. Abstraction: Frameworks abstract underlying complexities, allowing testers to
focus on test scenarios rather than technical details.
4. Maintainability: Changes to the application can be accommodated with minimal
updates to the test scripts.
5. Reporting: Frameworks often provide detailed and customizable test execution
reports.
6. Parallel Execution: Some frameworks support parallel execution of tests,
speeding up the testing process.
7. Data Management: Frameworks facilitate efficient handling and management of
test data.

Types of Test Automation Frameworks:

1. Linear Scripting Framework: Basic automation where test scripts are executed
sequentially.
2. Data-Driven Testing Framework: Tests are executed using different sets of
input data from external sources.
3. Keyword-Driven Testing Framework: Tests are written using keywords that
represent test actions and logic.
4. Hybrid Testing Framework: A combination of different frameworks to leverage
their strengths.
5. Modular Testing Framework: Tests are divided into smaller, manageable modules
for reusability.
6. Behavior-Driven Development (BDD) Framework: Integrates business requirements
into test cases for better collaboration.
7. Page Object Model (POM) Framework: Organizes tests and page interactions
through a structured approach.

Test Automation Frameworks:

• Data-Driven: Storing test data outside code (like in spreadsheets) and using
it in test cases.
[data driven framework is which tha test data will be stored in
form of csv and excel sheets.testng supports the ddf using
@dataprovider annotation]
• Keyword-Driven: Using keywords to define test steps and actions.
Programming Concepts in Java:

• Immutable Class: A class whose state cannot be changed after creation, like
String in Java.
• Polymorphism: A method having multiple forms based on the number or types of
arguments.
• Encapsulation: Hiding internal implementation details and exposing a
controlled interface.
• Class and Constructor: A class defines a blueprint for objects, while a
constructor initializes an object.

Swapping Values: In this challenge, you need to swap the values of two variables
without using a third variable

public class SwappingValues {


public static void main(String[] args) {
int a = 10, b = 20;
System.out.println("Before swapping - a: " + a + ", b: " + b);

a = a + b;
b = a - b;
a = a - b;

System.out.println("After swapping - a: " + a + ", b: " + b);


}
}

Reversing a String: In this challenge, you are required to reverse a given string.

public class ReverseString {


public static void main(String[] args) {
String original = "Hello";
String reversed = "";

for (int i = original.length() - 1; i >= 0; i--) {


reversed += original.charAt(i);
}

System.out.println("Original: " + original);


System.out.println("Reversed: " + reversed);
}
}
Duplicate Characters: This challenge involves finding and displaying duplicate
characters in a given string. The code snippet below demonstrates how to do this:

public class DuplicateCharacters {


public static void main(String[] args) {
String input = "Programming";
char[] characters = input.toCharArray();

System.out.print("Duplicate characters: ");


for (int i = 0; i < characters.length; i++) {
for (int j = i + 1; j < characters.length; j++) {
if (characters[i] == characters[j]) {
System.out.print(characters[i] + " ");
break;
}
}
}
}
}

You might also like