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

Perform Database System Test1

Uploaded by

davalem108
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Perform Database System Test1

Uploaded by

davalem108
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 54

Prepared BY :Welela kumsa

1
Testing

 Testing is the process of finding differences between the


expected behavior specified by system models and the observed
behavior of the system. It is the process of analyzing a system
or system component to detect the differences between
specified (required) and observed (existing) behavior
 We define testing as the systematic attempt to find errors in a
planned way in the implemented software. Contrast this
definition with another commonly used definition that says that
“testing is the process of demonstrating that errors are not
present.”

Prepared BY :Welela kumsa


Database testing
 Database testing is perhaps the most important test that
can check the overall functionality of the software.

3 Prepared BY :Welela kumsa


What are Data and Database?

 “Data” is the term that signifies the facts, statistics, and


information that software processes, manages, and stores. In
general, data includes different elements like records, tables,
columns, indexes, and others. In terms of software application
development, data are the user inputs, files and documents,
configuration data, etc.

4 Prepared BY :Welela kumsa


Data is divided into two major types :

 Unstructured data: These data do not have any defined


format and are generally non-organized. For example,
unstructured data is stored in files or documents, such as text
documents, images, audio files, videos, and more. They are
mainly common in software applications associated with text
processing, user-generated content, and others.
 Structured data: These are the information that are organized
and have a defined format and structure. For example, they are
stored in a database with labeled tables and fields. They are
fields like names, addresses, details on financial transactions,
etc. It is commonly used in Relational Database Management
Systems (RDBMS) like MySQL, PostgreSQL, and Oracle.
5 Prepared BY :Welela kumsa
Cont.…
 The database is a collection of the above mentioned data, which
are organized and stored for easy access with the system. In other
words, it is an organized collection of data that helps in data
manipulation. It is easy to manage and retrieve data from the
database by the users as they are organized into tables, rows,
indexes, and columns. This, in turn, helps the users to quickly
identify the required information on software applications and their
features. Notable examples of databases are MySQL, Oracle, ,and
FileMaker.
 Databases serve as robust tools for data storage, using tables for
data retention, functions and triggers for data manipulation, and
views for data presentation. Now that you have understood data
and databases, you will better comprehend the database testing
concepts in the below section.
6 Prepared BY :Welela kumsa
Cont.…
 It evaluates aspects like schema, tables, or triggers and
tests the data integrity and consistency. To address this,
testers create complex queries to perform load or stress
tests for the database. In turn, it helps test the system's
functionality and ensure responsiveness to scenarios like
hardware failure, security incidents, software updates, etc.

7 Prepared BY :Welela kumsa


What is Database Testing?
 Database Management System allows for effective
organization, retrieving, and storing of the data, but there
are cases where data gets duplicated or unnecessarily
added. Testers need to validate the stored data, and for this
database testing is performed. It is an approach that
checks the database and ensures it functions accurately.

8 Prepared BY :Welela kumsa


Some of the common tests that are done during
database testing are:

 Data validity checks


 Data integrity test
 Test for process
 Triggers and database functions
 Performance checks

9 Prepared BY :Welela kumsa


Here are some key points on database testing:

 It involves a layered approach encompassing data access, User


Interface (UI), the business, and database layers.
 The test is performed in a controlled testing environment.
 Also referred to as back-end testing and data testing.
 The process involves subjecting the database to various
stressors, which may entail running intricate queries to
comprehensively evaluate its functionality and responsiveness.
 It involves testing Database Management Systems (DBMS)
like Oracle and SQL Server.
 Examples of the tests performed during database testing
encompass assessments for data validity, data integrity,
procedures, triggers, performance, and databasePrepared
10
functions.
BY :Welela kumsa
Why is Database Testing Important?

 A fully functional database is essential for the adequate


performance of software applications. It uses the database
to store and create data corresponding to its features and
respond to the queries. However, if the data integrity is
impacted, it can cause monetary loss to the organization.
This is because data integrity leads to errors in decision-
making, operational inefficiencies, regulatory violations,
and security breaches. Thus, it is imperative to perform
database testing to handle and manage data in the database
effectively.

11 Prepared BY :Welela kumsa


Cont.…
 Database testing simplifies backend interactions and
prevents harmful or erroneous data within the
application's backend systems. While it cannot eliminate
all data breaches or integrity compromises, database
testing can help eliminate the most critical impact
associated with software application failures.

12 Prepared BY :Welela kumsa


Here are some important aspects that database testing considers:
 Data mapping: It verifies the accurate mapping of the
field or information in the user interface or front-end
forms as per the corresponding fields in the database table.
 Data accuracy: It is performed to ensure that data stored
in the database is correct and better adapted to the data
type, business rule, and others.
 Data security: Data stored in the database has to be
