The Meetup Group "Thessaloniki Software Testing and QA" and the Meetup Group "Thessaloniki Verification and Testing Meetup" have organized a joint Meetup Meeting on December 12th in City Collage (Leontos Sofou 3 - Thessaloníki) at 6:00 pm. This is the Automated Test Generation presentation.
Unlocking the Future of AI Agents with Large Language Models
Automated Test Generation
1. Automated Generation of Test
Cases for Software Verification:
Quality Assurance for Service-based
Applications
Dimitris Dranidis
International Faculty of the University of Sheffield
CITY College, Thessaloniki, Greece
December 2017
1
2. 2
Dr Dimitris Dranidis
Senior Lecturer in Computer Science Department
Academic director of postgraduate programmes:
MSc in Advanced Software Engineering
MSc in Management of Business, Innovation and
Technology
Coordinator of the "Software Engineering & Service-Oriented
Technologies" research group
http://www.city.academic.gr/csd/dranidis/
3. Personal research interests
Formal methods
Stream X-machines
Model-based testing
Testing & Run-time
Monitoring
Service-based applications
Certification registry for
SBAs
Educational Informatics
StudentUML
Peer assessment
Development of JSXM
www.jsxm.org
Model-based testing tool
(SXM testing theory)
3
4. Outline
A world of services
Motivation for automated test generation
Model Based Testing
State-based MBT
Stream X-machines
Testing Method
The JSXM testing tool
Features
4
6. Traditional Testing approaches
are not effective!
An application developer can
Guarantee the correctness of internal modules
Unit testing
Integration testing
Fix internal errors
Have control over changes
… but should rely on correctness of external modules:
Testing of external modules is not enough….
Due to uncontrolled change
6
7. Need for Model-based testing -
Fully Automated Test generation
A certification registry should be able to perform the tests
that guarantee service correctness.
The tests should not be provided by the provider
Tests might be incomplete (trust?)
Tests might depend on the implementation
INSTEAD:
The tests must be produced based on the service
specification
Automated generation of tests based on a model
Generation is triggered by the registry
7
10. Service publication &
Service verification by automated testing
service
Certification Registry
Service
spec tests
Automated
generation
10
11. Service advertisement &
Service animation (Sandbox Validation)
service
Certification Registry
Service
spec tests
consumer
Execution
of the model
11
14. Finite Automata
A Finite Automaton consists of:
a set of states Q
a set of inputs Σ
an initial state q0
a set of final states T
a function F: Q x Σ -> Q called the transition (next-
state) function.
Can be represented as state diagrams in which
transitions are labeled with inputs.
14
16. Stream X-Machines
A Stream X-Machine (SXM) is like a FA
with the following differences:
The machine has memory
transitions are labeled with functions that
• operate on inputs and memory
• update the memory and
• produce outputs
16
17. SXM definition
An SXM consists of:
a set of states Q
a set of inputs Σ
a set of outputs Γ
a set M called memory
an initial state q0
an initial memory m0
a set Φ of processing functions, where each φ in Φ:
• φ : Σ x M -> Γ x M
a function F: Q x Φ -> Q called the transition function.
17
18. Processing functions
A processing function consists of:
A guard condition depending on the input and
the memory
An effect which
• changes the memory and
• produces an output
18
19. SXM Account
Open(b, open()) = (openOut, 0)
Deposit(b, deposit(a)) = (depositOut, b + a)
Withdraw(b, withdraw(a)) =(withdrawOut, b - a) if a<b
WithdrawAll(b, withdraw(a)) =(withdrawOut, 0) if a=b
Close(b, close()) = (closeOut, b)
19
Initial Memory
b = 0
21. SXM Testing method:
Verification by testing
A finite test set is produced
based on a generalization of the W-method
Execution of tests guarantees:
Implementation conforms to the Model
21
22. Design-for-test conditions
Taken from control theory
Controllability
The ability to move a system in its state space
by admissible inputs
Observability
The ability to determine the system state (or
behaviour) by using the inputs and the outputs
22
23. W-method (Chow)
Applied on the associated finite automaton
A = (Φ, Q, F, q0)
State cover S:
A set of sequences such that all states are reachable
from the initial state.
Characterization set W:
a set of sequences for which any two distinct states of
the automaton are distinguishable.
23
24. W-method Test Set
Test Set Yk of the associated automaton.
Yk = S.
Φk+1.
W
A test set consists of sequences of processing functions
that are able to:
Reach every state by applying the state cover
sequences;
apply all tuples of functions of maximum length k+1;
and distinguish the resulting state by applying the
characterisation set sequences.
24
25. Discovered errors
The SXM testing method can discover:
Missing states
Extra states
Missing transitions
Extra transitions
25
36. JSXM Latest Features
Constraint Logic Programming (CLP)
automates test values generation
Complete GUI editor in Eclipse platform
Live editing of Diagram/XML specification
Validation of syntax
Quick fixes for frequent problems
36
37. JSXM Latest Features
Automated generation of realizable State-Cover
Based on CLP integration
Automated completion of the specification by
adding all necessary error self-transitions
Based on CLP integration
Generation of Adapter classes for testing
37
38. Future research work
Testing of Web applications
Evaluation of JSXM in a large scale project
38