0% found this document useful (0 votes)
65 views56 pages

05 Test Documentation

Uploaded by

杨炯
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views56 pages

05 Test Documentation

Uploaded by

杨炯
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 56

Group Assignment SSE3305 Semester 2 2019/2020

TEST DOCUMENTATION
Assessment System for FACE

Version: 1.0.0

Date: 30/10/2022

Prepared by:
Xin Zhenghang (204929)
LI HONGSHEN (208788)
Yang Jiong (209517)
Table of Contents
TEST PLAN

1 Introduction..................................................................................................................... 6

1.1 Purpose.................................................................................................................... 6

1.2 Scope....................................................................................................................... 6

1.3 References............................................................................................................... 6

2 Details of Test Plan......................................................................................................... 6

2.1 Test Items................................................................................................................ 6

2.2 Test Traceability Matrix............................................................................................6

2.3 Features to Be Tested..............................................................................................7

2.4 Features Not to Be Tested.......................................................................................7

2.5 Approach.................................................................................................................. 7

2.6 Item Pass/ Fail Criteria.............................................................................................7

2.7 Suspension Criteria and Resumption Requirements................................................8

2.8 Test Deliverables.....................................................................................................8

2.9 Entry Criteria............................................................................................................ 8

2.10 Exit Criteria.............................................................................................................. 8

3 Test Management........................................................................................................... 9

3.1 Planned Activities and Tasks...................................................................................9

3.2 Environments and Infrastructure............................................................................10

3.2.1 Hardware........................................................................................................ 10

3.2.2 Software.......................................................................................................... 10

3.2.3 Publications.....................................................................................................10

3.3 Responsibilities and Authority................................................................................10

3.4 Resource and Allocation........................................................................................12

3.4.1 External Resources.........................................................................................12

3.4.2 Internal Resources..........................................................................................12

3.5 Training.................................................................................................................. 12

3.6 Schedules, Estimates and Costs............................................................................12

1|Pag
3.7 Risk and Contingency............................................................................................13

4 General......................................................................................................................... 13

4.1 Metrics................................................................................................................... 13

4.2 Glossary................................................................................................................. 14

4.3 Incident Classification............................................................................................14

TEST DESIGN SPECIFICATION

1 Introduction................................................................................................................... 17

1.1 Purpose.................................................................................................................. 17

1.2 Scope..................................................................................................................... 17

1.3 References............................................................................................................. 17

2 Test Design................................................................................................................... 17

2.1 Features to Be Tested............................................................................................17

2.2 Approach Refinements...........................................................................................17

2.2.1 Aiman Inspection And Evaluation....................................................................18

2.3 Test Identification...................................................................................................27

2.3.1 Inspection And Evaluation...............................................................................27

2.4 Feature Pass/ Fail Criteria......................................................................................29

2.5 Test Deliverables...................................................................................................29

TEST CASE SPECIFICATION

1 Introduction................................................................................................................... 32

1.1 Purpose.................................................................................................................. 32

1.2 References............................................................................................................. 32

2 Test Cases.................................................................................................................... 32

2.1 Environment........................................................................................................... 32

2.2 Test Case............................................................................................................... 32

2.2.1 Validate Credit Card........................................................................................33

TEST PROCEDURE SPECIFICATION

1 Introduction................................................................................................................... 40

1.1 Purpose.................................................................................................................. 40

2|Pag
1.2 Scope..................................................................................................................... 40

1.3 References............................................................................................................. 40

2 Test Procedure.............................................................................................................. 40

2.1 Credit Card Validation Test Procedure...................................................................40

TEST REPORT

1 Test Classes................................................................................................................. 45

1.1 Junit Test Class......................................................................................................47

1.1.1 Test Procedure 1............................................................................................47

1.1.2 Test procedure 2.............................................................................................48

1.1.3 Test Procedure 3 and 4...................................................................................50

1.2 Coverage Information.............................................................................................52

2 Conclusion.................................................................................................................... 53

3|Pag
TEST PLAN

Assessment System for FACE

Version: 1.0.0

Date: 24/03/2020

4|Pag
Document Control
Document Name FACE Test Plan
Reference Number FACE_TP
Version 1.0.0
Project Code STARTUP_FACE
Status In_Use
Date Released 30/10/2022

Name Position Signature

Reviewed by:
Approved by:
Approved by:

Version History
Version Release Date Section Amendments
1.0.0 24/03/2020 All Original document

Distribution List
Version Release Controlled Recipient Department Issue Return
Date Copy No Name Date Date
1.0.0 24/03/2020

5|Pag
1 Introduction

1.1 Purpose

This test plan supports the following objectives:

i. To detail the activities required to prepare for and conduct the system test.
ii. To communicate to all responsible parties, the tasks that they are to perform and the
schedule to be followed in performing the tasks.
iii. To define the sources of the information used to prepare the plan.
iv. To define the test tools and environment needed to conduct the system test.

1.2 Scope

The scope of testing covers black box-functional testing and white box-functional testing for
features developed in FACE. This test plan only covers system level test, excluding unit test,
static test, integration test, acceptance test, regression test, confirmation test and as well as
other type of test not mentioned in this Test Plan. It would focus on meeting the requirement
of the system and making sure that the system is fit for purpose.

1.3 References

The following IEEE standards have been referenced in preparation of this document:

i. IEEE 829-1998 Standard for Software and System Test Documentation


ii. IEEE 829-2008 Standard for Software and System Test Documentation

2 Details of Test Plan

2.1 Test Items

The following documents will provide the basis for defining correct operation:

i. Use case diagram


ii. Activity diagram
iii. Decision table
iv. Source code

2.2 Test Traceability Matrix

The following table contains the function in FACE:

Function ID. Risk Level Function Description Source of Function

6|Pag
Aiman High Inspection and Use Case
evaluation
Table 2.2 Test Traceability Matrix

2.3 Features to Be Tested

Function ID. Risk Level Function Description Source of Function


Aiman High Inspection and Use Case
evaluation
Table 2.3 Features To Be Tested

2.4 Features Not to Be Tested

Aside from the feature listed in Section 2.3, other aspects of the system that are not covered
in this test plan. This includes:

i. Network security
Security for this test plan is not covered here as it is designed for functional test.

2.5 Approach

The test on FACE is a system level functional test that focuses only on the functional part of
the system.

This test will also be a black-box test where test cases are derived using black box testing
techniques such as:

i. Equivalence partitioning
ii. Boundary value analysis
iii. Decision table testing

This test will also be an object-oriented testing where test cases are derived using object-
oriented testing techniques such as:

i. Path Testing

2.6 Item Pass/ Fail Criteria

The system must satisfy the following criteria in order to pass:

i. All test case must be passed


ii. 0% calculation error in any function involving monetary transaction
iii. No deadlock during operation.