checked for any security-related error. Database testing is
executed to assess the security measures applied to protect
sensitive data. It also verifies any vulnerabilities like SQL
injection and data leakage.

13 Prepared BY :Welela kumsa


Cont.…
 Validate business rules accuracy: Complex databases often
involve intricate components such as relational constraints,
triggers, and stored procedures. To address these complexities,
testers employ appropriate SQL queries to validate
 the accuracy of these complex database objects, ensuring that
they adhere to the defined business rules.
 Seamless data migration: Database testing is required to
ensure the accuracy of data transfer from one database system
to another system or from one version to another.
 Data transformation: Database testing is important in the data
warehousing and ETL (Extract, Transform, Load) process. It is
performed to check data transformation rules and data
integration across different systems.
14 Prepared BY :Welela kumsa
Advantages of Database Testing

 Database testing, being a crucial approach to ensure the


reliability of data of the software application, holds
several advantages. For better allocation of testing
resources, planning tests, and ensuring complete
test coverage, knowing the advantages of database testing
is essential.
 Here are some advantages of database testing:
 Database testing permits the detection of any error or issue
during the initial phases of the development of software
applications, which could potentially lead to unnecessary
expenses if addressed later in the development process.

15 Prepared BY :Welela kumsa


Cont.…
 It enhances test coverage within the system or software
application.
 It safeguards user data by inspecting the test scenarios that avert
unauthorized entry and data leakage, among other security
issues.
 It ensures both software quality and security.
 It simplifies the intricacies of the database backend, enabling
developers to utilize views and stored procedures more
extensively.
 It strengthens data durability by regularly validating data
integrity and uniformity.
 It aids in averting issues such as deadlocks, data deterioration,
and data breaches.
16
Disadvantages of Database Testing

 Database testing also has some disadvantages, like other


testing types. Understanding this will allow testers to
identify any risks, issues, and challenges associated with
database testing, thus helping them to have more targeted
efforts by addressing those.
 Here are some important disadvantages of database
testing:
 Manual testing can be highly intricate, especially when
dealing with factors like expanding data volumes, multiple
relational databases, and data intricacies, making testing
challenging.

17 Prepared BY :Welela kumsa


Cont.…
 The use of automation tools may escalate project costs.
 Testers must possess a profound understanding of the
database and the application's functionality and
requirements related to data.
 Continuous updates to the test plan are necessary to
accommodate database changes.
 Identifying critical testing areas within large databases can
pose a significant challenge.

18 Prepared BY :Welela kumsa


Database Testing Activities

 Database testing includes two main activities that


highlight its need for testing purposes. Those are
 To make sure that each transaction adheres to the
properties of ACID (Atomicity, Consistency, Isolation,
and Durability).
 To ensure data integrity.

19
ACID Properties

 Database Management System needs to enforce ACID


properties to be appropriately designed and managed. To this,
database testing is crucial to verify that the Database
Management System correctly applies the ACID properties
for transactions. Those properties are as follows:

20 Prepared BY :Welela kumsa


Atomicity:
 The terminology “atomicity” in transactions refers to
atomic data. It signifies that in case any operation is
performed on the data, like inserting a new record,
updating an existing record, or other, it has to be
performed entirely or shall not be implemented. All the
actions that could change the data within the transaction
should be regarded as a single unit and should not be
partially executed. Testing the database ensures that the
database is in a consistent state, and in case any operation
in the transaction fails, the data is returned and assures
that the data is not in an incomplete state.

21 Prepared BY :Welela kumsa


Consistency:
 When the transaction is completed within the database,
the data has to be correct, consistent, and intact. For
example, if a transaction is supposed to transfer an amount
between two accounts, it should do so accurately, ensuring
that the balance of each account remains consistent with
the actual transfer.

22 Prepared BY :Welela kumsa


Isolation:
 The term “isolation” is meant to be separation. In
concurrent multiple transactions within the database, the
data are independent and separated. In other words, the
transactions can run together, and this does not interfere
with each other; the database remains consistent.

23 Prepared BY :Welela kumsa


Durability:
 The concepts of durability signify the long-term
permanence and reliability of modified data. This implies
that once the transaction is committed, it will retain the
changes done to the database without any failure and
impact of external factors like system crashes, power
outages, and others.

24 Prepared BY :Welela kumsa


Cont.…

25 Prepared BY :Welela kumsa


Data Integrity

 Data integrity is the method that ensures and verifies that


all the most recent data is consistently updated across all
locations. It relies on four distinct components to validate
data integrity.
 To achieve a superior level of data integrity, a tester must
ascertain that:

26 Prepared BY :Welela kumsa


