Automated engineering of domain-specific metamorphic testing environments

Pablo Gómez Abajo
Pablo Gómez AbajoResearch Project Associate à Universidad Autónoma de Madrid
www.uam.es
Automated engineering
of domain-specific
metamorphic testing environments
Pablo Gómez-Abajo1, Pablo C. Cañizares1, Alberto Núñez2,
Esther Guerra1 and Juan de Lara1
1Universidad Autónoma de Madrid, Madrid, Spain
2Universidad Complutense de Madrid, Madrid, Spain
www.uam.es
Publication
• "Automated engineering of domain-specific metamorphic testing
environments". Pablo Gómez-Abajo, Pablo C. Cañizares, Alberto Núñez,
Esther Guerra, Juan de Lara. In Information and Software Technology
(Elsevier). Volume 157, May 2023, 107164. JCR 3.9 - Q2 - Position:
29/108 - Area: Computer Science / Software Engineering. 2022.
1/21
www.uam.es
Motivation
• Testing is essential to improve the correctness of software
systems
• Metamorphic testing (MT) is an approach suited when
• The system under test lacks oracles
• They are expensive to compute
• However
• Building an MT environment for a particular domain requires
substantial effort
• e.g., cloud simulation, model transformation, machine learning, etc.
2/21
www.uam.es
Metamorphic Testing
• MT uses metamorphic relations (MRs) to determine if the
execution of the test cases is correct
• MT studies the relations between test inputs and the resulting
outputs
• Calculating the sum of two numbers sum(a, b), we may define
the MR
• For a = 1, b = 6, we may generate the follow-ups
• c = 2, d = 5, x = 3
MRi If the result of two sums are equal, then sum(a, b) = sum(c, d) =>
MRo
The result of the same sums but increasing the first
operand by an arbitrary number x should be equal
sum(sum(a, x), b) = sum(sum(c, x), d)
• c = 6, d = 1, x = 0 • ...
3/21
www.uam.es
Proposal
• We propose an MDE approach to automate the construction of MT
environments
• Our approach starts from …
• A meta-model capturing the domain concepts
• A description of the domain execution environment
• … and produces an MT environment that supports the full MT process
• Definition and evaluation of domain-specific MRs
• Detailed reporting of the testing results
• Automated search-based generation of follow-up test cases
4/21
www.uam.es
Proposal
• We propose an MDE approach to automate the construction of MT
environments
• Our approach starts from …
• A meta-model capturing the domain concepts
• A description of the domain execution environment
• … and produces an MT environment that supports the full MT process
• Definition and evaluation of domain-specific MRs
• Detailed reporting of the testing results
• Automated search-based generation of follow-up test cases
Gotten
4/21
www.uam.es
Overview
Application
expert
Create
domain MMs
Define SuT(s)
execution
start
EMF
ext.
point
Domain
expert
Define MRs
Fine-tune
follow-up
generation
mrDSL
fowDSL
Create input
test cases
Generate
follow-ups
Metamorphic
testing
Define MRs
satisfactory
results?
end
Tester
[yes]
[no]
GOTTEN GOTTEN
5/21
www.uam.es
Running example: Cloud simulators
6/21
www.uam.es
1. metamodel datacentre "/sample.gotten/model/datac.ecore" with m1, m2
2. models "/sample.gotten/model/dcmodels"
3. metamodel workload "/sample.gotten/model/workload.ecore" with w1, w2
4. models "/sample.gotten/model/workloads"
5.
6. datacentre input Features {
7. context DataCentre def: CPU: Int = racks->collect
8. (numBoards*board.nodesPerBoard*board.nodeType.CPUCores*board.nodeType.CPUSpeed)->sum()
9. context DataCentre def: NMachines: Int = racks->collect
10. (numBoards*board.nodesPerBoard*board.nodeType.CPUCores)->sum()
11. ...
12. }
13. workload input Features {
14. context WorkloadSet def: Workload: Set = workloads->collect(Traces)
15. }
16. output Features {
17. Time : Long
18. Energy : Long
19. }
20. Processor {
21. Name: String
22. Version: String
23. }
24. MetamorphicRelations {
25. MR1 = [(( CPU(m1) > CPU(m2) ) and ((w1) == (w2)) ) implies ((Energy(m1) <= Energy(m2)))]
26. MR2 = [(( NMachines(m1) > NMachines(m2)) and ((w1) == (w2)) )
27. implies ((NMachines(m1)/NMachines(m2)) >= (Energy(m1)/Energy(m2)))]
28. ...
29. }
The mrDSL: Specification of MRs
7/21
www.uam.es
1. followups for datacentre using MR1
2. with source path = "/sample.gotten/model/dcmodels"
3. and output folder = "/sample.gotten/model/dcmodels"
4.
5. CPU -> decrease [1] NodeType.CPUCores keeping {NodeType.CPUCores > 0};
6. decrease [10] NodeType.CPUSpeed keeping {NodeType.CPUSpeed > 0}
7.
8. maximize ( CPU(m1) - CPU(m2) )
9.
10. maxSolutions 50
11. iterations 1
12. algorithms [Random, NSGAII, NSGAIII, eMOEA]
The fowDSL: Configuration of follow-ups
generation
8/21
www.uam.es
The Gotten architecture
GOTTEN
CORE
MOMOT
Processor
Dissect
CloudSim
Input test
models
Follow-up
test models
MOMOT
programs
HENSHIN
rules
mrDSL
spec.
fowDSL
configs.
MT
interactive
report
GOTTEN
1
2
4
3
5
6
8
CloudSim
processor
Dissect
processor
7 7
9/21
www.uam.es
2
3
1
4
5
6
7
The Gotten tool
10/21
www.uam.es
Evaluation
RQ1: Effectiveness of Gotten
Comparison with FwCloudMeT
RQ2: Suitability of generated MT tools
Perform a full MT process for the cloud simulation
domain and obtain similar results to an ad-hoc solution
RQ3: Case studies in other domains
Gotten for cloud simulators and video streaming APIs
11/21
www.uam.es
RQ1: Effectiveness of Gotten to
specify MT environments (1/3)
Subsystem
Dissect CloudSimStorage
FwCloudMeT Gotten FwCloudMeT Gotten
Engine 4341 574 4415 539
MRs 3174 10 3207 10
Follow-ups 2480 20 2513 20
Executor
(processor)
2254 564 2328 509
Total 12249 1168 12463 1078
LoC
12/21
www.uam.es
RQ1: Effectiveness of Gotten to
specify MT environments (1/3)
Subsystem
Dissect CloudSimStorage
FwCloudMeT Gotten FwCloudMeT Gotten
Engine 4341 574 4415 539
MRs 3174 10 3207 10
Follow-ups 2480 20 2513 20
Executor
(processor)
2254 564 2328 509
Total 12249 1168 12463 1078
• A new processor in Gotten required around 1100 LoC
• A new processor in FwCloudMeT required one order
of magnitude more code (around 12000 LoC)
13/21
www.uam.es
RQ2: Suitability of Gotten environments for MT (2/3)
MR1
MR1i
The cloud 𝑚1 has a better CPU system than 𝑚2. The workloads 𝜔1 and 𝜔2 are equal
𝑀𝑅1𝑖 = [ CPU(m1) > CPU(m2) and w1 == w2 ]
MR1o
The energy required to execute 𝜔1 over 𝑚1 should be less than or equal to the energy required to execute 𝜔2 over
𝑚2
𝑀𝑅1𝑜 = [ Energy(m1) <= Energy(m2) ]
MR2
MR2i
The cloud 𝑚1 contains more physical machines than the cloud 𝑚2. The workloads 𝜔1 and 𝜔2 are equal
𝑀𝑅2𝑖 = [ NMachines(m1) > NMachines(m2) and w1 == w2 ]
MR2o
The ratio between the number of machines of 𝑚1 and 𝑚2 should be greater than or equal to the ratio between the
energy consumption required to execute 𝜔1 over 𝑚1 and the one required to execute 𝜔2 over 𝑚2
𝑀𝑅2𝑜 = [ NMachines(m1) / NMachines(m2) >= Energy(m1) / Energy(m2) ]
MR3
MR3i
The cloud 𝑚1 has a better storage system than 𝑚2. The workloads 𝜔1 and 𝜔2 are equal
𝑀𝑅3𝑖 = [ Storage(m1) > Storage(m2) and w1 == w2 ]
MR3o
The time required to execute 𝜔1 over 𝑚1 should be less than or equal to the time required to execute 𝜔2 over 𝑚2
𝑀𝑅3𝑜 = [ Time(m1) <= Time(m2) ]
14/21
www.uam.es
RQ2: Suitability of Gotten environments for MT (2/3)
MR4
MR4i
The cloud 𝑚1 has a better network system than 𝑚2. The workloads 𝜔1 and 𝜔2 are equal
𝑀𝑅4𝑖 = [ Network(m1) > Network(m2) and w1 == w2 ]
MR4o
The time required to execute 𝜔1 over 𝑚1 should be less than or equal to the time required to execute 𝜔2 over 𝑚2
𝑀𝑅4𝑜 = [ Time(m1) <= Time(m2) ]
MR5
MR5i
The cloud 𝑚1 has a better memory system than 𝑚2. The workloads 𝜔1 and 𝜔2 are equal
𝑀𝑅5𝑖 = [ Memory(m1) > Memory(m2) and w1 == w2 ]
MR5o
The time required to execute 𝜔1 over 𝑚1 should be less than or equal to the time required to execute 𝜔2 over 𝑚2
𝑀𝑅5𝑜 = [ Time(m1) <= Time(m2) ]
MR6
MR6i
The clouds 𝑚1 and 𝑚2 are equal. The workload 𝜔1 contains 𝜔2
𝑀𝑅6𝑖 = [ m1 == m2 and Workload(w1)−>includes(Workload(w2)) ]
MR6o
The time required to execute 𝜔2 over 𝑚2 should be less than or equal to the time required to execute 𝜔1 over 𝑚1
𝑀𝑅6𝑜 = [ Time(m2) <= Time(m1) ]
15/21
www.uam.es
Environment Simulator MR1 MR2 MR3 MR4 MR5 MR6
Original results
CloudSim 100 40 100 100 0 100
Dissect 100 51 100 99 0 100
Gotten
CloudSim 100 45 100 100 0 100
Dissect 100 80 100 100 0 100
• Both tools agree that the two simulators satisfy MR1, MR3,
MR4, and MR6, but not MR5
• Regarding MR2, it differs because
• The nature of the test generation algorithms (search vs. heuristics)
• The relation between the ratios of the physical machines and energy
consumption is not met in the simulated environments as we expected
RQ2: Suitability of Gotten environments
for MT (2/3)
16/21
www.uam.es
Environment Simulator MR1 MR2 MR3 MR4 MR5 MR6
Original results
CloudSim 100 40 100 100 0 100
Dissect 100 51 100 99 0 100
Gotten
CloudSim 100 45 100 100 0 100
Dissect 100 80 100 100 0 100
• We could perform a full MT process for the cloud simulation
domain using a Gotten environment
• Our results are in line with those obtained with FwCloudMeT, a
specific tool for MT of cloud simulators
RQ2: Suitability of Gotten environments
for MT (2/3)
17/21
www.uam.es
• Gotten for Video Streaming APIs
RQ3: MT environments for different
domains (3/3)
18/21
www.uam.es
RQ3: MT environments for different
domains (3/3)
• We could create MT environments for different
domains using Gotten
• We could define an infrastructure enabling the reuse of
• The meta-model
• The test cases
• The catalogue of MRs for different SuTs
19/21
www.uam.es
• Gotten automates the construction of MT environments
for any domain
• Our approach offers
• Two DSLs to describe MRs
• Strategies for generating follow-ups
• An extension point to connect the MT environment with the
SuT
Conclusions
20/21
www.uam.es
• We will improve the follow-ups generation process to
support more powerful synthesis of strings
• e.g., using Wordnet
• We are currently extending the mrDSL language with
more primitives
• We also plan to use Gotten for MT in typical MDE
tasks
• Model transformation
• Code generation
Future work
21/21
www.uam.es
https://g0tten.github.io/gotten/
www.uam.es
Example: Video Streaming APIs
www.uam.es
1. metamodel videostream "/video/model/VideoStream.ecore" with m1, m2
2. models "/video/model/videotc"
3.
4. videostream input Features {
5. context VideoAPITest def: IsFullSearch: Boolean =
6. (request.oclIsTypeOf(SearchVideo)
7. and request.oclAsType(SearchVideo).maxResults = -1)
8. context SearchVideo def: SearchOrder: Int = orderType
9. context SearchVideo def: UntilYear: Int = until.year
10. context SearchVideo def: FromYear: Int = from.year
11. context SearchVideo def: Radius: Double = position.radius
12. }
13. output Features {
14. NVideos : Long
15. Results: Set
16. }
17. Processor {
18. Name: String
19. Version: String
20. }
21. MetamorphicRelations {
22. MR1 = [(IsFullSearch(m1) and (SearchOrder(m1) <> SearchOrder(m2)))
23. implies (NVideos(m1) == NVideos(m2))]
24. MR2 = [(IsFullSearch(m1) and (UntilYear(m1) < FromYear(m2)))
25. implies (Results(m1)->excludes(Results(m2)))]
26. MR3 = [(IsFullSearch(m1) and (Radius(m1) > Radius(m2)))
27. implies (Results(m1)->includes(Results(m2)))]
28. }
The mrDSL: Specification of MRs
www.uam.es
1. followups for videostream using MR1
2. with source path = "/video/model/videotc"
3. and output folder = "/video/model/videotc"
4.
5. SearchOrder -> require SearchVideo.orderType <> NONE
6.
7. maximize (SearchOrder(m2) - SearchOrder(m1))
8.
9. maxSolutions 3
10. iterations 1
11. algorithms [Random, NSGAII, NSGAIII, eMOEA]
The fowDSL: Configuration of follow-ups
generation
www.uam.es
The Gotten architecture
GOTTEN
CORE
MOMOT
Processor
Vimeo
Youtube
Input test
models
Follow-up
test models
MOMOT
programs
HENSHIN
rules
mrDSL
spec.
fowDSL
configs.
MT
interactive
report
GOTTEN
1
2
4
3
5
6
8
Youtube
API
Vimeo
API
7 7
1 sur 28