7|Pag
2.7 Suspension Criteria and Resumption Requirements

Suspension Criteria:
In case where PHP environment and MYSQL environment are not available, all tests will be
suspended.
Resumption Requirement:
PHP environment and MYSQL environment are prepared.

2.8 Test Deliverables

The following documents will be generated by the system test group and will be delivered
during the system testing.

Test documentation:

i. Test Plan
ii. Test Design Specifications
iii. Test Case Specifications
iv. Test Procedure Specification
v. Test Report

2.9 Entry Criteria

The following items are needed before the testing can begin:

i. Use case diagram


ii. Activity diagram
iii. Decision table
iv. Source code

2.10 Exit Criteria

The following items are needed before the testing can end:

i. All Test Deliverables in Section 2.8 Test Deliverables have been delivered to client.
ii. Test execution has been completed.
iii. Open defect at the end of the final iteration shall be:
 Zero fatal defect
 Zero major defect
 <= three minor defects

8|Pag
3 Test Management
The following table shows the set of tasks necessary to prepare for and perform testing for
Validated Credit Card System. It was identifying dependencies of other tasks and significant
constraint such as test item availability, testing resources availability and deadlines.

3.1 Planned Activities and Tasks

The following table shows the set of tasks necessary to Inspection and evaluation FACE
System. It was identifying dependencies of other tasks and significant constraint such as test
item availability, testing resources availability and deadlines.

No. Task Activities Target Date


1. Test Planning and i. Define test project scope 01/11/2022
control and purposes
ii. Requirement view
iii. Documenting test plan
2. Test Analysis and i. Analyse product
Design ii. Develop test design
specification
iii. Prepare test case
specification
3. Test Environment i.

4. Test Implementation i. Prepare test procedure


specification
and Execution
ii. Perform functional test
iii. Record test result
iv. Analyse test result
5. Documenting Test and i. Summarize test result
Summary Report
6. Documenting Test i. Collecting test process
data from activities to
Closure
consolidate experience,
test ware, facts and
numbers.
7. Test Complete i. Delivery of product to
client
Table 3.1 Planned Activities and Tasks

9|Pag
3.2 Environments and Infrastructure

This section describes the hardware, software and operating system that require for this
system testing.

3.2.1 Hardware
The following table shows the hardware requirements of FACE that will be used to install
FACE.

Hardware Name HP ENVY Notebook - 14s-cf1027Tx


Keyboard Full-size island-style backlit
Memory 8 GB DDR3L SDRAM (onboard)
Graphics Intel® Iris® Xᵉ Graphics
Table 3.2.1.1 VCCS Hardware Requirement

3.2.2 Software
The following table shows the software requirements of FACE that will be used to install
FACE.

Application Name Assessment System for FACE


Version 1.0
Type of file  Hypertext Preprocessor file (.php)
Size on application 3.69MB
Size on disk 4.40MB
Operating System Microsoft Windows 11 64-bit
Table 3.2.2 VCCS Software Requirement

3.2.3 Publications
There are no documents required to support system testing.

3.3 Responsibilities and Authority

This section will identify the individuals or groups responsible for managing, designing,
preparing, executing, witnessing and checking results of this testing. In addition, it will
identify the persons responsible for providing the test items in Section 2.0 and environmental
needs identified in Section 3.2.

Name Role Responsibilities


Tester 1 Test Manager 1  Negotiating the ongoing purpose and
deliverables of test effort

10 | P a g
 Ensuring the appropriate planning and
management of the test resources
 Accessing the progress and effectiveness of
the test effort
 Advocating the appropriate level of quality
by the resolution of important defects
 Advocating an appropriate level of testability
focus in the software development process
Tester 2 Test Lead 1  Deploying and managing the appropriate
testing framework to meet the testing
mandate
 Implementing and evolving appropriate
measurements and metrics
o To be applied against the Product
under test
o To be applied against the Testing
Team
Tester 3 Test Lead 2  Planning, deploying and managing the
testing effort for any given
engagement/release
 Managing and growing Testing assets
required for meeting the testing mandate:
o Team Members
o Testing Tools
o Testing Process
 Retaining skilled testing personnel
Tester 4 & 5 Test Analyst  Identifying the Target Test Items to be
evaluated by the test effort
 Defining the appropriate tests required and
any associated Test Data
 Gathering and managing the Test Data
 Evaluating the outcome of each test cycle
Tester 6 Tester  Test Requirements Analysis
 Test Case Development/Updating
 Test Data Preparation

11 | P a g
 Test Execution and Results Logging
 Defect Analysis and Reporting
 Re-test for Fixes
Table 3.3 Roles and Responsibilities

3.4 Resource and Allocation

This section will describe any additional required resources that are not already documented
by other parts of the plan. This is including internal or external resources.

3.4.1 External Resources


There are no external resources required in system testing.

3.4.2 Internal Resources


The internal Quality Assurance Team of Startup shall be responsible for reviewing the test
deliverables for adherence to compliance.

3.5 Training

All personnel that involve in this testing doesn’t require training.

3.6 Schedules, Estimates and Costs

This section will describe the project schedule and task milestones. The schedule will include
estimated time that required for each testing task. Cost is not included for this testing.

Task Milestones Days Duration


Test Planning and Submission of Test Plan for sign-
control off
Test Analysis and Submission of Test Design
Design Specification, Test Case
Specification and Test
Procedure
Specification
Test Environment Setup of test environment
Test Implementation Execution of system test of
and Execution Validate Credit Card System
Documenting Test Submission of Test Summary
and Summary Report Report
Documenting Test Submission of Test Closure
Closure
Test Complete Delivery of product to client

12 | P a g
13 | P a g
Table 3.6 Estimated Testing Schedule

3.7 Risk and Contingency

This section identifies the risk issues may impact successful completion of the system
testing activities of Validated Credit Card System. The potential likelihood, impact and
mitigation plan was described in the following tables.

Rating for Likelihood for Each Risk


1 Rated as Low
2 Rated as Medium
3 Rated as High
4 Rated as Extreme
Table 3.4.2.1 Likelihood Rating Table

Rating for Impact for Each Risk


1 Rated as Low
2 Rated as Medium
3 Rated as High
4 Rated as Extreme
Table 3.4.2.2 Priority Rating Table

4 General

4.1 Metrics

The following metrics will be collected and used to monitor the progress.

Metric List Metric Description Goals


Actual duration vs. plan Metric to monitor the project Allow 20% delay
(variance) progress compared to the
plan
Percentage of test cases run Metric to monitor total 100%
during test execution number of test cases
executed
Percentage of test cases Metric to monitor total All high-risk test cases
passed against total of test number of test cases passed
cases executed executed with Passed
criteria

