0% found this document useful (0 votes)
22 views16 pages

ST Abl

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)
22 views16 pages

ST Abl

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/ 16

SOFTWARE TESTING -ASSIGNMENT

SIDDAGANGA INSTITUTE OF TECHNOLOGY, TUMKUR


(An Autonomous Institute affiliated to Visvesvaraya Technological University (VTU), Belagavi, Approved by AICTE, New Delhi)

Report on

“ACTIVITY BASED LEARNING”

Software Testing (N2MCE12)


Second Semester

Academic Year 2023-2024 Submitted by:


MEGHANA A C 1SI23MC026
MOHAMMED NAUMAN 1SI23MC027
MURALI K L 1SI23MC028
N G MANASA 1SI23MC029
NAGAPOOJA TR 1SI23MC030

Department of Master of Computer Application

01
Activity Based Learning – Software Testing

Index

Sl. No Content Page no


1 Introduction 1
2 Sample Website 2
for website testing
4 Test cases table 3-5
5 AUTOMATION 6-10
Testing
Snapshots.

6 Java code snippet 11-13


for automation
testing
7 Conclusion 14
Introduction

Automated software testing is a critical aspect of


software development, enabling the efficient and
systematic evaluation of software applications to
ensure their reliability and functionality. This
automation is achieved through the use of specialized
tools and frameworks, as exemplified by the Java-
based script presented in this demonstration.
In this script, a ChromeDriver automates the
testing of a web form, inputting various data sets,
submitting forms, and validating the results. The script
showcases the use of Selenium WebDriver and
WebDriverWait to interact with web elements, handle
alerts, and verify the success of form submissions.
Automated testing, as depicted here, streamlines the
quality assurance process, enhances testing accuracy,
and accelerates the development lifecycle. We also did
manual testing for individual data fields to document
the validation of given website.
Sample Website for website testing

Fig:1 Sample ABL form for testing using selenium tool

Data Fields Constraints

FIELD CONSTRAINTS

NAME Required field must not be empty,Only letters and whitespace.

EMAIL-ID Required field must not be empty,must enter correct email format.

PASSWORD Required field must not be empty,it accepts minimum six cahrecters of digits,alphabet,special
character.

MOBILE NO. Required field must not be empty,it only accepts 10 numeric digits and should not accept 0 as
first cahrecter.

RADIO BUTTON Required field must not be empty,can select one option at a time.

CHECKBOX Required field must not be left empty,Can select multiple options at a time.

BUTTON Buttons are a fundamental part of a website, Submitting information .

Page 2
Test cases table
Test Case Test Steps Expected Results Actual Results
Description Status

Valid inputs 1..Enter a valid name in the Success message Success message Pass
for all fields "First Name" Textbox.. "Naukri.com" homepage "Naukri.com" homepage
is displayed. is displayed.
2. Enter a valid email address in
the "Email Address" TextBox.
3. Enter a strong password in
the "Password" field.

4. Enter a valid 10-digit mobile


number in the "Mobile
Number" field
5.Select either of the button
for “work Status”.

6.Select the "Current City” by


clicking on the disabled button.

7.Select the checkbox to agree


and get imp updates..

Invalid First 1..Enter a Invalid name in Error message “ Numeric Error message “ Numeric
ee