Recommandé

Cloudsim & greencloud par
Cloudsim & greencloud Cloudsim & greencloud
Cloudsim & greencloud nedamaleki87
6.8K vues35 diapositives
Crash course on data streaming (with examples using Apache Flink) par
Crash course on data streaming (with examples using Apache Flink)Crash course on data streaming (with examples using Apache Flink)
Crash course on data streaming (with examples using Apache Flink)Vincenzo Gulisano
255 vues120 diapositives
Processing Rasters from Satellites, Drones, & More par
Processing Rasters from Satellites, Drones, & MoreProcessing Rasters from Satellites, Drones, & More
Processing Rasters from Satellites, Drones, & MoreSafe Software
4.5K vues25 diapositives
Fog Computing for Dummies par
Fog Computing for Dummies Fog Computing for Dummies
Fog Computing for Dummies FogGuru MSCA Project
50 vues36 diapositives
Cloudsim & Green Cloud par
Cloudsim & Green CloudCloudsim & Green Cloud
Cloudsim & Green CloudNeda Maleki
3.2K vues35 diapositives
Analysis Of Matrix Multiplication Computational Methods par
Analysis Of Matrix Multiplication Computational MethodsAnalysis Of Matrix Multiplication Computational Methods
Analysis Of Matrix Multiplication Computational MethodsJoe Andelija
3 vues9 diapositives