Cont.…
 The data is verifiable.
 The data is accessible.
 The data is accurate.
 The data is complete.

27 Prepared BY :Welela kumsa


Cont.…
 If the data fails to satisfy the above four criteria, it falls
short of the integrity standard. While data management
tools can assist, the ultimate responsibility for upholding
the highest data quality rests with QAs.

28 Prepared BY :Welela kumsa


The aim of validating data integrity is to:

 Ensure all triggers are well positioned for updating


reference table records.
 Check the existence of any incorrect or invalid data in the
table.
 Insert incorrect data in the table and test if a failure
outcome occurs.
 Check sync of replicated servers and databases.

29 Prepared BY :Welela kumsa


CRUD

 The primary set of test cases is for CRUD operations,


which stands for Create, Read, Update, and Delete,
performed by the software application.
 C: When a user clicks 'Save' for a new transaction, the
'Create' operation is executed.
 R: When a user chooses to 'Search' or 'View' a saved
transaction, the 'Retrieve' operation is carried out.
 U: When a user opts to 'Edit' or 'Modify' an existing
record, the database performs the 'Update' operation.
 D: When a user selects to 'Remove' any record from the
system, the database executes the 'Delete' operation.

30 Prepared BY :Welela kumsa


Determine Software life cycle is based on work principles.

 The software life cycle is a general model of the software


development process, including all the activities and work
process required to develop a software system.
 Software life cycle describe phases of the software cycle
and the order in which those phases are executed.
 Each phase produces deliverables required by the next
phase in the life cycle.

31 Prepared BY :Welela kumsa


There are six phases in every Software development life cycle
model:

Requirement gathering a
 analysis
 Design
 Implementation or coding
 Testing
 Deployment
 Maintenance

32 Prepared BY :Welela kumsa


1) Requirement gathering and analysis:
 Business requirements are gathered in this phase.
 The general questions that need answer during a requirements gathering
phase include:
 Who is going to use the system?
 How will they use the system?
 What data should be input into the system?
 What data should be output by the system?

33
Cont.…
 After requirements are gathered and analyzed for their validity,
requirements Specification document is created which serves the
purpose of guideline for the next phase of the model.
 the existing system provides a good guide as to what is required of a
new system
 What is to be done in order to satisfy the requirements of a new system?
 feasibility study and cost analysis also examined
 detailed models of what the existing system does (if there is one)
 Models of what the new system will do.
 list of requirements for the new system--a requirements specification

34
2) Design:
 In this phase, the system and software design is prepared from the requirement
specifications documents which were studied in the first phase. System Design helps
in specifying hardware and overall system architecture.
 At this stage, the models from analysis are amended to incorporate any new
requirements (for the new system) and any inefficiencies or mention of physical
aspects are removed. Systems Design shows how the new system will be
implemented (i.e. a design for the new system is produced).
 Write specifications of new programs or amendments to existing ones in terms of
 what they must do and
 What languages they should be written in.
 Specify a database structure
 what data should it contain
 What queries will be made of it.

35 Prepared BY :Welela kumsa


3) Implementation/Coding:
 On receiving system design documents, the work is divided in modules/units and
actual coding is started. This is the longest phase of the software development life
cycle.
 individual system components are built
 programs are written
 The database is created etc.
 System components are tested individually and then linked and tested
 The user interface, i.e. the screens which link the user with the system are developed

36 Prepared BY :Welela kumsa


4) Testing:
 After the code is developed, it is tested against the requirements to make sure that
the product is actually solving the needs addressed and gathered during the
requirements phase.
 During this phase unit testing, integration testing, system testing, acceptance testing
are done.

37 Prepared BY :Welela kumsa


5) Deployment:
 After successful testing, the product is delivered/deployed to the customer for their
use and focuses on the allocation of components for customers for use. Deployment
shows the hardware for the system, the software that is installed on the hardware.

38 Prepared BY :Welela kumsa


 Prepare Test Plane based on Client Requirement

 Client requirement can be any need or expectation for a system or for its software.
Requirements reflect the stated or implied needs of the customer, and may be
market-based, contractual, or statutory, as well as an organization's internal
requirements. There can be many different kinds of requirements (e.g., design,
functional, implementation, interface, performance, or physical requirements).
 Developers can reduce the cost of testing and the elapsed time necessary for its
completion through careful planning. A test plan is a document detailing a
systematic approach to testing a system such as a machine or software based on
Client Requirement.

39 Prepared BY :Welela kumsa


6) Maintenance:
 Once when the customers starts using the developed system, then the actual
problems comes up and needs to be solved from time to time. Involves correcting
faults which are not detected during testing. This is the most expensive part of the
life cycle and, in order to minimize costs, every effort should be made during earlier
stages to get the requirements right first time and to trap as many errors during
testing as is possible

