SlideShare a Scribd company logo
1 of 13
Generating Test Cases
Abhinav Kumar Singh
MCA/25018/21
What is Test Case Generation
Test case generation is the process of writing SQL test cases for verifying and testing database
functionalities. Relational databases are queried by SQL statements, so the test cases are also
generated in SQL. Test cases are designed based of the functionalities of an application. So it
varies from one application to another. The purpose of test case generation is to check the
output against expected results. Based on the results, either the test case is modified or kept as
it is.
Explanation
The aim of testing is to find bugs in a system or application. Test case generation is the process
of building test suites for detecting system errors. A test suite is a group of relevant test cases
bundled together. Test case generation is the most important and fundamental process of
software testing.
Multiple techniques available for
generating test cases
• Goal-oriented approach – The purpose of the goal-oriented test case generation approach is to
cover a particular section, statement or function. Here the execution path is not important, but
testing the goal is the primary objective.
• Random approach – The random approach generates test cases based on assumptions of errors
and system faults.
• Specification-based technique – This model generates test cases based on the formal
requirement specifications.
• Source-code-based technique – The source-code-based case generation approach follows a
control flow path to be tested, and the test cases are generated accordingly. It tests the
execution paths.
• Sketch-diagram-based approach – This type of case generation approach follows the Unified
Modeling Language (UML) diagram to formulate the test cases.
Different Types of Test Cases
Test cases can measure many different aspects of code. The steps involved may also be intended
to induce a Fail result as opposed to a positive expected result such as when a user inputs the
wrong password on a login screen.
How to Write Software Test Cases
Writing test cases varies depending on what the test case is measuring or testing. This is also a situation where sharing test assets across
dev and test teams can accelerate software testing. But it all starts with knowing how to write a test case effectively and efficiently.
Test cases have a few integral parts that should always be present in fields. However, every test case can be broken down into 8 basic
steps.
Step 1: Test Case ID
Test cases should all bear unique IDs to represent them. In most cases, following a convention for this naming ID helps with organization,
clarity, and understanding.
Step 2: Test Description
This description should detail what unit, feature, or function is being tested or what is being verified.
Step 3: Assumptions and Pre-Conditions
This entails any conditions to be met before test case execution. One example would be requiring a valid Outlook account for a login.
Step 4: Test Data
This relates to the variables and their values in the test case. In the example of an email login, it would be the username and password for
the account.
Continue…
Step 5: Steps to be Executed
These should be easily repeatable steps as executed from the end user’s perspective. For instance, a test case for logging into an email server might include these steps:
Open email server web page.
Enter username.
Enter password.
Click “Enter” or “Login” button.
Step 6: Expected Result
This indicates the result expected after the test case step execution. Upon entering the right login information, the expected result would be a successful login.
Step 7: Actual Result and Post-Conditions
As compared to the expected result, we can determine the status of the test case. In the case of the email login, the user would either be successfully logged in or not. The
post-condition is what happens as a result of the step execution such as being redirected to the email inbox.
Step 8: Pass/Fail
Determining the pass/fail status depends on how the expected result and the actual result compare to each other.
Same result = Pass
Different results = Fail
What Are the Best Practices for Writing
Quality Test Cases
How to write effective tests and test cases can be streamlined over time. Some best
practices include using strong titles, strong descriptions, and keeping the language concise and clear.
But you’ll also want to include preconditions, assumptions, and the expected results, too. All of this
information is relevant for the software tester — especially when determining whether the test case
should be a “pass” or a “fail” instead.
A cheat sheet for creating test cases that work well is as follows:
Keep things simple and transparent.
Make test cases reusable.
Keep test case IDs unique.
Peer review is important.
Test cases should have the end user or defined requirements in mind.
Specify expected results and assumptions.
What Is a Test Suite
A test suite comes into play for test cases as it relates to source code, the collection of
dependencies, or the suite of tests to be performed on code. Test suites allow you to categorize
test cases in ways that align with any analysis or planning needs.
This means that core software features might have their own test suite while another test suite
is for a specific testing type such as smoke or security.
What Is a Test Plan
In contrast, a test plan is more like the umbrella that stands over all of the test suites. If test
cases are books and test suites are bookshelves, then test plans are the room that contains the
bookshelf.
Generally, test plans are set up in terms of manual tests, automated tests, and a general format
of how to go about testing.
Example of Test Case
Thank You

More Related Content

What's hot

ISTQB Foundation - Chapter 2
ISTQB Foundation - Chapter 2ISTQB Foundation - Chapter 2
ISTQB Foundation - Chapter 2Chandukar
 