Contenu connexe

Similaire à Automated engineering of domain-specific metamorphic testing environments

Simulation of Heterogeneous Cloud Infrastructures par
Simulation of Heterogeneous Cloud InfrastructuresSimulation of Heterogeneous Cloud Infrastructures
Simulation of Heterogeneous Cloud InfrastructuresCloudLightning
110 vues23 diapositives
Exploring the capabilities of the tight integration of HyperWorks and ESAComp par
Exploring the capabilities of the tight integration of HyperWorks and ESACompExploring the capabilities of the tight integration of HyperWorks and ESAComp
Exploring the capabilities of the tight integration of HyperWorks and ESACompAltair
860 vues18 diapositives
Pretzel: optimized Machine Learning framework for low-latency and high throug... par
Pretzel: optimized Machine Learning framework for low-latency and high throug...Pretzel: optimized Machine Learning framework for low-latency and high throug...
Pretzel: optimized Machine Learning framework for low-latency and high throug...NECST Lab @ Politecnico di Milano
128 vues24 diapositives
Seismotech_2020_eng par
Seismotech_2020_engSeismotech_2020_eng
Seismotech_2020_engInna Solovyova
30 vues32 diapositives
Implementation and Optimization of FDTD Kernels by Using Cache-Aware Time-Ske... par
Implementation and Optimization of FDTD Kernels by Using Cache-Aware Time-Ske...Implementation and Optimization of FDTD Kernels by Using Cache-Aware Time-Ske...
Implementation and Optimization of FDTD Kernels by Using Cache-Aware Time-Ske...Serhan
324 vues35 diapositives
3GPP SON Series: Minimization of Drive Testing (MDT) par
3GPP SON Series: Minimization of Drive Testing (MDT)3GPP SON Series: Minimization of Drive Testing (MDT)
3GPP SON Series: Minimization of Drive Testing (MDT)3G4G
1.5K vues13 diapositives