14 | P a g
Percentage of baseline Metric to monitor total 100%
requirement covered against number of baseline
total test cases requirement coverage
Table 4.1 Metric Details

4.2 Glossary

Term Definition
FACE Assessment System for FACE System
Table 4.2 Glossary Test Plan

4.3 Incident Classification

Impact
Mission Critical: Application will not function, or system fails
Major: Severe problems but possible to work around
Minor: Does not impact the functionality or usability of the process is not according to
requirements/design specifications
Priority
Immediate: Must be fixed as soon as possible
Delayed: System is unstable, but incident must be fixed prior to next level of test cases or
shipment.
Deferred: Defect can be left in if necessary due to time or costs

15 | P a g
TEST DESIGN
SPECIFICATION

Assessment System for FACE

Version: 1.0.0

Date: 30/10/2022

16 | P a g
Document Control
Document Name FACE Test Design Specification
Reference Number FACE_TDS
Version 1.0.0
Project Code STARTUP_FACE
Status In_Use
Date Released 30/10/2022

Name Position Signature


Prepared by: Group member
Nur Hazimah binti Hamdan
Syazwani binti Rahimin
Tuan Syaripah Nur Izzati
Tan Sean Leng
Aina Arfina
Nurul Syafiqah
Reviewed by:
Approved by:
Approved by:

Version History
Version Release Date Section Amendments
1.0.0 30/10/2022 All Original document

Distribution List
Version Release Controlled Recipient Department Issue Return
Date Copy No Name Date Date
1.0.0 30/10/2022

17 | P a g
1 Introduction

1.1 Purpose

This test design specification supports the following objectives:

i. To identify the test items covered


ii. To further refine the test approach from Test Plan
iii. To define the sources of the information used to prepare the plan
iv. To identify the general cases of test to be executed

1.2 Scope

Assessment system is a system which evaluates students in many ways ,such as Assessing the
students with their psychomotor,Reading for English or Bahasa and Holistic development.This
system is mostly used in schools,teachers and parents can assess students from AS.

After the parent sees the assessment, there is an option to give feedback.

Besides, other people who have been authorized by the parent and teacher, can also see the
child's assessment results. This system also provides a free trail to the authorized user..

1.3 References

The following IEEE standards have been referenced in preparation of this document:

i. IEEE 829-1998 Standard for Software and System Test Documentation


ii. IEEE 829-2008 Standard for Software and System Test Documentation

2 Test Design

2.1 Features to Be Tested

Function ID. Function Description Risk Level


Aiman Inspection and evaluation High
Table 2.1 Features to Be Tested

2.2 Approach Refinements

As discussed in Test Plan (FACE_TP_1.0.0), test cases for FACE will be designed using
four techniques which we are covered in this section. Techniques are applied based on
suitability of techniques according to nature of features.

The techniques that will be applied are as follows:

i. Equivalence Partitioning
18 | P a g
ii. Boundary Value Analysis
iii. Decision Table Testing
iv. Path Testing

Nature of feature as below:

19 | P a g
 Aiman Inspection and evaluation

2.2.1 Aiman Inspection and evaluation


Three techniques are identified for designing test for this feature, including:

i. Equivalence Partitioning
ii. Boundary Value Analysis
iii. Decision Table Testing
iv. Path Testing

Equivalence partitioning is used to split length and prefix of credit card number validation into
possible partitions for test. Boundary value analysis will test the boundary values of the
length of credit card number digits input. Decision table is used to cover isValid() method
decision. Path Testing will test for major condition of VCCS.

20 | P a g
2.2.1.1 Equivalence Partitioning

Figure 2.1 Input and Output for Equivalence Partitioning and Boundary Value Analysis

21 | P a g
Test Test Condition Test Test Coverage Test Data
Condition Coverage
ID ID
TCON-01- Length of credit TCOV-01- Length of credit 555544446666
001 card number < 13 001 card number < 13
AND Prefix of AND Prefix of
credit credit card

card number ∈  {4, number ∈  {4, 5,


5, 37, 6} 37, 6} (Invalid)
TCON-01- Length of credit TCOV-01- Length of credit 255544446666
002 card number < 13 002 card number < 13
AND Prefix of AND Prefix of
credit credit card

card number ∉ {4, number ∉ {4, 5,


5, 37, 6} 37, 6} (Invalid)
TCON-01- 13 ≤ Length of TCOV-01- 13 ≤ Length of 63049506000000
003 credit card 003 credit card
number ≤ 16   AND number ≤ 16  AND
Prefix of credit card Prefix of

number ∈  {4, 5, 37, credit card


6} number ∈  {4, 5,
37, 6} (Valid)
TCON-01- 13 ≤ Length of TCOV-01- 13 ≤ Length of 23049506000000
004 credit card 004 credit card
number ≤ 16  AND number ≤ 16 AND
Prefix of credit card

number ∉ {4, 5, 37, Prefix of


6} credit card

number ∉ {4, 5,
37, 6} (Invalid)
TCON-01- Length of credit TCOV-01- Length of credit 50000000000000000
005 card number > 16 005 card number > 16
AND Prefix of AND Prefix of
credit credit card

card number ∈  {4, number ∈  {4, 5,


5, 37, 6} 37, 6} (Invalid)

22 | P a g
TCON-01- Length of credit TCOV-01- Length of credit 70000000000000000
006 card number > 16 006 card number > 16
AND Prefix of Prefix of credit
credit card number ∉ 
card number ∉  {4, {4, 5, 37, 6}
5, 37, 6} (Invalid)
TCON-01- Display message TCOV-01- Display message 4007000000027
007 ‘Visa Card is Valid 007 ‘Visa Card is Valid
Card’  Card’ (valid
output)
TCON-01- Display message TCOV-01- Display message 5564745926916989
008 ‘Master Card is 008 ‘Master Card is
Valid Card’  Valid Card’ (valid
output)
TCON-01- Display message ‘ TCOV-01- Display message 63049506000000
009 Discover Card is 009 ‘Discover Card is
Valid Card’  Valid Card’ (valid
output)
TCON-01- Display message TCOV-01- Display message 378734493671000
010 ‘American 010 ‘American
Express Card is Express Card is
Valid Card’  Valid Card’ (valid
output)
TCON-01- Display message TCOV-01- Display message 888888abcde
011 ‘Invalid Card’ 011 ‘Invalid Card’
(invalid output)
Table 2.2.1.1 Equivalence Partitioning Test Condition and Coverage

2.2.1.2 Boundary Value Analysis

Figure 2.2 Length of Credit Card Number for Boundary Value Analysis

23 | P a g
Test Test Condition Test Test Coverage Test Data
Condition Coverage
ID ID
TCON-01- Length of credit card TCOV-01- Length of credit 555544446666
012 = 12 digits AND Prefix 012 card = 12 digits
of AND Prefix of