Agile test-management-test-rail-lastest
Agile test-management-test-rail-lastestAgile test-management-test-rail-lastest
Agile test-management-test-rail-lastestOnur Baskirt
 
Automatisation des tests - objectifs et concepts - partie 1
Automatisation des tests  - objectifs et concepts - partie 1Automatisation des tests  - objectifs et concepts - partie 1
Automatisation des tests - objectifs et concepts - partie 1Christophe Rochefolle
 
Test Automation Trends and Beyond
Test Automation Trends and BeyondTest Automation Trends and Beyond
Test Automation Trends and BeyondKnoldus Inc.
 
How To Write A Test Case In Software Testing | Edureka
How To Write A Test Case In Software Testing | EdurekaHow To Write A Test Case In Software Testing | Edureka
How To Write A Test Case In Software Testing | EdurekaEdureka!
 
E commerce Testing
E commerce TestingE commerce Testing
E commerce TestingAtul Pant
 
Test Cases Maintaining & Documenting
Test Cases Maintaining & DocumentingTest Cases Maintaining & Documenting
Test Cases Maintaining & DocumentingSeyed Ali Marjaie
 
Types of software testing
Types of software testingTypes of software testing
Types of software testingTestbytes
 
Testing strategy for agile projects updated
Testing strategy for agile projects updatedTesting strategy for agile projects updated
Testing strategy for agile projects updatedTharinda Liyanage
 
Regression Testing - An Overview
Regression Testing - An OverviewRegression Testing - An Overview
Regression Testing - An OverviewBugRaptors
 

What's hot (20)

ISTQB Foundation - Chapter 2
ISTQB Foundation - Chapter 2ISTQB Foundation - Chapter 2
ISTQB Foundation - Chapter 2
 
Software testing
Software testingSoftware testing
Software testing
 
ISTQB foundation level - day 2
ISTQB foundation level - day 2ISTQB foundation level - day 2
ISTQB foundation level - day 2
 
Agile test-management-test-rail-lastest
Agile test-management-test-rail-lastestAgile test-management-test-rail-lastest
Agile test-management-test-rail-lastest
 
Automatisation des tests - objectifs et concepts - partie 1
Automatisation des tests  - objectifs et concepts - partie 1Automatisation des tests  - objectifs et concepts - partie 1
Automatisation des tests - objectifs et concepts - partie 1
 
Test Automation Trends and Beyond
Test Automation Trends and BeyondTest Automation Trends and Beyond
Test Automation Trends and Beyond
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
How To Write A Test Case In Software Testing | Edureka
How To Write A Test Case In Software Testing | EdurekaHow To Write A Test Case In Software Testing | Edureka
How To Write A Test Case In Software Testing | Edureka
 
E commerce Testing
E commerce TestingE commerce Testing
E commerce Testing
 
Test Cases Maintaining & Documenting
Test Cases Maintaining & DocumentingTest Cases Maintaining & Documenting
Test Cases Maintaining & Documenting
 
Types of software testing
Types of software testingTypes of software testing
Types of software testing
 
Testing methodology
Testing methodologyTesting methodology
Testing methodology
 
Test automation process
Test automation processTest automation process
Test automation process
 
Istqb chapter 5
Istqb chapter 5Istqb chapter 5
Istqb chapter 5
 
Testing strategy for agile projects updated
Testing strategy for agile projects updatedTesting strategy for agile projects updated
Testing strategy for agile projects updated
 
Regression Testing - An Overview
Regression Testing - An OverviewRegression Testing - An Overview
Regression Testing - An Overview
 
Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Ganesh Manjunath Resume
Ganesh Manjunath ResumeGanesh Manjunath Resume
Ganesh Manjunath Resume
 

Similar to Generating SQL Test Cases

Testcase training
Testcase trainingTestcase training
Testcase trainingmedsherb
 
Object Oriented Testing
Object Oriented TestingObject Oriented Testing
Object Oriented TestingAMITJain879
 
Testing Software Solutions
Testing Software SolutionsTesting Software Solutions
Testing Software Solutionsgavhays
 
Chapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.pptChapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.pptVijayaPratapReddyM
 
Software testing & Quality Assurance
Software testing & Quality Assurance Software testing & Quality Assurance
Software testing & Quality Assurance Webtech Learning
 
www.tutorialsbook.com presents Manual testing
www.tutorialsbook.com presents Manual testingwww.tutorialsbook.com presents Manual testing
www.tutorialsbook.com presents Manual testingTutorials Book
 
Whitepaper Test Case Design and Testing Techniques- Factors to Consider
Whitepaper Test Case Design and Testing Techniques- Factors to ConsiderWhitepaper Test Case Design and Testing Techniques- Factors to Consider
Whitepaper Test Case Design and Testing Techniques- Factors to ConsiderRapidValue
 