Similaire à Automated engineering of domain-specific metamorphic testing environments(20)

Simulation of Heterogeneous Cloud Infrastructures par CloudLightning
Simulation of Heterogeneous Cloud InfrastructuresSimulation of Heterogeneous Cloud Infrastructures
Simulation of Heterogeneous Cloud Infrastructures
CloudLightning110 vues
Exploring the capabilities of the tight integration of HyperWorks and ESAComp par Altair
Exploring the capabilities of the tight integration of HyperWorks and ESACompExploring the capabilities of the tight integration of HyperWorks and ESAComp
Exploring the capabilities of the tight integration of HyperWorks and ESAComp
Altair860 vues
Implementation and Optimization of FDTD Kernels by Using Cache-Aware Time-Ske... par Serhan
Implementation and Optimization of FDTD Kernels by Using Cache-Aware Time-Ske...Implementation and Optimization of FDTD Kernels by Using Cache-Aware Time-Ske...
Implementation and Optimization of FDTD Kernels by Using Cache-Aware Time-Ske...
Serhan 324 vues
3GPP SON Series: Minimization of Drive Testing (MDT) par 3G4G
3GPP SON Series: Minimization of Drive Testing (MDT)3GPP SON Series: Minimization of Drive Testing (MDT)
3GPP SON Series: Minimization of Drive Testing (MDT)
3G4G1.5K vues
Presented by Ahmed Abdulhakim Al-Absi - Scaling map reduce applications acro... par Absi Ahmed
Presented by Ahmed Abdulhakim Al-Absi -  Scaling map reduce applications acro...Presented by Ahmed Abdulhakim Al-Absi -  Scaling map reduce applications acro...
Presented by Ahmed Abdulhakim Al-Absi - Scaling map reduce applications acro...
Absi Ahmed1K vues
Application of local search methods for solving a quadratic assignment proble... par Gurdal Ertek
Application of local search methods for solving a quadratic assignment proble...Application of local search methods for solving a quadratic assignment proble...
Application of local search methods for solving a quadratic assignment proble...
Gurdal Ertek28 vues
Simulating Heterogeneous Resources in CloudLightning par CloudLightning
Simulating Heterogeneous Resources in CloudLightningSimulating Heterogeneous Resources in CloudLightning
Simulating Heterogeneous Resources in CloudLightning
CloudLightning660 vues
Performance comparison of row per slave and rows set per slave method in pvm ... par eSAT Journals
Performance comparison of row per slave and rows set per slave method in pvm ...Performance comparison of row per slave and rows set per slave method in pvm ...
Performance comparison of row per slave and rows set per slave method in pvm ...
eSAT Journals67 vues
Comprehensive Performance Evaluation on Multiplication of Matrices using MPI par ijtsrd
Comprehensive Performance Evaluation on Multiplication of Matrices using MPIComprehensive Performance Evaluation on Multiplication of Matrices using MPI
Comprehensive Performance Evaluation on Multiplication of Matrices using MPI
ijtsrd21 vues
Scaling Monitoring At Databricks From Prometheus to M3 par LibbySchulze
Scaling Monitoring At Databricks From Prometheus to M3Scaling Monitoring At Databricks From Prometheus to M3
Scaling Monitoring At Databricks From Prometheus to M3
LibbySchulze292 vues
Supporting bioinformatics applications with hybrid multi-cloud services par Ahmed Abdullah
Supporting bioinformatics applications with hybrid multi-cloud servicesSupporting bioinformatics applications with hybrid multi-cloud services
Supporting bioinformatics applications with hybrid multi-cloud services
Ahmed Abdullah948 vues

Plus de Pablo Gómez Abajo

Wodel-Edu: A tool for the generation and evaluation of diagram-based exercises par
Wodel-Edu: A tool for the generation and evaluation of diagram-based exercisesWodel-Edu: A tool for the generation and evaluation of diagram-based exercises
Wodel-Edu: A tool for the generation and evaluation of diagram-based exercisesPablo Gómez Abajo
7 vues20 diapositives
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing par
Wodel-Test: A Model-Based Framework for Language-Independent Mutation TestingWodel-Test: A Model-Based Framework for Language-Independent Mutation Testing
Wodel-Test: A Model-Based Framework for Language-Independent Mutation TestingPablo Gómez Abajo
181 vues17 diapositives
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing... par
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing...Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing...
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing...Pablo Gómez Abajo
415 vues16 diapositives
Wodel-Edu: An MDE Solution for the Generation and Evaluation of Diagram-based... par
Wodel-Edu: An MDE Solution for the Generation and Evaluation of Diagram-based...Wodel-Edu: An MDE Solution for the Generation and Evaluation of Diagram-based...
Wodel-Edu: An MDE Solution for the Generation and Evaluation of Diagram-based...Pablo Gómez Abajo
123 vues10 diapositives
Generation of mutation testing tools with Wodel-Test par
Generation of mutation testing tools with Wodel-TestGeneration of mutation testing tools with Wodel-Test
Generation of mutation testing tools with Wodel-TestPablo Gómez Abajo
67 vues13 diapositives
Programación de macros en Microsoft Excel VBA par
Programación de macros en Microsoft Excel VBAProgramación de macros en Microsoft Excel VBA
Programación de macros en Microsoft Excel VBAPablo Gómez Abajo
160 vues8 diapositives