credit card number ∈  credit card


{4, 5, 37, 6} number ∈  {4, 5,
37, 6} (Invalid)
TCON-01- Length of credit card = TCOV-01- Length of credit 255544446666
013 12 digits AND Prefix of 013 card = 12 digits

credit card number ∉  AND Prefix of


{4, 5, 37, 6} credit card

number ∉  {4, 5,
37, 6} (Invalid)
TCON-01- Length of credit card TCOV-01- Length of credit 4007000000027
014 = 13 digits AND Prefix 014 card = 13 digits
of AND Prefix of

credit card number ∈  credit card


{4, 5, 37, 6} number ∈  {4, 5,
37, 6} (valid)
TCON-01- Length of credit card TCOV-01- Length of credit 2007000000027
015 = 13 digits AND Prefix 015 card = 13 digits
of AND Prefix of

credit card number ∉  credit card


{4, 5, 37, 6} number ∉  {4, 5,
37, 6} (Invalid)
TCON-01- Length of credit card TCOV-01- Length of credit 63049506000000
016 = 14 digits AND Prefix 016 card = 14 digits
of AND Prefix of

credit card number ∈ credit card


{4, 5, 37, 6} number ∈ {4, 5,
37, 6} (Valid)
TCON-01- Length of credit card = TCOV-01- Length of credit 23049506000000
017 14 digits AND Prefix of 017 card = 14 digits
AND Prefix of

24 | P a g
credit card number ∉  credit card
{4, 5, 37, 6} number ∉  {4, 5,
37, 6} (Invalid)

TCON-01- Length of credit card TCOV-01- Length of credit 378734493671000


018 = 15 digits AND Prefix 018 card = 15 digits
of AND Prefix of

credit card number ∈  credit card


{4, 5, 37, 6} number ∈ {4, 5,
37, 6} (Valid)
TCON-01- Length of credit card TCOV-01- Length of credit 278734493671000
019 = 15 digits AND Prefix 019 card = 15 digits
of AND Prefix of

credit card number ∉  credit card


{4, 5, 37, 6} number ∉{4, 5,
37, 6} (Invalid)
TCON-01- Length of credit card TCOV-01- Length of credit 5564745926916989
020 = 16 digits AND Prefix 020 card = 16 digits
of AND Prefix of

credit card number ∈  credit card


{4, 5, 37, 6} number ∈  {4, 5,
37, 6} (Valid)
TCON-01- Length of credit card TCOV-01- Length of credit 2564745926916989
021 = 16 digits AND Prefix 021 card = 16 digits
of AND Prefix of

credit card number ∉  credit card


{4, 5, 37, 6} number ∉  {4, 5,
37, 6} (Invalid)
TCON-01- Length of credit card = TCOV-01- Length of credit 50000000000000000
022 17 digits AND Prefix 022 card = 17 digits
of credit card number AND Prefix of
∈  credit card
{4, 5, 37, 6} number ∈  {4, 5,
37, 6} (Invalid)
TCON-01- Length of credit card = TCOV-01- Length of credit 70000000000000000
023 17 digits AND Prefix of 023 card = 17 digits
AND Prefix of

25 | P a g
credit card number ∉  credit card
{4, 5, 37, 6} number ∉  {4, 5,
37, 6} (Invalid)

TCON-01- Display message TCOV-01- Display 4007000000027


007 ‘Visa Card is Valid 007 message
Card’  ‘Visa Card is
Valid
Card’ (valid
output)
TCON-01- Display message TCOV-01- Display 5564745926916989
008 ‘Master Card is Valid 008 message
Card’  ‘Master Card is
Valid
Card’ (valid
output)
TCON-01- Display message TCOV-01- Display 63049506000000
009 ‘Discover Card is 009 message ‘
Valid Card’  Discover Card
is Valid
Card’ (valid
output)
TCON-01- Display message TCOV-01- Display 378734493671000
010 ‘American 010 message
Express Card is Valid ‘American
Card’  Express Card is
Valid
Card’ (valid
output)
TCON-01- Display message TCOV-01- Display 888888abcde
011 ‘Invalid Card’ 011 message
‘Invalid Card’
(invalid output)
Table 2.2.1.2 Boundary Value Analysis Test Condition and Coverage

26 | P a g
2.2.1.3 Decision Table Testing

Test Condition ID Test Condition


TCON-01-024 13 ≤ Length of credit card number ≤ 16
TCON-01-025 Prefix of credit card number = {4,5,37,6}
TCON-01-026 All input digit
TCON-01-027 (evens + odds) % 10! = 0)
TCON-01-028 Valid credit card number
TCON-01-011 Invalid credit card number
Table 2.2.1.3.a Validate Credit Card Decision Table Test Conditions

Test TCOV TCOV TCOV TCOV TCOV TCOV TCOV TCOV TCOV
Condition -01- -01- -01- -01- -01- -01- -01- -01- -01-
. 024 025 026 027 028 029 030 031 032
13 ≤ Y Y Y Y Y N N N N
length of
the card
number ≤
16
Prefix = Y Y Y N N Y Y N N
{4,5,37,6}
All input Y Y N Y N Y N Y N
digit
(evens + Y N - - - - - - -
odds) %
10! = 0)
Output
Display X
valid
credit
card
number
Display X X X X X X X X
invalid
credit
card
number
Table 2.2.1.3.b Validate Credit Card Decision Table

27 | P a g
2.2.1.4 Path Testing (Main Method)

Figure 2.2.1.4 Path Testing

Cyclomatic complexity = Number of Edges – Number of Nodes + 2


= 10 – 9 + 2
=3
Independent Path =3

28 | P a g
Test Test Condition Test Test Coverage Test Data
Condition ID Coverage ID
TCON-01- Continue TCOV-01- Continue system and cont = ‘Y’
029 system and 033 valid 63049506000000
valid
TCON-01- Continue TCOV-01- Continue system and cont = ‘Y’
030 system and 034 invalid 7777777
invalid
TCON-01- End system TCOV-01- End system cont = ‘N’
031 035
Figure 2.2.1.4 Path Testing Test Condition and Coverage

2.3 Test Identification

2.3.1 Validate Credit Card


Test Case ID Description Test Coverage Test Condition ID
ID
TC-01-001 13 ≤ Length of credit card TCOV-01-003 TCON-01-003
number ≤ 16 and Prefix of
TCOV-01-014 TCON-01-014
credit card

number ∈ {4, 5, 37, 6} TCOV-01-016 TCOV-01-016

TCOV-01-018 TCON-01-018
TCOV-01-020 TCON-01-020
TC-01-002 Length of credit card TCOV-01-001 TCON-01-001
number < 13 and Prefix of
credit card TCOV-01-012 TCON-01-012