40
Cont.…
 A test plan can be defined as a document describing the scope, approach, resources,
and schedule of intended testing activities. It identifies test items, the features to be
tested, the testing tasks, who will do each task, and any risks requiring contingency
planning. Two key elements are to start the selection of test cases early Developing
tests early enables the execution of tests to start as soon as components become
available and to parallelize tests all component tests can be conducted in parallel.
Test Plan is defined as a strategic document which describes the procedure how to
perform various testing on the total application in the most efficient way.

41 Prepared BY :Welela kumsa


 THANK YOU!

42 Prepared BY :Welela kumsa


LO2. Conduct test

 2.1 Running Test scripts and document results in line with


test and acceptance processes

43 Prepared BY :Welela kumsa


What is a Test Script?

 Test Scripts are a line-by-line description containing the information about


the system transactions that should be performed to validate the application
or system under test. Test script should list out each step that should be
taken with the expected results.
 This automation script helps software tester to test each level on a wide
range of devices systematically. The test script must contain the actual
entries to be executed, and the expected results.

44
Cont.…
 This automation script helps software tester to test each level on a wide
range of devices systematically. The test script must contain the actual
entries to be executed, and the expected results.

45
Example of a Test script

 For example, to check the login function on a website, your test script might do
the following:
 Specify how the automation tool can locate the “Username” and “Password”
fields in the login screen. Let us say, by their CSS element IDs.
 Load the website homepage, then click on the “login” link. Verify that the Login
screen that appears and the “Username” and “Password” fields are visible.

46 Prepared BY :Welela kumsa


Cont.…
 Next, type the username “Charles” and password “123456” identify the
“Confirm” button and click it.
 They need to specify how a user can locate the title of the Welcome screen
that appears after login- say, by its CSS element ID.
 Verify that the title of the Welcome screen is visible.
 Read the title of the welcome screen.
 Insert that the title text is “Welcome Charles”.
 If the title text is as per the expectation, a record that the test passed.
Otherwise, an album that the test failed.

Prepared BY :Welela kumsa


Difference Between Test Case And Test Script
:

Here are the main difference between Test Cast and Test Script

Test Case Test Script

Test case is a step by step procedure that is The test script is a set of instructions to test an
used to test an application. application automatically.

Test Cases are used for manual testing Test Script is used in the automation testing
environment. environment.
It is done manually. It is done according to the scripting format.

The test case template includes Test ID, test


In the Test Script, we can use different commands
data, test procedure, actual and expected
to develop a script.
results, etc.
48
Tips for creating a Test Script

 Here are some important tips for creating a test script:


 Clear:
 Your test script should be clear. If the tester need to constantly ask the
project in-charge person to give details about the application. This certainly
wastes time and resources.
 To avoid this , you need to constantly verify that each step in the test script
is clear, concise, and coherent. This helps to keep the testing process
smooth.

49 Prepared BY :Welela kumsa


Cont.…
 Simple:
 You should create a test script that should contain just one specific action
for testers to take.
 This makes sure that each function is tested correctly and that testers do not
miss steps in the software testing process.
 Well-thought-out:
 To write the test script, you need to put yourself in the user’s place to
decide which paths to test. You should be creative enough to predict all the
different paths that users would use while running a system or application.

50 Prepared BY :Welela kumsa


When to use the test script approach?

 Here are the reasons for using the Test Script.


 Using a test script is the most reliable approach to verify that nothing is
skipped and that the results are true as the desire testing plan.
 If the test script is prepared, It leaves a lot less room for error during the
testing process.
 Sometimes, testers are allowed to browse through the product freely. They
can miss certain features.
 Sometime tester also assumes that a function has the expected result when it
does not.
 It is particularly useful when the user performance is important and
specific.

51 Prepared BY :Welela kumsa


What is a Test Script Template?

 Test Script Template is a reusable formatted document that


contains pre-selected information important for creating a
usable test script. This document determines how detailed
your tests are and what information should be included in
each test case.

52
Summary:

 Test Scripts means a line-by-line description containing the information


about the system transactions that should be performed to validate the
application or system under test.
 Test case is a step by step procedure that is used to test an application
whereas the test script is a set of instructions to test an application
automatically.
 Three ways to create test script are 1) Record/playback 2) Keyword/data-
driven scripting, 3) Writing Code Using the Programming Language.
 Your test script should be clear and you should create a test script that
should contain just one specific action for testers to take.
 Using a test script is the most reliable approach to verify that nothing is
skipped and that the results are true as the desire testing plan.
 Test Script Template is a reusable formatted document that contains pre-
selected information important for creating a usable test script.

53
THANK YOU!

54

You might also like