Plus de Pablo Gómez Abajo(14)

Wodel-Edu: A tool for the generation and evaluation of diagram-based exercises par Pablo Gómez Abajo
Wodel-Edu: A tool for the generation and evaluation of diagram-based exercisesWodel-Edu: A tool for the generation and evaluation of diagram-based exercises
Wodel-Edu: A tool for the generation and evaluation of diagram-based exercises
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing par Pablo Gómez Abajo
Wodel-Test: A Model-Based Framework for Language-Independent Mutation TestingWodel-Test: A Model-Based Framework for Language-Independent Mutation Testing
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing... par Pablo Gómez Abajo
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing...Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing...
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing...
Wodel-Edu: An MDE Solution for the Generation and Evaluation of Diagram-based... par Pablo Gómez Abajo
Wodel-Edu: An MDE Solution for the Generation and Evaluation of Diagram-based...Wodel-Edu: An MDE Solution for the Generation and Evaluation of Diagram-based...
Wodel-Edu: An MDE Solution for the Generation and Evaluation of Diagram-based...
Generation of mutation testing tools with Wodel-Test par Pablo Gómez Abajo
Generation of mutation testing tools with Wodel-TestGeneration of mutation testing tools with Wodel-Test
Generation of mutation testing tools with Wodel-Test
Seed Model Synthesis for Testing Model-based Mutation Operators par Pablo Gómez Abajo
Seed Model Synthesis for Testing Model-based Mutation OperatorsSeed Model Synthesis for Testing Model-based Mutation Operators
Seed Model Synthesis for Testing Model-based Mutation Operators
Towards a model-driven engineering solution for language independent mutation... par Pablo Gómez Abajo
Towards a model-driven engineering solution for language independent mutation...Towards a model-driven engineering solution for language independent mutation...
Towards a model-driven engineering solution for language independent mutation...
Wodel: A DSL for Model Mutation; and Wodel-Edu: its Application to the Automa... par Pablo Gómez Abajo
Wodel: A DSL for Model Mutation; and Wodel-Edu: its Application to the Automa...Wodel: A DSL for Model Mutation; and Wodel-Edu: its Application to the Automa...
Wodel: A DSL for Model Mutation; and Wodel-Edu: its Application to the Automa...
A DSL for Model Mutation and its Applications to Different Domains par Pablo Gómez Abajo
A DSL for Model Mutation and its Applications to Different DomainsA DSL for Model Mutation and its Applications to Different Domains
A DSL for Model Mutation and its Applications to Different Domains
Un framework para la generación automática de ejercicios mediante técnicas de... par Pablo Gómez Abajo
Un framework para la generación automática de ejercicios mediante técnicas de...Un framework para la generación automática de ejercicios mediante técnicas de...
Un framework para la generación automática de ejercicios mediante técnicas de...
Wodel: A Domain-Specific Language for Model Mutation par Pablo Gómez Abajo
Wodel: A Domain-Specific Language for Model MutationWodel: A Domain-Specific Language for Model Mutation
Wodel: A Domain-Specific Language for Model Mutation

Dernier

PRINCIPLES-OF ASSESSMENT par
PRINCIPLES-OF ASSESSMENTPRINCIPLES-OF ASSESSMENT
PRINCIPLES-OF ASSESSMENTrbalmagro
12 vues12 diapositives
Distinct distributions of elliptical and disk galaxies across the Local Super... par
Distinct distributions of elliptical and disk galaxies across the Local Super...Distinct distributions of elliptical and disk galaxies across the Local Super...
Distinct distributions of elliptical and disk galaxies across the Local Super...Sérgio Sacani
31 vues12 diapositives
himalay baruah acid fast staining.pptx par
himalay baruah acid fast staining.pptxhimalay baruah acid fast staining.pptx
himalay baruah acid fast staining.pptxHimalayBaruah
7 vues16 diapositives
POSTER IV LAWCN_ROVER_IUE.pdf par
POSTER IV LAWCN_ROVER_IUE.pdfPOSTER IV LAWCN_ROVER_IUE.pdf
POSTER IV LAWCN_ROVER_IUE.pdfSOCIEDAD JULIO GARAVITO
9 vues1 diapositive
RemeOs science and clinical evidence par
RemeOs science and clinical evidenceRemeOs science and clinical evidence
RemeOs science and clinical evidencePetrusViitanen1
37 vues96 diapositives
별헤는 사람들 2023년 12월호 전명원 교수 자료 par
별헤는 사람들 2023년 12월호 전명원 교수 자료별헤는 사람들 2023년 12월호 전명원 교수 자료
별헤는 사람들 2023년 12월호 전명원 교수 자료sciencepeople
41 vues30 diapositives

Dernier(20)