number ∈ {4, 5, 37, 6}


TC-01-003 Length of credit card TCOV-01-002 TCON-01-002
number < 13 and Prefix of TCOV-01-013 TCON-01-013
credit card

number ∉ {4, 5, 37, 6}


TC-01-004 13 ≤ Length of credit card TCOV-01-004 TCON-01-004
number ≤ 16 and Prefix of
credit card TCOV-01-015 TCON-01-015
number ∉ {4, 5, 37, 6} TCOV-01-017 TCON-01-017
TCOV-01-019 TCON-01-019

29 | P a g
TCOV-01-021 TCON-01-021
TC-01-005 Length of credit card TCOV-01-005 TCON-01-005
number > 16 and Prefix of TCOV-01-022 TCON-01-022
credit card

number ∈ {4, 5, 37, 6}


TC-01-006 Length of credit card TCOV-01-006 TCON-01-006
number > 16 and Prefix of
TCOV-01-023 TCON-01-023
credit card

number ∉ {4, 5, 37, 6}


TC-01-007 Display message TCOV-01-007 TCON-01-007
‘Visa Card is Valid Card’ TCOV-01-024 TCON-01-024
TCON-01-025
TCON-01-026
TCON-01-027
TC-01-008 Display message ‘Master TCOV-01-008 TCON-01-008
Card is Valid Card’ TCOV-01-024 TCON-01-024
TCON-01-025
TCON-01-026
TCON-01-027
TC-01-009 Display message TCOV-01-009 TCON-01-009
‘Discover Card is Valid
Card’ TCOV-01-024 TCON-01-024
TCON-01-025
TCON-01-026
TCON-01-027
TC-01-010 Display message TCOV-01-010 TCON-01-010
‘American Express Card is
Valid Card’ TCOV-01-024 TCON-01-024
TCON-01-025
TCON-01-026
TCON-01-027
TC-01-011 Display ‘Invalid Card’ TCOV-01-011 TCON-01-011
TCOV-01-025 TCON-01-024
TCON-01-025
TCON-01-026

30 | P a g
TCOV-01-026 TCON-01-024
TCON-01-025
TCOV-01-027 TCON-01-024
TCON-01-026
TCOV-01-028 TCON-01-024
TCOV-01-029 TCON-01-025
TCON-01-026
TCOV-01-030 TCON-01-025
TCOV-01-031 TCON-01-026
TCOV-01-032 TCON-01-011
TC-01-012 Continue to validate the TCOV-01-033 TCON-01-029
credit card number TCOV-01-034 TCON-01-030
TC-01-013 Exit the system TCOV-01-035 TCON-01-031
Table 2.3.1 Validate Credit Card Test Identification

2.4 Feature Pass/ Fail Criteria

Each feature must satisfy the following criteria in order to pass:

i. Pass all its test cases


ii. 0% calculation error if the feature involves monetary transaction
iii. No deadlock
iv. Fulfill its requirement

2.5 Test Deliverables

The following documents will be generated by the system test group and will be delivered
after test completion.

Test documentation:

i. Test Plan
ii. Test Design Specifications
iii. Test Case Specification
iv. Test Procedural Specification
v. Test Report

31 | P a g
TEST
CASE
SPECIFICATION

Validate Credit Card System (VCCS)

Independent Verification and Validation

Version: 1.0.0

Date: 29/06/2020

32 | P a g
Document Control
Document Name VCCS Test Case Specification
Reference Number VCCS_TCS
Version 1.0.0
Project Code STARTUP_VCCS
Status In_Use
Date Released 29/06/2020

Name Position Signature


Prepared by: Group member
Nur Hazimah binti Hamdan
Syazwani binti Rahimin
Tuan Syaripah Nur Izzati
Tan Sean Leng
Aina Arfina
Nurul Syafiqah
Reviewed by:
Approved by:
Approved by:

Version History
Version Release Date Section Amendments
1.0.0 29/06/2020 All Original document

Distribution List
Version Release Controlled Recipient Department Issue Return
Date Copy No Name Date Date
1.0.0 29/06/2020

33 | P a g
1 Introduction

1.1 Purpose

This test design specification supports the following objectives:

i. To detail the test cases derived from test coverage in Test Design Specification

1.2 References

The following IEEE standards have been referenced in preparation of this document:

iii. IEEE 829-1998 Standard for Software and System Test Documentation
iv. IEEE 829-2008 Standard for Software and System Test Documentation

2 Test Cases

2.1 Environment

Test will be performed on laptop with the following specifications:

Hardware Name HP ENVY Notebook - 13-d000ne (ENERGY STAR)


Keyboard Full-size island-style backlit
Memory 8 GB DDR3L SDRAM (onboard)
Graphics Intel® HD Graphics 520
Table 2.1 Laptop Hardware Requirements

2.2 Test Case

This section details all test cases designed separated according to feature.

34 | P a g
2.2.1 Validate Credit Card
Test Case ID TC-01-001
Related Feature ID F001
Objective 13 ≤ Length of credit card number ≤ 16 and Prefix of credit
card number ∈ {4, 5, 37, 6}
Covered Test Coverage TCOV-01-003, TCOV-01-014, TCOV-01-016, TCOV-01-
Items 018, TCOV-01-020
Input Excepted Result Inter case Dependency
Credit card number = Display message ‘America None
378734493671000 Express Card is Valid Card’
Table 2.2.1.1.1 Test Case-01-001

Test Case ID TC-01-002


Related Feature ID F001
Objective Length of credit card number < 13 and Prefix of
credit card number ∈ {4, 5, 37, 6}
Covered Test Coverage TCOV-01-001, TCOV-01-012
Items
Input Excepted Result Inter case Dependency
Credit card number = System display message ‘Invalid None
555544446666 Card’
Table 2.2.1.2 Test Case-01-002

Test Case ID TC-01-003


Related Feature ID F001
Objective Length of credit card number < 13 and Prefix of credit card
number ∉ {4, 5, 37, 6}
Covered Test Coverage TCOV-01-002, TCOV-01-013
Items
Input Excepted Result Inter case Dependency
Credit card number = System display message ‘Invalid None
255544446666 Card’
Table 2.2.1.3 Test Case-01-003

35 | P a g
Test Case ID TC-01-004
Related Feature ID F001
Objective 13 ≤ Length of credit card number ≤ 16 and Prefix of credit
card number ∉ {4, 5, 37, 6}
Covered Test Coverage TCOV-01-004, TCOV-01-015, TCOV-01-017, TCOV-01-
Items 019, TCOV-01-021
# Input Excepted Result Inter case Dependency
1. Credit card number = System display message ‘Invalid None
23049506000000 Card’
2. Credit card number = System display message ‘Invalid None
2007000000027 Card’
3. Credit card number = System display message ‘Invalid None
278734493671000 Card’
4. Credit card number = System display message ‘Invalid None
2564745926916989 Card’
Table 2.2.1.4 Test Case-01-004

