TABLE OF CONTENTS
TEST Strategy ................................................................................................................................. 2
Scope .........................................................................................................................................................2
Test levels .............................................................................................................................................................2
Test types ..............................................................................................................................................................2
Features ................................................................................................................................................................3
Strategy .....................................................................................................................................................3
Framework architect..............................................................................................................................................3
Build tool ...............................................................................................................................................................4
UI functionals automation testing ..........................................................................................................................4
API functionals automation testing .......................................................................................................................7
Configurations .....................................................................................................................................................10
Utils .....................................................................................................................................................................10
Duong Trinh | Ho Chi Minh | Viet Nam
TEST STRATEGY
The test strategy to verify the correctness and define the quality of Citizen Disbursement
System.
SCOPE
Test levels
Level Is Covered
Unit Testing X
Integration Testing X
System Testing ✓
Acceptance Testing X
Test types
Type Is Covered
Functional testing ✓ API Functionals, UI Functionals
Non-functional testing X
Structure testing X
Change related testing X
2
Features
UI features
• Upload heroes into system Citizen Disbursement System
• Calculate tax relief of heroes
• Dispense tax relief for working class heroes
API features
• Insert single record: /calculator/insert
• Insert multiple records: /calculator/insertMultiple
• Get all records: /calculator/taxRelief
STRATEGY
Framework architect
3
Build tool
Gradle is used for build and manage dependencies in this framework.
UI functionals automation testing
Technical in use
• Selenium 4.3.0: UI automation
• Cucumber 7.0.0: BDD test cases
• Web driver manage 5.2.1: Driver management
• Extent report: Custom report
Architecture
4
Driver
• FwBrowserFasctory is the browser provider of the framework. Based on the configuration
for the test, it will create an instance of the following browsers: Chrome, Firefox, Edge,
Safari
• FwDriverManager is used for handling the state and behavior of the driver after creating
by FwDriverFactory
• FwTargetFactory is used for determining the environment of browser where the browser
start (local or remote)
Exceptions
The exceptions are used for handle runtime exceptions during test execution
Scripts
• Data includes the classes used for data model configuration
• Hooks is the configuration for precondition and postcondition when executing Cucumber
test cases
• Step definition includes the bulk of Cucumber step definitions, that simulate the behaviors
of the end user on UI
• Pages include classes represented for the actual page on UI following the Page Object
Model pattern
• Cucumber features are the test cases file written following Gherkin syntax
5
Test case file sample
6
Test report sample
API functionals automation testing
The data-driven API testing framework with the dynamic test cases is defined in the JSON file. It
is able to automatically read all test case files from provided directory or single file.
Technical in use
rest-assured:5.1.1
junit-jupiter:5.8.2
7
Architecture
Loader
Loader handles tasks that read the test case file from a given folder or file. It makes a completed
test case base on the general configs and the test case configs. the configs inside the test case
have high priority than the config in the general config, therefor it will override the configs of
general configs if it existed.
Models
The models include all data models use to build the dynamic test cases, serialization,
deserializations.
Validators
The validators are all built-in validators use to verify the API's response including header and
body
8
Test worker
Worker has responsibility to create the dynamic test cases which are the inputs of JUnit test
engine.
Test case file sample
9
Test report sample
Configurations
The configurations use the Spring Test Library to share state, dependency injection, and
environment management. It provides abilities to easily switch environments when execution
test.
Utils
Ultis provide the common tasks for both UI and API framework such as FileUtils, Data
preparation.
10