Name the "First Name" Textbox.. and special characters and special characters
other than space .' not other than space .' not
allowed” allowed”
Invalid email 1.Enter a valid name in the Error message Error message Pass
address format "First Name" Textbox.. "Please enter a "Please enter a
valid email ID” valid email ID”
2 Enter a Invalid email address (e.g., (e.g.,
in the "Email Address" TextBox [email protected])." [email protected])."
3. Enter a strong password in is displayed is displayed.
the "Password" field.
4. Enter a valid 10-digit mobile
number in the "Mobile
Number" field.
5.Select either of the button
for “work Status.

6..Select the "Current City” by


clicking on the disabled button..
7..Select the checkbox to agree
and get imp updates.

Page 3
Invalid 1.Enter a valid name in the Error message"Spaces Error message"Spaces Pass
password "First Name" Textbox.. are not allowed” are not allowed”
{less than 6 (e.g., 123 34). (e.g., 123 34).
2 Enter a valid email address in
characters)
the "Email Address" TextBox If entered less then 6
3. Enter a strong Invalid character. Error message”Password
should be minimum 6
password in the "Password" (e.g.123)
Error message”Password characters”
field.
should be minimum 6
characters”
4. Enter a valid 10-digit mobile
number in the "Mobile
Number" field.
5.Select either of the button
for “work Status.
6..Select the "Current City” by
clicking on the disabled button..

7..Select the checkbox to agree


and get imp updates.
Invalid mobile 1.Enter a valid name in the Error message "Please Error message "Please Pass
number format "First Name" Textbox.. enter your 10 digit Mobile enter your 10 digit Mobile
Number “is Number “is
2 Enter a valid email address in displayed. displayed.
the "Email Address" TextBox
3. Enter a strong password in If starts with 0 (e.g., If starts with 0 (e.g.,
the "Password" field. 0123456789)." 0123456789)."

4. Enter a Invalid 10-digit


mobile number in the "Mobile
Number" field.

5.Select either of the button


for “work Status.
6..Select the "Current City” by
clicking on the disabled button..

7..Select the checkbox to agree


and get imp updates.

Page 4
Trying to select .1.Enter a valid name in the Error message "Please Error message "Please Pass
Multiple “Radio - "First Name" Textbox. select either of the select either of the
Button” . options”. options”.
2. Enter a valid email address in
the "Email Address" TextBox
3. Enter a strong password in
the "Password" field..
4. Enter a valid 10-digit
mobile number in the "Mobile
Number" field..
5. Select multiple Radio
buttons for “work Status
6. ..Select the "Current City”
by clicking on the disabled
button..
7. .Select the checkbox to
agree and get imp updates.s.

Not selecting 1.Enter a valid name in the Error message "Please Error message "Please Pass
checkbox "First Name" Textbox.. select the chxkbox before select the chxkbox before
Trying to click clicking on the register clicking on the register
2 Enter a valid email address in
on Register button”.. button”.
the "Email Address" TextBox
button
3. Enter a strong password in
the "Password" field.

4. Enter a valid 10-digit mobile


number in the "Mobile Number"
field.

5. Select either of the button


for “work Status.

6. Select the "Current City” by


clicking on the disabled button

7. Select the checkbox to agree


and get imp updates.

If entered valid information in Error!.Not able to Error!.Not able to Pass


Not clicking on
all fields and not Clicking navigate to Verifation navigate to Verifation
Register button,
"Register". button. Page Page.
trying to
navigate to next
page

Page 5
AUTOMATION Testing Snapshots.

Automate the following scenario


1.open the browser.
2. Go to Naukri.com and maximize the browser.
3.Click on Register Button.
4.Fill the details like FirstName,Email=id,Password,Mobile Number.
5.Select the Work Status,Location .
6.Select the Checkbox
7.Click on REGISTER button.

1. Open the browser.

Page 6
2. Go to Naukri.com .

Maximize the browser

Page 7
Enter the “Valid information” in Full name TextField and Enter Valid email-id
in Email-id TextField and Enter Password more then 6 digits.

Enter the “Valid Mobile number” in Mobile number TextField and Select Work
Status by selecting either of the Button and Select the Current City and Select
the checkbox.

Page 8
After entering valid information, we will be navigated to ” Registration
Successful” page.

After Successfully Registering we will be navigated to Verify mobile number page.

Page 9
Entering the OTP manually to verify the mobile number.

After successfully verifying the mobile number we will be navigated to


HOME PAGE of NAUKRI.COM

Page 10
CODE SNIPPET FOR AUTOMATING
REGISTRATION PAGE NAUKRI.COM WEBPAGE

JAVA CODE SNIPPET TO AUTOMATE USING SELENIUM

package SoftwareTesting;

import java.time.Duration;
import java.util.List;

Page 11
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import
org.openqa.selenium.support.ui.ExpectedConditions;
import
org.openqa.selenium.support.ui.WebDriverWait;

public class AutomationTesting {

public static void main(String[] args) throws


InterruptedException {
WebDriver driver=new ChromeDriver();
driver.get("https://www.naukri.com/");
driver.manage().window().maximize();
driver.findElement(By.xpath("//div[@class='nI-gNb-
log-reg']/a[2]")).click();
driver.findElement(By.xpath("//input[@id='name']")).s
endKeys("Group SIX");
driver.findElement(By.xpath("//input[@id='email']")).s
endKeys("[email protected]");
driver.findElement(By.xpath("//input[@id='password']
")).sendKeys("12345@Grou psix");
driver.findElement(By.xpath("//input[@id='mobile']"))
.sendKeys("9876543210");

Page 12
driver.findElement(By.xpath("//div[@class='focusable
optionWrap ']/../div[2]")).click();
WebDriverWait wait=new WebDriverWait(driver,
Duration.ofSeconds(5));
wait.until(ExpectedConditions.visibilityOfElementLocat
ed(By.xpath("//span[.='Bengaluru']"))).click();
Thread.sleep(2000);
driver.findElement(By.xpath("//i[@class='ico
resman-icon resman-icon-check-box']")).click();
driver.findElement(By.xpath("//button[.='Register
now']")).click();
Thread.sleep(2000);
driver.get("https://www.naukri.com/mnjuser/homepa
ge");
driver.quit();
}
}

Conclusion
Automated software testing is a pivotal practice in
modern software development, ensuring the
consistent and efficient evaluation of software
applications. The presented script, which employs
Selenium WebDriver and Java, exemplifies the
power of automation in testing web forms. By
systematically inputting data, simulating
user interactions, and validating results, this script

Page 13
demonstrates how automated testing can save time,
reduce human error, and enhance the overall
quality of software.

Embracing automated testing methodologies like


this can significantly contribute to the creation of
robust and reliable software products, ultimately
benefiting both developers and end-users alike. We
also did manual testing for the ABL Form website
to test the different test
cases.Automation testing is used over manual
testing for its speed and repeatability, allowing for
efficient testing of software applications and
reducing human error

Page 14

You might also like