Fundamental test process hazahara
Fundamental test process hazaharaFundamental test process hazahara
Fundamental test process hazaharaHazahara shadah
 
MIT521 software testing (2012) v2
MIT521   software testing  (2012) v2MIT521   software testing  (2012) v2
MIT521 software testing (2012) v2Yudep Apoi
 
Best practices for test case creation & maintenance
Best practices for test case creation & maintenanceBest practices for test case creation & maintenance
Best practices for test case creation & maintenance99tests
 
1 testing fundamentals
1 testing fundamentals1 testing fundamentals
1 testing fundamentalsAsmaa Matar
 
Less01 1 introduction_module
Less01 1 introduction_moduleLess01 1 introduction_module
Less01 1 introduction_moduleSuresh Mishra
 
Best Practices for Test Case Writing
Best Practices for Test Case WritingBest Practices for Test Case Writing
Best Practices for Test Case WritingSarah Goldberg
 
Strategies For Software Test Documentation
Strategies For Software Test Documentation Strategies For Software Test Documentation
Strategies For Software Test Documentation Vishwak Solution
 
Software testing
Software testingSoftware testing
Software testingSengu Msc
 
Software testing
Software testingSoftware testing
Software testingSengu Msc
 

Similar to Generating SQL Test Cases (20)

Testcase training
Testcase trainingTestcase training
Testcase training
 
Object Oriented Testing
Object Oriented TestingObject Oriented Testing
Object Oriented Testing
 
software testing
software testingsoftware testing
software testing
 
Test case writing
Test case writingTest case writing
Test case writing
 
Testing Software Solutions
Testing Software SolutionsTesting Software Solutions
Testing Software Solutions
 
Chapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.pptChapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.ppt
 
Software testing & Quality Assurance
Software testing & Quality Assurance Software testing & Quality Assurance
Software testing & Quality Assurance
 
Testing
TestingTesting
Testing
 
www.tutorialsbook.com presents Manual testing
www.tutorialsbook.com presents Manual testingwww.tutorialsbook.com presents Manual testing
www.tutorialsbook.com presents Manual testing
 
Whitepaper Test Case Design and Testing Techniques- Factors to Consider
Whitepaper Test Case Design and Testing Techniques- Factors to ConsiderWhitepaper Test Case Design and Testing Techniques- Factors to Consider
Whitepaper Test Case Design and Testing Techniques- Factors to Consider
 
Fundamental test process hazahara
Fundamental test process hazaharaFundamental test process hazahara
Fundamental test process hazahara
 
MIT521 software testing (2012) v2
MIT521   software testing  (2012) v2MIT521   software testing  (2012) v2
MIT521 software testing (2012) v2
 
Best practices for test case creation & maintenance
Best practices for test case creation & maintenanceBest practices for test case creation & maintenance
Best practices for test case creation & maintenance
 
1 testing fundamentals
1 testing fundamentals1 testing fundamentals
1 testing fundamentals
 
Less01 1 introduction_module
Less01 1 introduction_moduleLess01 1 introduction_module
Less01 1 introduction_module
 
Best Practices for Test Case Writing
Best Practices for Test Case WritingBest Practices for Test Case Writing
Best Practices for Test Case Writing
 
Strategies For Software Test Documentation
Strategies For Software Test Documentation Strategies For Software Test Documentation
Strategies For Software Test Documentation
 
Software testing
Software testingSoftware testing
Software testing
 
Software testing
Software testingSoftware testing
Software testing
 
L software testing
L   software testingL   software testing
L software testing
 

More from VivekRajawat9

5g Cellular Wireless Network.pptx
5g Cellular Wireless Network.pptx5g Cellular Wireless Network.pptx
5g Cellular Wireless Network.pptxVivekRajawat9
 
World Series Problem
World Series ProblemWorld Series Problem
World Series ProblemVivekRajawat9
 
Electronic mail protocols and operations
 Electronic mail protocols and operations Electronic mail protocols and operations
Electronic mail protocols and operationsVivekRajawat9
 
Architecture Security in VANET
Architecture Security in VANET Architecture Security in VANET
Architecture Security in VANET VivekRajawat9
 

More from VivekRajawat9 (7)

Communication
CommunicationCommunication
Communication
 
5g Cellular Wireless Network.pptx
5g Cellular Wireless Network.pptx5g Cellular Wireless Network.pptx
5g Cellular Wireless Network.pptx
 
World Series Problem
World Series ProblemWorld Series Problem
World Series Problem
 
Electronic mail protocols and operations
 Electronic mail protocols and operations Electronic mail protocols and operations
Electronic mail protocols and operations
 