PRINCIPLES-OF ASSESSMENT par rbalmagro
PRINCIPLES-OF ASSESSMENTPRINCIPLES-OF ASSESSMENT
PRINCIPLES-OF ASSESSMENT
rbalmagro12 vues
Distinct distributions of elliptical and disk galaxies across the Local Super... par Sérgio Sacani
Distinct distributions of elliptical and disk galaxies across the Local Super...Distinct distributions of elliptical and disk galaxies across the Local Super...
Distinct distributions of elliptical and disk galaxies across the Local Super...
Sérgio Sacani31 vues
himalay baruah acid fast staining.pptx par HimalayBaruah
himalay baruah acid fast staining.pptxhimalay baruah acid fast staining.pptx
himalay baruah acid fast staining.pptx
HimalayBaruah7 vues
별헤는 사람들 2023년 12월호 전명원 교수 자료 par sciencepeople
별헤는 사람들 2023년 12월호 전명원 교수 자료별헤는 사람들 2023년 12월호 전명원 교수 자료
별헤는 사람들 2023년 12월호 전명원 교수 자료
sciencepeople41 vues
Small ruminant keepers’ knowledge, attitudes and practices towards peste des ... par ILRI
Small ruminant keepers’ knowledge, attitudes and practices towards peste des ...Small ruminant keepers’ knowledge, attitudes and practices towards peste des ...
Small ruminant keepers’ knowledge, attitudes and practices towards peste des ...
ILRI5 vues
Small ruminant keepers’ knowledge, attitudes and practices towards peste des ... par ILRI
Small ruminant keepers’ knowledge, attitudes and practices towards peste des ...Small ruminant keepers’ knowledge, attitudes and practices towards peste des ...
Small ruminant keepers’ knowledge, attitudes and practices towards peste des ...
ILRI5 vues
Open Access Publishing in Astrophysics par Peter Coles
Open Access Publishing in AstrophysicsOpen Access Publishing in Astrophysics
Open Access Publishing in Astrophysics
Peter Coles906 vues
How to be(come) a successful PhD student par Tom Mens
How to be(come) a successful PhD studentHow to be(come) a successful PhD student
How to be(come) a successful PhD student
Tom Mens491 vues
"How can I develop my learning path in bioinformatics? par Bioinformy
"How can I develop my learning path in bioinformatics?"How can I develop my learning path in bioinformatics?
"How can I develop my learning path in bioinformatics?
Bioinformy24 vues
A Ready-to-Analyze High-Plex Spatial Signature Development Workflow for Cance... par InsideScientific
A Ready-to-Analyze High-Plex Spatial Signature Development Workflow for Cance...A Ready-to-Analyze High-Plex Spatial Signature Development Workflow for Cance...
A Ready-to-Analyze High-Plex Spatial Signature Development Workflow for Cance...
CSF -SHEEBA.D presentation.pptx par SheebaD7
CSF -SHEEBA.D presentation.pptxCSF -SHEEBA.D presentation.pptx
CSF -SHEEBA.D presentation.pptx
SheebaD714 vues
Conventional and non-conventional methods for improvement of cucurbits.pptx par gandhi976
Conventional and non-conventional methods for improvement of cucurbits.pptxConventional and non-conventional methods for improvement of cucurbits.pptx
Conventional and non-conventional methods for improvement of cucurbits.pptx
gandhi97619 vues

