Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Mini Project Stqa Report

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

MINI PROJECT REPORT ON

Regular Expression testcases for testing purpose


Submitted By,
Pradnya Dhananjay Netke

UNDER THE GUIDENCE OF


Prof.Ujvala Patil
towards the partial fulfilment
Fourth Year Under
Graduate Course in Computer Engineering of

SAVITRIBAI PHULE PUNE UNIVERSITY in

the academic year 2023-2024.

AJEENKYA
DY Patil School of Engineering

DEPARTMENT OF COMPUTER ENGINEERING Ajeenkya


D. Y. Patil School of Engineering
Ajeenkya D. Y. Patil Knowledge City, Charholi (Bk), Lohegaon, Pune - 412 105
Affiliated to
SAVITRIBAI PHULE PUNE UNIVERSITY (2023-2024)
AJEENKYA
DY Patil School of Engineering

DEPARTMENT OF COMPUTER ENGINEERING


Ajeenkya D. Y. Patil School of Engineering

Ajeenkya D. Y. Patil Knowledge City, Charholi (Bk), Lohegaon, Pune - 412 105

CERTIFICATE
This is to certify that Mini-project Report On

“Regular Expression testcases for testing purpose”


Submitted by,
Exam seat no:_________________ Name: Pradnya Dhananjay Netke
Towards the partial fulfilment of Fourth Year Under Graduate Course In
Computer Engineering
Of
SAVITRIBAI PHULE PUNE UNIVERSITY
In the academic year 2023 – 2024

Prof. Ujvala Patil Dr. Pankaj Agarkar


Project Guide HOD
AKNOWLEDGEMENT
It gives me a great pleasure and immense satisfaction to present this special topic of project
report on “Regular Expression testcases for testing purpose” which is the result of unwavering
support, expert guidance, and focused direction of guide Prof. Ujvala Patil to whom I express
my deep sense of gratitude and humble thanks, for his valuable guidance throughout the
presentation work.

Furthermore, I am indebted to Dr. Pankaj Agarkar, HOD Computer Engineering and


Dr. F. B. Sayyad, Principal whose constant encouragement and motivation inspired me to do my
best.

Last but not the least I sincerely thank to my colleagues, the staff and all others who
directly or indirectly helped us and made numerous suggestions which have surely improved the
quality of my work.

Pradnya D. Netke
(B.E. Computer Engineering)
Title:
Software Testing and Quality Assurance Mini Project Dynamic website of covid-19 information using HTML,
CSS, JAVASCRIPT And PHP, MySQL database used to store user account, comment, and registration form
details. Regular Expression testcases for testing purpose Problem Definition:
Perform regular expression testing using selenium.

Objective:
We are going to learn how to Prepare Test Cases inclusive of Test Procedures for identified TestScenarios.
Perform selenium testing with regular expression check

Prepare Test Reports based on Test Pass/Fail Criteria.

Theory:
Test Plan for Website Testing
The Test Plan document is derived from the Product Description, Software Requirement Specification, Use Case
Documents. The focus of the test is what to test, how to test, when to test, and who will test. Test plan document
is used as a communication medium betweentest team and test managers.

A standard test plan for Website Testing should define following features;
• Define the scope of testing

• Define objective of testing

• Approach for testing activity

• Schedule for testing

• Bug tracking and reporting

Steps for Download & Install Selenium WebDriver :

1. Install Java on your computer

2. Install Eclipse IDE

3. Download the Selenium Java Client Driver

4. Configure Eclipse IDE with WebDriver

1
ADYPSOE, Department of Computer Engineering 2023-24
SELENIUM TESTING :

Selenium is an open-source umbrella project for a range of tools and libraries aimed at supporting browser
automation. It provides a playback tool for authoring functional tests across most modern web browsers, without
the need to learn a test scripting language.

Regular expressions are a very useful technique for improving Selenium WebDriver tests. They can be used for

• extracting text from the value of a Webdevelopment


• validating if a value matches a specific pattern
• validating if a URL matches a pattern
Validations Using Regular Expression :

Let us investigate regular expressions using a specific test case. Our test case does the following:

1. open the home page of a site (http://www.vpl.ca)

2. execute a keyword search (example: keyword = java)

3. the first results page is displayed

4. validate that the URL is correct ex.(https://vpl.bibliocommons.com/search?q=java&t=keyword )

5. validate that results count is greater than 0 (1 – 25 of 905 items; the results count is 905)

6. select page 2 of results

7. the second results page is displayed

8. validate that the URL is correct


ex.(https://vpl.bibliocommons.com/searchdisplay_quantity=25&page=2&q=java&t=keyword )

9. validate that the results count is greater than 0 (26 – 50 of 905 items; the results count is 905)
For both validations, we could use String methods and variables. But regular expressions do the same things
better.

2
ADYPSOE, Department of Computer Engineering 2023-24
First, some details about the project

Project uses 3 class :

1. Before class :
i. The @BeforeClass annotated method runs before the execution of test methods in a current class.

2. After class :
i. The @AfterClass annotated method will be executed after all the test methods of a current class
have been invoke 3. Test class :
i. The @Test class annotated method is containing test logic which is automate the webpage.

We are testing it on sign up page


Code :
package Test;

import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.Test;

import org.testng.annotations.BeforeClass; import org.testng.annotations.AfterClass;

public class SignUpTest { public WebDriver driver; @Test

public void Signup() {

// For Open Website

driver.get("http://localhost/Covid19-TMS%20Project%20Using%20PHP%20and%20MySQL/covid-tms/new-
usertesting.php");

// Sending full name driver.findElement(By.id("fullname")).sendKeys("Swapnil Rajendra Take"); //

Send phone to text field driver.findElement(By.id("mobilenumber")).sendKeys("8600789879");

// dob driver.findElement(By.id("dob")).sendKeys("09-04-2000");

// Govt Issued ID driver.findElement(By.id("govtissuedid")).sendKeys("Adhar");

// ID Number driver.findElement(By.id("govtidnumber")).sendKeys("979325686414");

3
ADYPSOE, Department of Computer Engineering 2023-24
// address driver.findElement(By.id("address")).sendKeys("Newasa");

// State driver.findElement(By.id("state")).sendKeys("Maharashtra");

//Test Type driver.findElement(By.id("testtype")).sendKeys("RT-PCR");

//Time For test driver.findElement(By.id("birthdaytime")).sendKeys("22-12-2022

13:20");

//Submit Button
driver.findElement(By.xpath("/html/body/div/div/div/div/form/div/div[2]/div/div[2]/div[3]/input")).c
lick();

//String s=driver.getCurrentUrl();

@BeforeClass

public void beforeClass() { System.setProperty


("webdriver.chormedriver","\"C:\\Users\\Swapn\\OneDrive\\Desktop\\chromedriver.exe\""); driver

= new ChromeDriver();

@AfterClass public void afterClass() { driver.quit();

Test Scenarios for the Sign-up page :


1) Verify the messages for each mandatory field.
2) Verify if the user cannot proceed without filling all the mandatory fields.
3) Verify the age of the user when the DOB is selected.
4) Verify if the numbers and special characters are not allowed in the First and Last name.
5) Verify if a user can sign-up successfully with all the mandatory details.
6) Verify if a user can log in with the valid details.
7) Verify if the Password and Confirm Password fields are accepting similar strings only.
8) Verify if the Password field will prompt you for the weak passwords.
9) Verify if duplicate email address will not get assigned.
10) Verify that hints are provided for each field on the form, for the ease of use.

4
ADYPSOE, Department of Computer Engineering 2023-24
Screenshots:
1. Signup page :

2. Regex test

5
ADYPSOE, Department of Computer Engineering 2023-24
3. Registered user login :

4. Login :

6
ADYPSOE, Department of Computer Engineering 2023-24
GUI : Graphical User Interface

7
ADYPSOE, Department of Computer Engineering 2023-24
Test Result Report

TABLE OF CONTENTS

Sr. No. Title


1. Introduction
2. Testing Strategy
3. Selenium Testing
4. Regular Expression Testing
5. Tools
6. Conclusion

1. Introduction

Project Dynamic website of covid-19 information using HTML, CSS, JAVASCRIPT And PHP,
MySQL database used to store user account, comment, and registration form details.

2. Testing strategy

1. Functional testing
2. Selenium testing

Manual Testing Automate d


Approach Type of Testing on
Using Using Tools/APIs/Libraries
Testing Device Device
Emulat
or

Standard Selenium No Yes No 1. Selenium


Testing Testing
(Functional
Testing)

8
ADYPSOE, Department of Computer Engineering 2023-24
3. Selenium Testing Report

EXECUTION STATUS COMPLETED/CANCELLED/PENDING

PASSED TESTCASES 7

FAILED TESTCASES 2

PENDING TERSTCASES 0

TEST CASES PLANNED 7

MODULES/ % TCs % TCs TCs


SCENARIOS EXECUTED PASSED PENDING
DESCRIPTION PRIORITY REMARKS

Email Email Id must have 100 100 00 HIGH -


Validation @ symbol.

Phone No Phone no. must have 100 100 00 HIGH -


Validation 10 numbers.

Patients Slot Patient’s date must have 100 100 00 HIGH -


date validation next date from test apply.

4. Regular Expression Testing

EXECUTION STATUS COMPLETED/CANCELLED/PENDING

PASSED TESTCASES 3

FAILED TESTCASES 1

PENDING TERSTCASES 0

TEST CASES PLANNED 2

9
ADYPSOE, Department of Computer Engineering 2023-24
MODULES/ % TCs % TCs TCs
SCENARIOS DESCRIPTION EXECUTED PASSED PENDING PRIORITY REMARKS

Email Email Id must have 100 100 00 HIGH -


Validation @ symbol.

Phone No Phone no. must have 100 100 00 HIGH -


Validation 10 numbers.

Patients Slot Patient’s date must have 100 100 00 HIGH -


date validation next date from test apply.

5. TOOLS

1. Selenium jar file / Selenium IDE

2. Eclipse IDE

3. Testing extension in eclipse

4. Covid information site on localhost / website

Conclusion :

Selenium is a cost-effective and flexible tool developers can use in the automation testing of their web
applications. The most intriguing feature of this software is the ability to test applications across various
web browsers. This ensures that websites do not crash or breakdown in certain browsers.
The above are examples of using regular expression in web tests. Regular expressions will be much more
useful in API testing, where text-parsing is essential.

10
ADYPSOE, Department of Computer Engineering 2023-24

You might also like