Test Case ID TC-01-005


Related Feature ID F001
Objective Length of credit card number > 16 and Prefix of credit card
number ∈ {4, 5, 37, 6}
Covered Test Coverage TCOV-01-005, TCOV-01-022
Items
Input Excepted Result Inter case Dependency
Credit card number = System display message ‘Invalid None
50000000000000000  Card’
Table 2.2.1.5 Test Case-01-005

Test Case ID TC-01-006


Related Feature ID F001
Objective Length of credit card number > 16 and Prefix of credit card
number ∉ {4, 5, 37, 6}
Covered Test Coverage TCOV-01-006, TCOV-01-023
Items

36 | P a g
Input Excepted Result Inter case Dependency
Credit card number = System display message ‘Invalid None
70000000000000000 Card’
Table 2.2.1.6 Test Case-1-006

Test Case ID TC-01-007


Related Feature ID F001
Objective Display message ‘Visa Card is Valid Card’
Covered Test Coverage TCOV-01-007, TCOV-01-024
Items
Input Excepted Result Inter case Dependency
Credit card number = System display message None
4007000000027 ‘Visa Card is Valid Card’
Table 2.2.1.7 Test Case-01-007

Test Case ID TC-01-008


Related Feature ID F001
Objective Display message ‘Master Card is Valid Card’
Covered Test Coverage TCOV-01-008, TCOV-01-024
Items
Input Excepted Result Inter case Dependency
Credit card number = System display message ‘Master None
5564745926916989 Card is Valid Card’
Table 2.2.1.8 Test Case-01-008

Test Case ID TC-01-009


Related Feature ID F001
Objective Display message ‘Discover Card is Valid Card’
Covered Test Coverage TCOV-01-009, TCOV-01-024
Items
Input Excepted Result Inter case Dependency
Credit card number = System display message None
63049506000000 ‘Discover Card is Valid Card’
Table 2.2.1.9 Test Case-01-009

37 | P a g
Test Case ID TC-01-010
Related Feature ID F001
Objective Display message ‘American Express Card is Valid Card’
Covered Test Coverage TCOV-01-010, TCOV-01-024
Items
Input Excepted Result Inter case Dependency
Credit card number = System display message None
378734493671000 ‘American Express Card is Valid
Card’
Table 2.2.1.10 Test Case-01-010

Test Case ID TC-01-011


Related Feature ID F001
Objective Display ‘Invalid Card’
Covered Test Coverage TCOV-01-011, TCOV-01-025, TCOV-01-026, TCOV-01-
Items 027, TCOV-01-028, TCOV-01-029, TCOV-01-030, TCOV-
01-031, TCOV-01-032
# Input Excepted Result Inter case Dependency
1. Credit card number = System display message ‘Invalid None
888888abcde Card’
2. Credit card number = System display message ‘Invalid None
4000000000007 Card’
3. Credit card number = System display message ‘Invalid
40070000abcde Card’
4. Credit card number = System display message ‘Invalid None
1007000000027 Card’
5. Credit card number = System display message ‘Invalid None
10070000abcde Card’
6. Credit card number = System display message ‘Invalid None.
40070 Card’
7. Credit card number = System display message ‘Invalid None
400ab Card’
8. Credit card number = System display message ‘Invalid None
10070 Card’

38 | P a g
9. Credit card number = System display message ‘Invalid None.
40070 Card’
Table 2.2.1.11 Test Case-01-011

Test Case ID TC-01-012


Related Feature ID F001
Objective Continue to validate the credit card number
Covered Test Coverage TCOV-01-033, TCOV-01-34
Items
Input Excepted Result Inter case Dependency
Credit card number = System display message None
63049506000000 and cont = ‘Discover Card is Valid Card’ and
‘Y’ ‘Do you want to continue? (Y/N)’
Credit card number: 7777777 System display message ‘Invalid None
and cont = ‘Y’ Card’ and ‘Do you want to
continue? (Y/N)’
Table 2.2.1.12 Test Case-01-012

Test Case ID TC-01-013


Related Feature ID F001
Objective Exit the system
Covered Test Coverage TCOV-01-035
Items
Input Excepted Result Inter case Dependency
Credit card number = System display message None
63049506000000 and cont = ‘Discover Card is Valid Card’ and
N ‘The system end’
Table 2.2.1.13 Test Case-01-013

39 | P a g
TEST PROCEDURE
SPECIFICATION

Validate Credit Card System (VCCS)

Independent Verification and Validation

Version: 1.0.0

Date: 05/07/2020

40 | P a g
Document Control
Document Name VCCS Test Procedure Specification
Reference Number VCCS_TCS
Version 1.0.0
Project Code STARTUP_VCCS
Status In_Use
Date Released 05/07/2020

Name Position Signature


Prepared by: Group member
Nur Hazimah binti Hamdan
Syazwani binti Rahimin
Tuan Syaripah Nur Izzati
Tan Sean Leng
Aina Arfina
Nurul Syafiqah
Reviewed by:
Approved by:
Approved by:

Version History
Version Release Date Section Amendments
1.0.0 05/07/2020 All Original document

Distribution List
Version Release Controlled Recipient Department Issue Return
Date Copy No Name Date Date
1.0.0 05/07/2020

41 | P a g
1 Introduction

1.1 Purpose

This procedure describes the steps necessary to perform the test specified in the test design
specification for VCCS. The procedure describes the execution of the test cases described
in Test Case Specification VCCS_TCS_1_1.0.

For test design specification and test cases, please refer to the following documents:

i. VCCS Test Design Specification (VCCS_TDS_1_1.0.0)


ii. VCCS Test Case Specification (VCCS_TCS_1_1.0.0)

1.2 Scope

The following features are covered in this procedure:

Feature ID Feature Description Accessible Role


F001 Credit card validation To validate and differentiate credit User
card number that user input
Table 2.2.1.1 VCCS Covered

1.3 References

The following IEEE standards have been referenced in preparation of this document:

v. IEEE 829-1998 Standard for Software and System Test Documentation


vi. IEEE 829-2008 Standard for Software and System Test Documentation

2 Test Procedure

2.1 Credit Card Validation Test Procedure

Test Procedure ID TP-01-001


Objective Validate credit card number (valid)
Test Cases to Be Executed TC-01-001, TC-01-007, TC-01-008, TC-01-009, TC-01-010
Set Up 1. Input credit card number.
2. Input 13 digits of credit card number and prefix of
credit card number ∈ {4, 5, 37, 6}.
3. Input 14 digits of credit card number and prefix of
credit card number ∈ {4, 5, 37, 6}.

