You are on page 1of 32

Software Testing Foundation

Test Techniques and Test Case

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 1


Lesson Objectives

 Be introduced Experience-base Testing and its techniques


 Know how to write test case
 Have chance to discuss with experience testers

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 2


AGENDA

• Experience-based Testing

• Test Case

• Test Case Elements

• Test Case Structure

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 3


Section 1
EXPERIENCE-BASED TESTING

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 4


Experience-based Testing

is where tests are derived from the tester's skill, intuition and
their experience with similar applications and technologies.

is usually used when there is no specification, or if the


specification is inadequate or out of date

can be useful in identifying special tests not easily captured by


formal techniques but it may yield widely varying degrees of
effectiveness, depending on the testers' experience

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 5


Experience-based Testing Types/Techniques

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 6


Error Guessing

is a technique used to anticipate the


occurrence of errors, defects, and failures,
based on the tester’s knowledge, including:
 How the application has worked in the
past.
 What types of mistakes the developers
tend to make
 Failures that have occurred in other
applications

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 7


Error Guessing

A structured way of error guessing is called "fault


attack"
 The tester enumerate through a list of possible
errors, faults, failures and design tests that will
expose those failures, faults that caused them.

 The list can be built over time based on tester


experience, defect and failure data, or from
common knowledge about why software fails
6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 8
Exploratory Testing

is an approach to software testing


that is concisely described as
simultaneous learning, test design and
test execution

is most useful when there are few or


inadequate specifications or significant
time pressure on testing
6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 9
Checklist-based Testing

Testers design, implement, and


execute tests to cover test conditions
found in a checklist

Checklists can be created to support


various test types, including functional
and non-functional testing

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 10


Section 2
TEST CASE

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 11


Test Case – What?

A set of input values, execution preconditions, expected


results and execution post conditions, developed for a
particular objective or test condition, such as to exercise a
particular program path or to verify compliance with a
specific requirement

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 12


Test Case – Category

o High level test case/logical test case/abstract test case: A test case
without concrete (implementation level) values for input data and
expected results. Logical operators are used; instances of the actual
values are not yet defined and/or available.
o Low level test case/concrete test case: A test case with concrete
(implementation level) values for input data and expected results.
Logical operators from high level test cases are replaced by actual
values that correspond to the objectives of the logical operators.

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 13


Test Case – Inputs/Test Basic

o Software requirement specification

o Detailed design

o Prototype (if have)

o Test Plan

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 14


Section 3
TEST CASE ELEMENTS

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 15


Test Case Elements

Mandatory: Consider:
• Test case ID • Test condition /
• Test case Title Req_ID/ UC Name
• Test Case Description • Pre-condition/Inter-
• Expected Output test case Dependence
• Status • Test data
• Actual Output
• Priority
• …
6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 16
Test Case ID

o Unique number to identify test case.


o It should be ID to:
 Easy to say it belong to which module, which use case or function
 Easy to add new test case into one function and don’t change ID of
other
 Should not replaced by deleted one
o Example
 USER_MGT_Create_01
 USER_MGT_Create_02
 …
 USER_MGT_Delete_01
 …
 USER_MGT_Login_01

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 17


Test Case Title/Summary
o Short sentence about the aspect of the system is being tested. If
this gets too long, break the test case up or put more
information into the feature descriptions.
o Example
 Add user successfully by System Administrator
Or
 Can not add user with special characters in Username
Or
 Can not add duplicated username
Or
 Can not add user without email

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 18


Test Case Description / Steps/Procedure
o A set of steps/actions need to be run to complete a test case

o Example
1. On User list screen, click on [+] button
2. Input username that not existed: test
3. Input Full name, email: test, testinsight@fsoft.com.vn
4. Use other values by default and click on [Save] button

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 19


Test Case Expected Output
o A set of outputs/results after run

o Example
1. Create User screen is displayed
4. “test” is displayed in User list with order of username, number
of list increase one

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 20


Test Case Status
o Status of test case execution. It can be
 Passed/OK: Actual result is meet requirement (expected result)
 Failed/NOK/NG: Actual result isn’t meet requirement (expected result)
 Blocked: Can not executed because pre-requisites was failed
 NA/Skipped: Not applicable, out of scope testing
 Not Tested: Has not executed

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 21


Test Case Other consider Elements
o Test condition: function name or use case id that be tested
o Pre-condition / Pre-requisite: A set of actions need to be done before run a
case (Assumptions that must be met before the test case can be run. E.g.,
"logged in", "guest login allowed", "user testuser exists”)
o Inter-test case Dependence: One or more test cases what is input for others.
If they are blocked, we can not run next cases
o Test data: List of variables and their possible values used in the test case.
You can list specific values or describe value ranges. The test case should be
performed once for each combination of values. These values are written in set
notation, one per line. E.g.: loginID = {Valid loginID, invalid loginID, valid email,
invalid email, empty} ; password = {valid, invalid, empty}
o Actual Output: the actual output when run the test case

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 22


Tips for good Test case
A good test case has certain characteristics which are:
1. Should be accurate and tests what it is intended to test.
2. Test step and expected result is a step by step process
3. No unnecessary steps should be included in it.
4. It should be reusable, maintainable.
5. It should be traceable to requirements.
6. It should be simple and clear, any tester should
be able to understand it by reading once.
6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 23
Section 4
TEST CASE STRUCTURE

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 24


Test Case Structure

Test cases for a function/UC includes:


o User interface test cases: verify screen layout
o Role & Permission test cases
o Functional test cases: verify business rules
o Field validation test cases: validation for difference kind of data
o Work with other UCs test cases
o Workflow / 3th service test cases

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 25


User Interface Test Cases

o Based on screen design/ prototype


o Test User interface
 Interface: size, position, menu, look and feel, field alignment
 Objects: buttons, checkbox, text box, list box, links, combo box
 Object/control type
 Editable
 Mandatory
 Default value
 Hide/Un-hide
 Broken links
 Access methods: tab keys, mouse movements, accelerator key, tool
tip
6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 26
Role & Permission Test Cases

o Based on permission map/security map (security matrix) of a


product
o Design test cases to ensure:
 Each role with specific privileges are tested
 Each role with no specific privileges are tested
 User with combine roles are tested

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 27


Functional Test Cases

o Test cases with valid data/Main flow


o Test cases for defined business rules in SRS/Alternative flows
Using black box test techniques to design functional test cases

Test techniques can be:


 Equivalent Partition
 Boundary Value Analysis
 Decision Table
 State Transition

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 28


Field Validation Test Cases
o Combo box fields
o Text Fields
 Single line of text
 Multi line of text
o Date Fields
o Numeric Fields
o Attach Fields
o ….
6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 29
References
 https://www.istqb.org/ , Foundations of Software Testing,
Chapter 4

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 30


Lesson Summary

• Session 1: Experience-based Testing

• Session 2: Test Case

• Session 3: Test Case Elements

• Session 4: Test Case Structure

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 31


Thank you

6/18/2023 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 32

You might also like