Top Banner
Test Case Test Case
26

Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

Mar 26, 2015

Download

Documents

David Forbes
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

Test CaseTest Case

Page 2: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 2

IntroductionIntroduction

Purpose: Writing Test Case Attendees: Testers Duration: 2 hours

Page 3: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 3

ObjectivesObjectives

After the course, student will be able to:

Understanding the way to create a Test Case

Using Test Case checklist to review a Test Case

Page 4: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 4

AgendaAgenda

Design test case Write test case Test case

checklist

Page 5: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 5

Test CaseTest Case

Test Preparation

•Detail design

•SRS

•Test Plan

•Test case

•Test script

•Test data

Page 6: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 6

ConceptsConcepts

Test Case: A set of test inputs, execution

conditions, and expected results developed for a particular objective, such as to exercise a particular program path or to verify compliance with a specific requirement.

Test Script: scripts that use for testing or check

the output

Test Data: data is using for testing

Page 7: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 7

Why Test Case?Why Test Case?

Design scenario (test conditions) before test execution

Predict expected result Help new testers familiar with existing

application/system without reading requirement

Page 8: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 8

Good Test CaseGood Test Case

Has a high probability of finding errors Clear of purpose Well organized Reviewable Maintainable Useful to other testers

Page 9: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 9

Design Test CaseDesign Test Case

White Box Testing: Uses specific knowledge of

programming code to examine outputs

Page 10: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 10

White Box Testing - ExampleWhite Box Testing - Example

Instruction coverage Decision coverage Condition coverage Decision/Condition coverage Multi condition coverage

Page 11: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 11

Design Test CaseDesign Test Case

Black Box Testing: Assess how well a program meets its

requirements Focusing on testing functional requirements

I/P O/P

Page 12: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 12

Black Box Testing - ExampleBlack Box Testing - Example

A large IT company is in the process of revising salary structure for its employees.The salary will be revised on the check point for all employees with at least one year seniority

The rule for salary revision are provided below: Check point: 90 -> 100: Increase existing salary by

20%

Check point: 80 -> 89: Increase existing salary by 15%

Check point: 75 -> 79: Increase existing salary by 10%

Check point: < 75: No increase

Page 13: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 13

Black Box Testing - TechniqueBlack Box Testing - Technique

Expand Conditions into Test Cases using Boundary Value Analysis: a minimum or maximum

input, internal, or output value specified for a system or component

Equivalence Partitioning: one or a few cases are chosen to represent an entire equivalence class

Decision Tables

Case study

Page 14: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 14

Fsoft - Test Case StructureFsoft - Test Case Structure

Test case specifications Test procedures Pass/ Fail criteria: List all results that decide test

case is passed or failed Dependencies: List all test cases that must be done

before performing this case

Page 15: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 15

Test Case SpecificationsTest Case Specifications

List cases/scenario that will be tested Interface

Test with valid data

Test with invalid data:

• Mandatory field

• Min, Max length

• Incorrect type, format

• Boundary, etc

Page 16: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 16

Test ProcedureTest Procedure

Test actions taken by the actor when executing a test case

Test input: the actual values input by the actor at each step/action

Expected result: the expected response from the application for a given step/action

Page 17: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 17

Pass/Fail criteria - Inter-case Pass/Fail criteria - Inter-case dependencies dependencies

Pass/Fail criteria: List all results that decide test

case is passed or failed

Inter-case dependencies: List all test cases that

must be done before performing this case

Page 18: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 18

Test ScriptTest Script

Recorded automatically Coded manually: using test tools or standard

programming languages like VB, C/C++, Java or SQL

Test stub: temporary implementation of part of a program for unit test purposes

Test driver: program which sets up an environment to call a module (or function) for testing

Page 19: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 19

Test DataTest Data

Prepare data test for scenarios Tools

Manual

Page 20: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 20

GUI Test CaseGUI Test Case

Aesthetic conditions Navigation conditions Validate text fields Validate number fields Validate date fields

Page 21: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 21

GUI Test Case - Validate text fieldsGUI Test Case - Validate text fields

Check mandatory fields Max length Special characters/htlm tags (name, email,

address, password) Space at the beginning and the end of string Full-size, haft-size characters (Japanese) Case-sensitive or not Unicode

Page 22: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 22

GUI Test Case - Validate number GUI Test Case - Validate number fieldsfields

Check mandatory fields Max/Min values Integer/Decimal numbers Positive/Negative numbers Check conversion of format (decimal symbol, digit

grouping symbol, display leading zero) Display decimal symbol, digit grouping symbol,

leading zero

Page 23: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 23

GUI Test Case - Validate date fieldsGUI Test Case - Validate date fields

Check mandatory fields Check date format (inputted date, conversion of

inputted date) Compare inputted date to current date (if required) Compare dates based on business rules Compare “From Date” to “To Date” Check format date with regional setting

Page 24: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 24

Test case templatesTest case templates

Word Excel Reference:

http://www.fsoft.com.vn/FQMS/FSOFT/Template

Page 25: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

FPT-Software Training Materials 25

Test Case Review ChecklistTest Case Review Checklist

Who will use TC checklist? Why do have to use TC checklist?

Check template of test plan

Check required information in TC

Template

Page 26: Test Case. FPT-Software Training Materials 2 Introduction o Purpose: Writing Test Case o Attendees: Testers o Duration: 2 hours.

Q & AQ & A