42 | P a g
4. Input 15 digits of credit card number and prefix of
credit card number ∈ {4, 5, 37, 6}.
5. Input 16 digits of credit card number and prefix of
credit card number ∈ {4, 5, 37, 6}.
6. Press ‘Enter’ to validate the credit card number.

Wrap Up 1. Input ‘Y’ to continue validate the credit card.


2. Input ‘N’ to exit the system.
Table 2.2.1.1 Validate Credit Card Number (Valid) Test Procedure

Test Procedure ID TP-01-002


Objective Validate credit card number (invalid)
Test Cases to Be Executed TC-01-002, TC-01-003, TC-01-004, TC-01-005, TC-01-006,
TC-01-011
Set Up 1. Input credit card number.
2. Input 12 digits length of credit card number and
prefix of credit card number ∉ {4, 5, 37, 6}.
3. Input 13 digits length of credit card number and
prefix of credit card number ∉ {4, 5, 37, 6}.
4. Input 14 digits length of credit card number and
prefix of credit card number ∉ {4, 5, 37, 6}.
5. Input 15 digits length of credit card number and
prefix of credit card number ∉ {4, 5, 37, 6}.
6. Input 16 digits length of credit card number and
prefix of credit card number ∉ {4, 5, 37, 6}.
7. Input 17 digits length of credit card number prefix of
credit card number ∉ {4, 5, 37, 6}.
8. Press “Enter” to validate the credit card number.
Wrap Up 1. Input ‘Y’ to continue validate the credit card.
2. Input ‘N’ to exit the system.
Table 2.2.1.2 Validate Credit Card (Invalid) Test Procedure

Test Procedure ID TP-01-003


Objective Continue to validate the credit card number
Test Cases to Be Executed TC-01-012

43 | P a g
Set Up 1. Input credit card number
2. Input ‘Y’ to continue validate the credit card
Wrap Up 1. Input ‘Y’ to continue validate the credit card.
2. Input ‘N’ to exit the system.
Table 2.2.1.3 Continue to Validate Credit Card Test Procedure

Test Procedure ID TP-01-004


Objective Exit the system
Test Cases to Be Executed TC-01-013
Set Up 1. Input credit card number
2. Input ‘N’ to exit the system
Wrap Up None.
Table 2.2.1.4 Exit the System Test Procedure

44 | P a g
TEST REPORT

Validate Credit Card System (VCCS)

Independent Verification and Validation

Version: 1.0.0

Date: 14/07/2020

45 | P a g
Project Title: Validate Credit Card System (VCCS)

Date Description
Prepare Test Basis consists of:
1. Use Case Diagram
13/3/2020 2. Activity Diagram
3. Source Code
4. Decision Table
24/3/2020 Prepare a Test Plan
Prepare a Test Design Specification I
Group Activity: 4/5/2020 1. Equivalence Partition
2. Boundary Value Analysis
Prepare a Test Design Specification II
5/6/2020 1. Decision Table
2. Path Testing
22/6/2020 Prepare Test Identification in Test Design Specification
29/6/2020 Prepare Test Case Specification
5/7/2020 Prepare Test Procedure Specification
14/7/2020 Prepare Test Report

46 | P a g
1 Test Classes
The program that we conducted and tested is about validate credit card based on the input
of the card number. The ValidateCard class consist 9 method which are getDigit(int),
hasValidPrefix(String), isAllDigits(String), isValid(String), isValidLength(String),
main(String[]), sumOfDoubleEvenPlace(String), sumOfOddPlace(String), and type(String).
We execute the Junit ValidateCardTest class based on the test procedure. For Test
Procedure 1, we execute using isValid() and type() method. For Test Procedure 2, we
execute using isValid() method. For Test Procedure 3 and 4, we execute using main(null) to
execute a Main method.

import java.util.Scanner;