Architecture Security in VANET
Architecture Security in VANET Architecture Security in VANET
Architecture Security in VANET
 
Routing Protocols
Routing ProtocolsRouting Protocols
Routing Protocols
 
DEEPANSHU_PPT.pptx
DEEPANSHU_PPT.pptxDEEPANSHU_PPT.pptx
DEEPANSHU_PPT.pptx
 

Recently uploaded

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 

Recently uploaded (20)

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 

Generating SQL Test Cases

  • 1. Generating Test Cases Abhinav Kumar Singh MCA/25018/21
  • 2. What is Test Case Generation Test case generation is the process of writing SQL test cases for verifying and testing database functionalities. Relational databases are queried by SQL statements, so the test cases are also generated in SQL. Test cases are designed based of the functionalities of an application. So it varies from one application to another. The purpose of test case generation is to check the output against expected results. Based on the results, either the test case is modified or kept as it is.
  • 3. Explanation The aim of testing is to find bugs in a system or application. Test case generation is the process of building test suites for detecting system errors. A test suite is a group of relevant test cases bundled together. Test case generation is the most important and fundamental process of software testing.
  • 4. Multiple techniques available for generating test cases • Goal-oriented approach – The purpose of the goal-oriented test case generation approach is to cover a particular section, statement or function. Here the execution path is not important, but testing the goal is the primary objective. • Random approach – The random approach generates test cases based on assumptions of errors and system faults. • Specification-based technique – This model generates test cases based on the formal requirement specifications. • Source-code-based technique – The source-code-based case generation approach follows a control flow path to be tested, and the test cases are generated accordingly. It tests the execution paths. • Sketch-diagram-based approach – This type of case generation approach follows the Unified Modeling Language (UML) diagram to formulate the test cases.
  • 5. Different Types of Test Cases Test cases can measure many different aspects of code. The steps involved may also be intended to induce a Fail result as opposed to a positive expected result such as when a user inputs the wrong password on a login screen.
  • 6. How to Write Software Test Cases Writing test cases varies depending on what the test case is measuring or testing. This is also a situation where sharing test assets across dev and test teams can accelerate software testing. But it all starts with knowing how to write a test case effectively and efficiently. Test cases have a few integral parts that should always be present in fields. However, every test case can be broken down into 8 basic steps. Step 1: Test Case ID Test cases should all bear unique IDs to represent them. In most cases, following a convention for this naming ID helps with organization, clarity, and understanding. Step 2: Test Description This description should detail what unit, feature, or function is being tested or what is being verified. Step 3: Assumptions and Pre-Conditions This entails any conditions to be met before test case execution. One example would be requiring a valid Outlook account for a login. Step 4: Test Data This relates to the variables and their values in the test case. In the example of an email login, it would be the username and password for the account.
  • 7. Continue… Step 5: Steps to be Executed These should be easily repeatable steps as executed from the end user’s perspective. For instance, a test case for logging into an email server might include these steps: Open email server web page. Enter username. Enter password. Click “Enter” or “Login” button. Step 6: Expected Result This indicates the result expected after the test case step execution. Upon entering the right login information, the expected result would be a successful login. Step 7: Actual Result and Post-Conditions As compared to the expected result, we can determine the status of the test case. In the case of the email login, the user would either be successfully logged in or not. The post-condition is what happens as a result of the step execution such as being redirected to the email inbox. Step 8: Pass/Fail Determining the pass/fail status depends on how the expected result and the actual result compare to each other. Same result = Pass Different results = Fail
  • 8. What Are the Best Practices for Writing Quality Test Cases How to write effective tests and test cases can be streamlined over time. Some best practices include using strong titles, strong descriptions, and keeping the language concise and clear. But you’ll also want to include preconditions, assumptions, and the expected results, too. All of this information is relevant for the software tester — especially when determining whether the test case should be a “pass” or a “fail” instead. A cheat sheet for creating test cases that work well is as follows: Keep things simple and transparent. Make test cases reusable. Keep test case IDs unique. Peer review is important. Test cases should have the end user or defined requirements in mind. Specify expected results and assumptions.
  • 9.
  • 10. What Is a Test Suite A test suite comes into play for test cases as it relates to source code, the collection of dependencies, or the suite of tests to be performed on code. Test suites allow you to categorize test cases in ways that align with any analysis or planning needs. This means that core software features might have their own test suite while another test suite is for a specific testing type such as smoke or security.
  • 11. What Is a Test Plan In contrast, a test plan is more like the umbrella that stands over all of the test suites. If test cases are books and test suites are bookshelves, then test plans are the room that contains the bookshelf. Generally, test plans are set up in terms of manual tests, automated tests, and a general format of how to go about testing.