Automated engineering of domain-specific metamorphic testing environments

  • 1. www.uam.es Automated engineering of domain-specific metamorphic testing environments Pablo Gómez-Abajo1, Pablo C. Cañizares1, Alberto Núñez2, Esther Guerra1 and Juan de Lara1 1Universidad Autónoma de Madrid, Madrid, Spain 2Universidad Complutense de Madrid, Madrid, Spain
  • 2. www.uam.es Publication • "Automated engineering of domain-specific metamorphic testing environments". Pablo Gómez-Abajo, Pablo C. Cañizares, Alberto Núñez, Esther Guerra, Juan de Lara. In Information and Software Technology (Elsevier). Volume 157, May 2023, 107164. JCR 3.9 - Q2 - Position: 29/108 - Area: Computer Science / Software Engineering. 2022. 1/21
  • 3. www.uam.es Motivation • Testing is essential to improve the correctness of software systems • Metamorphic testing (MT) is an approach suited when • The system under test lacks oracles • They are expensive to compute • However • Building an MT environment for a particular domain requires substantial effort • e.g., cloud simulation, model transformation, machine learning, etc. 2/21
  • 4. www.uam.es Metamorphic Testing • MT uses metamorphic relations (MRs) to determine if the execution of the test cases is correct • MT studies the relations between test inputs and the resulting outputs • Calculating the sum of two numbers sum(a, b), we may define the MR • For a = 1, b = 6, we may generate the follow-ups • c = 2, d = 5, x = 3 MRi If the result of two sums are equal, then sum(a, b) = sum(c, d) => MRo The result of the same sums but increasing the first operand by an arbitrary number x should be equal sum(sum(a, x), b) = sum(sum(c, x), d) • c = 6, d = 1, x = 0 • ... 3/21
  • 5. www.uam.es Proposal • We propose an MDE approach to automate the construction of MT environments • Our approach starts from … • A meta-model capturing the domain concepts • A description of the domain execution environment • … and produces an MT environment that supports the full MT process • Definition and evaluation of domain-specific MRs • Detailed reporting of the testing results • Automated search-based generation of follow-up test cases 4/21
  • 6. www.uam.es Proposal • We propose an MDE approach to automate the construction of MT environments • Our approach starts from … • A meta-model capturing the domain concepts • A description of the domain execution environment • … and produces an MT environment that supports the full MT process • Definition and evaluation of domain-specific MRs • Detailed reporting of the testing results • Automated search-based generation of follow-up test cases Gotten 4/21
  • 7. www.uam.es Overview Application expert Create domain MMs Define SuT(s) execution start EMF ext. point Domain expert Define MRs Fine-tune follow-up generation mrDSL fowDSL Create input test cases Generate follow-ups Metamorphic testing Define MRs satisfactory results? end Tester [yes] [no] GOTTEN GOTTEN 5/21
  • 9. www.uam.es 1. metamodel datacentre "/sample.gotten/model/datac.ecore" with m1, m2 2. models "/sample.gotten/model/dcmodels" 3. metamodel workload "/sample.gotten/model/workload.ecore" with w1, w2 4. models "/sample.gotten/model/workloads" 5. 6. datacentre input Features { 7. context DataCentre def: CPU: Int = racks->collect 8. (numBoards*board.nodesPerBoard*board.nodeType.CPUCores*board.nodeType.CPUSpeed)->sum() 9. context DataCentre def: NMachines: Int = racks->collect 10. (numBoards*board.nodesPerBoard*board.nodeType.CPUCores)->sum() 11. ... 12. } 13. workload input Features { 14. context WorkloadSet def: Workload: Set = workloads->collect(Traces) 15. } 16. output Features { 17. Time : Long 18. Energy : Long 19. } 20. Processor { 21. Name: String 22. Version: String 23. } 24. MetamorphicRelations { 25. MR1 = [(( CPU(m1) > CPU(m2) ) and ((w1) == (w2)) ) implies ((Energy(m1) <= Energy(m2)))] 26. MR2 = [(( NMachines(m1) > NMachines(m2)) and ((w1) == (w2)) ) 27. implies ((NMachines(m1)/NMachines(m2)) >= (Energy(m1)/Energy(m2)))] 28. ... 29. } The mrDSL: Specification of MRs 7/21
  • 10. www.uam.es 1. followups for datacentre using MR1 2. with source path = "/sample.gotten/model/dcmodels" 3. and output folder = "/sample.gotten/model/dcmodels" 4. 5. CPU -> decrease [1] NodeType.CPUCores keeping {NodeType.CPUCores > 0}; 6. decrease [10] NodeType.CPUSpeed keeping {NodeType.CPUSpeed > 0} 7. 8. maximize ( CPU(m1) - CPU(m2) ) 9. 10. maxSolutions 50 11. iterations 1 12. algorithms [Random, NSGAII, NSGAIII, eMOEA] The fowDSL: Configuration of follow-ups generation 8/21
  • 11. www.uam.es The Gotten architecture GOTTEN CORE MOMOT Processor Dissect CloudSim Input test models Follow-up test models MOMOT programs HENSHIN rules mrDSL spec. fowDSL configs. MT interactive report GOTTEN 1 2 4 3 5 6 8 CloudSim processor Dissect processor 7 7 9/21
  • 13. www.uam.es Evaluation RQ1: Effectiveness of Gotten Comparison with FwCloudMeT RQ2: Suitability of generated MT tools Perform a full MT process for the cloud simulation domain and obtain similar results to an ad-hoc solution RQ3: Case studies in other domains Gotten for cloud simulators and video streaming APIs 11/21
  • 14. www.uam.es RQ1: Effectiveness of Gotten to specify MT environments (1/3) Subsystem Dissect CloudSimStorage FwCloudMeT Gotten FwCloudMeT Gotten Engine 4341 574 4415 539 MRs 3174 10 3207 10 Follow-ups 2480 20 2513 20 Executor (processor) 2254 564 2328 509 Total 12249 1168 12463 1078 LoC 12/21
  • 15. www.uam.es RQ1: Effectiveness of Gotten to specify MT environments (1/3) Subsystem Dissect CloudSimStorage FwCloudMeT Gotten FwCloudMeT Gotten Engine 4341 574 4415 539 MRs 3174 10 3207 10 Follow-ups 2480 20 2513 20 Executor (processor) 2254 564 2328 509 Total 12249 1168 12463 1078 • A new processor in Gotten required around 1100 LoC • A new processor in FwCloudMeT required one order of magnitude more code (around 12000 LoC) 13/21
  • 16. www.uam.es RQ2: Suitability of Gotten environments for MT (2/3) MR1 MR1i The cloud 𝑚1 has a better CPU system than 𝑚2. The workloads 𝜔1 and 𝜔2 are equal 𝑀𝑅1𝑖 = [ CPU(m1) > CPU(m2) and w1 == w2 ] MR1o The energy required to execute 𝜔1 over 𝑚1 should be less than or equal to the energy required to execute 𝜔2 over 𝑚2 𝑀𝑅1𝑜 = [ Energy(m1) <= Energy(m2) ] MR2 MR2i The cloud 𝑚1 contains more physical machines than the cloud 𝑚2. The workloads 𝜔1 and 𝜔2 are equal 𝑀𝑅2𝑖 = [ NMachines(m1) > NMachines(m2) and w1 == w2 ] MR2o The ratio between the number of machines of 𝑚1 and 𝑚2 should be greater than or equal to the ratio between the energy consumption required to execute 𝜔1 over 𝑚1 and the one required to execute 𝜔2 over 𝑚2 𝑀𝑅2𝑜 = [ NMachines(m1) / NMachines(m2) >= Energy(m1) / Energy(m2) ] MR3 MR3i The cloud 𝑚1 has a better storage system than 𝑚2. The workloads 𝜔1 and 𝜔2 are equal 𝑀𝑅3𝑖 = [ Storage(m1) > Storage(m2) and w1 == w2 ] MR3o The time required to execute 𝜔1 over 𝑚1 should be less than or equal to the time required to execute 𝜔2 over 𝑚2 𝑀𝑅3𝑜 = [ Time(m1) <= Time(m2) ] 14/21
  • 17. www.uam.es RQ2: Suitability of Gotten environments for MT (2/3) MR4 MR4i The cloud 𝑚1 has a better network system than 𝑚2. The workloads 𝜔1 and 𝜔2 are equal 𝑀𝑅4𝑖 = [ Network(m1) > Network(m2) and w1 == w2 ] MR4o The time required to execute 𝜔1 over 𝑚1 should be less than or equal to the time required to execute 𝜔2 over 𝑚2 𝑀𝑅4𝑜 = [ Time(m1) <= Time(m2) ] MR5 MR5i The cloud 𝑚1 has a better memory system than 𝑚2. The workloads 𝜔1 and 𝜔2 are equal 𝑀𝑅5𝑖 = [ Memory(m1) > Memory(m2) and w1 == w2 ] MR5o The time required to execute 𝜔1 over 𝑚1 should be less than or equal to the time required to execute 𝜔2 over 𝑚2 𝑀𝑅5𝑜 = [ Time(m1) <= Time(m2) ] MR6 MR6i The clouds 𝑚1 and 𝑚2 are equal. The workload 𝜔1 contains 𝜔2 𝑀𝑅6𝑖 = [ m1 == m2 and Workload(w1)−>includes(Workload(w2)) ] MR6o The time required to execute 𝜔2 over 𝑚2 should be less than or equal to the time required to execute 𝜔1 over 𝑚1 𝑀𝑅6𝑜 = [ Time(m2) <= Time(m1) ] 15/21
  • 18. www.uam.es Environment Simulator MR1 MR2 MR3 MR4 MR5 MR6 Original results CloudSim 100 40 100 100 0 100 Dissect 100 51 100 99 0 100 Gotten CloudSim 100 45 100 100 0 100 Dissect 100 80 100 100 0 100 • Both tools agree that the two simulators satisfy MR1, MR3, MR4, and MR6, but not MR5 • Regarding MR2, it differs because • The nature of the test generation algorithms (search vs. heuristics) • The relation between the ratios of the physical machines and energy consumption is not met in the simulated environments as we expected RQ2: Suitability of Gotten environments for MT (2/3) 16/21
  • 19. www.uam.es Environment Simulator MR1 MR2 MR3 MR4 MR5 MR6 Original results CloudSim 100 40 100 100 0 100 Dissect 100 51 100 99 0 100 Gotten CloudSim 100 45 100 100 0 100 Dissect 100 80 100 100 0 100 • We could perform a full MT process for the cloud simulation domain using a Gotten environment • Our results are in line with those obtained with FwCloudMeT, a specific tool for MT of cloud simulators RQ2: Suitability of Gotten environments for MT (2/3) 17/21
  • 20. www.uam.es • Gotten for Video Streaming APIs RQ3: MT environments for different domains (3/3) 18/21
  • 21. www.uam.es RQ3: MT environments for different domains (3/3) • We could create MT environments for different domains using Gotten • We could define an infrastructure enabling the reuse of • The meta-model • The test cases • The catalogue of MRs for different SuTs 19/21
  • 22. www.uam.es • Gotten automates the construction of MT environments for any domain • Our approach offers • Two DSLs to describe MRs • Strategies for generating follow-ups • An extension point to connect the MT environment with the SuT Conclusions 20/21
  • 23. www.uam.es • We will improve the follow-ups generation process to support more powerful synthesis of strings • e.g., using Wordnet • We are currently extending the mrDSL language with more primitives • We also plan to use Gotten for MT in typical MDE tasks • Model transformation • Code generation Future work 21/21
  • 26. www.uam.es 1. metamodel videostream "/video/model/VideoStream.ecore" with m1, m2 2. models "/video/model/videotc" 3. 4. videostream input Features { 5. context VideoAPITest def: IsFullSearch: Boolean = 6. (request.oclIsTypeOf(SearchVideo) 7. and request.oclAsType(SearchVideo).maxResults = -1) 8. context SearchVideo def: SearchOrder: Int = orderType 9. context SearchVideo def: UntilYear: Int = until.year 10. context SearchVideo def: FromYear: Int = from.year 11. context SearchVideo def: Radius: Double = position.radius 12. } 13. output Features { 14. NVideos : Long 15. Results: Set 16. } 17. Processor { 18. Name: String 19. Version: String 20. } 21. MetamorphicRelations { 22. MR1 = [(IsFullSearch(m1) and (SearchOrder(m1) <> SearchOrder(m2))) 23. implies (NVideos(m1) == NVideos(m2))] 24. MR2 = [(IsFullSearch(m1) and (UntilYear(m1) < FromYear(m2))) 25. implies (Results(m1)->excludes(Results(m2)))] 26. MR3 = [(IsFullSearch(m1) and (Radius(m1) > Radius(m2))) 27. implies (Results(m1)->includes(Results(m2)))] 28. } The mrDSL: Specification of MRs
  • 27. www.uam.es 1. followups for videostream using MR1 2. with source path = "/video/model/videotc" 3. and output folder = "/video/model/videotc" 4. 5. SearchOrder -> require SearchVideo.orderType <> NONE 6. 7. maximize (SearchOrder(m2) - SearchOrder(m1)) 8. 9. maxSolutions 3 10. iterations 1 11. algorithms [Random, NSGAII, NSGAIII, eMOEA] The fowDSL: Configuration of follow-ups generation
  • 28. www.uam.es The Gotten architecture GOTTEN CORE MOMOT Processor Vimeo Youtube Input test models Follow-up test models MOMOT programs HENSHIN rules mrDSL spec. fowDSL configs. MT interactive report GOTTEN 1 2 4 3 5 6 8 Youtube API Vimeo API 7 7