public class ValidateCard {


public static void main(String[] args) {
Scanner input = new Scanner(System.in);

char cont = 'Y';


while (cont == 'Y') {

System.out.print("Enter a credit card number as a long integer: ");


String cc = input.next();

if (isValid(cc)) {

System.out.println("The " + type(cc) + " for " + cc + " is


valid");

} else {

System.out.println("The card for " + cc + " is invalid");


}

System.out.println("Do you want to continue? (Y/N)");


String conti = input.next();
cont = conti.charAt(0);

System.out.println("The system end.");


input.close();
}

public static int sumOfDoubleEvenPlace(String number) {


int sum = 0;
for (int i = number.length() - 2; i >= 0; i -= 2) {
int digit = Character.digit(number.charAt(i), 10);
sum += getDigit(digit * 2);
}
return sum;
}

public static int sumOfOddPlace(String number) {


int sum = 0;
for (int i = number.length() - 1; i >= 0; i -= 2) {
47 | P a g
sum += digit;
}
return sum;
}

public static int getDigit(int number) {


String numString = number + "";
int digit;
if (numString.length() == 1) {
digit = number;
} else {
int sum = 0;
for (int i = 0; i < numString.length(); i++) {
sum += Character.digit(numString.charAt(i), 10);
}
digit = sum;
}
return digit;
}

public static boolean isValid(String number) {


boolean valid = true;
if (!isValidLength(number) || !isAllDigits(number)
!hasValidPrefix(number)) {
valid = false;
}
else {
int evens = sumOfDoubleEvenPlace(number);
int odds = sumOfOddPlace(number);
if ((evens + odds) % 10 != 0) {
valid = false;
}
}
return valid;
}

public static boolean isValidLength(String number) {


int length = number.length();
return length >= 13 && length <= 16;
}

public static boolean isAllDigits(String number) {


boolean allDigits = true;
for (int i = 0; i < number.length(); i++) {
char c = number.charAt(i);
if (!Character.isDigit(c)) {
allDigits = false;
break;
}
}
return allDigits;
}

public static boolean hasValidPrefix(String number) {


boolean validPrefix = false;
if (number.startsWith("4") || number.startsWith("5") ||
number.startsWith("37") || number.startsWith("6")) {
validPrefix = true;
}

48 | P a g
return validPrefix;
}

public static String type(String number) {

if (number.startsWith("4")) {
return "Visa card";
}
else if(number.startsWith("5")) {
return "Master card";
}
else if (number.startsWith("37")){
return "America Express card";
}
else {
return "Discover card";
}
}

Figure 1 ValidateCard Code

1.1 Junit Test Class

In Junit, for test condition ‘Display credit card is valid/ invalid’, we called method isValid() and
type() as isValid() method represents the true or false for validity and type() method
represents the type String for credit card name.

1.1.1 Test Procedure 1


@Test
void testProcedure1() {
boolean actOutput1 = ValidateCard.isValid("378734493671000");
String actOutput2 = ValidateCard.type("378734493671000");
boolean actOutput3 = ValidateCard.isValid("4007000000027");
String actOutput4 = ValidateCard.type("4007000000027");
boolean actOutput5 = ValidateCard.isValid("5564745926916989");
String actOutput6 = ValidateCard.type("5564745926916989");
boolean actOutput7 = ValidateCard.isValid("63049506000000");
String actOutput8 = ValidateCard.type("63049506000000");

boolean expOutput1 = true;


String expOutput2 = "America Express card";
boolean expOutput3 = true;
String expOutput4 = "Visa card";
boolean expOutput5 = true;
String expOutput6 = "Master card";
boolean expOutput7 = true;
String expOutput8 = "Discover card";

assertEquals(expOutput1, actOutput1);
assertEquals(expOutput2, actOutput2);
assertEquals(expOutput3, actOutput3);
assertEquals(expOutput4, actOutput4);
assertEquals(expOutput5, actOutput5);

49 | P a g
assertEquals(expOutput6, actOutput6); assertEquals(expOutput7, actOutput7); assertEquals(expOutput8, actOut

}
Figure 1.1.1 Junit Code for Test Procedure 1

Test Procedure TP-01-001


Test Case TC-01-001, TC-01-007, TC-01-008, TC-01-009, TC-01-010
Description Validate credit card number (valid)
Input Expected Output Actual Output Pass/ Fail
378734493671000 isValid = true, isValid = true, Pass
type = “America type = “America Express
Express card” card”
4007000000027 isValid = true, isValid = true, Pass
type = “Visa card” type = “Visa card”
5564745926916989 isValid = true, isValid = true, Pass
type = “Master card” type = “Master card”
63049506000000 isValid = true, isValid = true, Pass
type = “Discover card” type = “Discover card”
Table 1.1.1 Test Report for Test Procedure 1

1.1.2 Test procedure 2


@Test
void testProcedure2() {
boolean actOutput1 = ValidateCard.isValid("555544446666");
boolean actOutput2 = ValidateCard.isValid("255544446666");
boolean actOutput3 = ValidateCard.isValid("23049506000000");
boolean actOutput4 = ValidateCard.isValid("2007000000027");
boolean actOutput5 = ValidateCard.isValid("278734493671000");
boolean actOutput6 = ValidateCard.isValid("2564745926916989");
boolean actOutput7 = ValidateCard.isValid("50000000000000000");
boolean actOutput8 = ValidateCard.isValid("70000000000000000");
boolean actOutput9 = ValidateCard.isValid("888888abcde"); boolean actOutput10 = ValidateCard.isValid("40070000abcde"); b
boolean actOutput14 = ValidateCard.isValid("400ab"); boolean actOutput15 = ValidateCard.isValid("10070"); boolean actOutp
boolean actOutput17 = ValidateCard.isValid("63049507000000");

boolean expOutput1 = false; boolean expOutput2 = false; boolean expOutput3 = false; boolean expOutput4 = false;

50 | P a g
boolean expOutput5 = false; boolean expOutput6 = false; boolean expOutput7 = false; boolean expOutput8 = false; b

assertEquals(expOutput1, actOutput1); assertEquals(expOutput2, actOutput2); assertEquals(expOutput3, actOutput3); assertE

Figure 1.1.2 Junit Code for Test Procedure 2

Test
} Procedure TP-01-002
Test Case TC-01-002, TC-01-003, TC-01-004, TC-01-005, TC-01-006, TC-
01-011
Description Validate credit card number (Invalid)
Input Expected Output Actual Output Pass/ Fail
TC-01-002
555544446666 isValid = False isValid = False Pass
TC-01-003
255544446666 isValid = False isValid = False Pass
TC-01-004
TCON-01-004 isValid = False isValid = False Pass
23049506000000
TCON-01-015 isValid = False isValid = False Pass
2007000000027

51 | P a g
TCON-01-019 isValid = False isValid = False Pass
278734493671000
TCON-01-021 isValid = False isValid = False Pass
2564745926916989
TC-01-005
TCON-01-005 isValid = False isValid = False Pass
50000000000000000
TC-01-006
TCON-01-006 isValid = False isValid = False Pass
70000000000000000
TC-01-011
TCON-01-011 isValid = False isValid = False Pass
888888abcde
TCOV-01-025 isValid = False isValid = False
4000000000007
TCOV-01-026 isValid = False isValid = False Pass
40070000abcde
TCOV-01-027 isValid = False isValid = False Pass
1007000000027
TCOV-01-028 isValid = False isValid = False Pass
10070000abcde
TCOV-01-029 isValid = False isValid = False Pass
40070
TCOV-01-030 isValid = False isValid = False Pass
400ab
TCOV-01-031 isValid = False isValid = False Pass
10070
TCOV-01-032 isValid = False isValid = False Pass
40070
Table 1.1.2 Test Report for Test Procedure 2

1.1.3 Test Procedure 3 and 4

@Test
void testProcedure3and4() {
ValidateCard.main(null);
}
Figure 1.1 Junit Code for Test Procedure 3 and 4 (test main)

52 | P a g
Figure 1.1.3 Input from Console for Test Procedure 3 and 4

Test Procedure TP-01-003


Test Case TC-01-012
Description Continue to validate the credit card number
Input Expected Output Actual Output Pass/ Fail
TC-01-012
Credit card number = The system The system Pass
63049506000000 continues continues
and cont = ‘Y’
Credit card number: The system The system
7777777 and cont = continues continues
‘Y’
Table 1.1.3.1 Test Report for Test Procedure 3

Test Procedure TP-01-004


Test Case TC-01-013
Description Exit the system
Input Expected Output Actual Output Pass/ Fail
TC-01-013
Credit card number = The system ends The system ends Pass
63049506000000
and cont = N
Table 1.1.3.2 Test Report for Test Procedure 4

53 | P a g
1.2 Coverage Information

Figure 1.2 Coverage Information

Figure 1.3 Coverage Information

54 | P a g
2 Conclusion
The Validate Credit Card System (VCCS) is developed using Java Programming
Language. The algorithm used in this project is used to determine whether a credit card
number is entered correctly. The credit card number are generated following this validity
check, commonly known as the Luhn check or the Mod 10 check.

The test is conducted by using black-box testing where test cases are derived using
black- box testing techniques such as boundary value analysis (BVA) and decision table.
We’re also conducted the test by using white-box testing which is basis path testing where
the test case derived from source code of the program. Basis path testing derived a logical
complexity measure of a procedural design. This techniques required a flow graph to
determine the independent paths.

Since this program consists of few methods, we decided to implement basis path
testing to ensure that all statements and conditions have been executed at least once. The
testing is done using Junit tool in Eclipse IDE.

55 | P a g

You might also like