SlideShare a Scribd company logo
Using the Machine to predict TestabilityMiguel Lopez - ALGORISMI
AgendaWho are we? Goal of the Presentation  Definition of Testability Some Machine Learning ConceptsPredict TestabilityConclusionQuestions/Answers
Algorismi is the Innovative Software Quality Company.Funded by IRSIB for R&D ProjectsExperienced Team : Operation,Development and DeploymentInnovation and Efficiency (cost / time)Our mission is to help you toDeliverBetter Software
Achieve Sustainable Growth
And to be prepared to change
By InnovatingWho are we?3
Some Aphorisms displayed on our Walls“The world is changing very fast. Big will not beat small anymore. It will be the fast beating the slow.” Rupert Murdoch, Chairman and CEO, News CorporationChange is inevitable, stability, and security a myth.Be prepared to change, to anticipate, provoke, participate ... but mostly avoid the subject.Who are we?4
Software Quality OfferX-TRAXOur Test Management tool.ScaleOur Code Auditing tool.SQA ServiceWho are we?5
Goal of the PresentationShow how to use Machine Learning Algorithms in the test management.Based on a toy example, we show how to proceed.Very small example of what we do in our R&D team.We want you to probe this in your company.Who are we?6
TestabilityTestability as a Set of Factors.ISO defines testability as “attributes of software that bear on the effort needed to validate the software product” [ISO/IEC 9126].Various factors can contribute to testability (obvious).Which are the factors?
Testability Fish-Bone by [Binder].Testability
Testability Factors [Blinder]Documentation: With regards to testing, requirements and specifications are of prime importance.Implementation: The implementation is the target of all testing, and thus the extent to which the implementation al- lows itself to be tested is a key factor of the testing effort.Testability
Testability Factors [Blinder]Test Suite: Factors of the test suite itself also determine the effort required to test. Desirable features of test suites are correctness, automated execution and reuse of test cases.Test Tools: The presence of appropriate test tools can alleviate many problems that originate in other parts of the ‘fish bone’ figure.Process Capability: The organizational structure, staff and resources supporting a certain activity are typically referred to collectively as a (business) process. Properties of the testing process obviously have great influence on the effort required to perform testing.Testability
Focus on Source Code FactorTestability
Some Heuristics for Testability Heuristic #1 ReuseFavor modularity before reuse. Its better to have code duplicates than to delay testing of a component because required changes to a superclass or library class it depends on are pending.Heuristic: Give higher priority to the modularity of a system than to the reuse of components.Testability
Some Heuristics for Testability Heuristic #2 Loose CouplingLoosely coupled software is one where each of its components has, or makes use of, little or no knowledge of the definitions of other separate components.Heuristic: Reduce the number of used classes.Testability
Some Heuristics for Testability Heuristics and Object-Oriented MetricsTestability
Some Heuristics for Testability Reuse - Number of InterfacesAn interface in the Java programming language is an abstract type.
Interfaces are declared using the interface keyword, and may only contain method signatures and constant declarations.
Interfaces cannot be instantiated. A class that implements an interface must implement all of the methods described in the interface.Testability
Some Heuristics for Testability Reuse - AbstractnessAbstractness = Na/Ncwhere Na = Number of abstract classes in a packageNc = Number of concrete classes in a package.Abstractness = 0 means a completely concrete package.
Easy to test.
Abstractness = 1 means a completely abstract package.Testability
Some Heuristics for Testability Loose Coupling  Afferent Coupling between PackagesAfferent Coupling between packages (Ca) measures the total number of external classes coupled to classes of a package due to incoming coupling (coupling from classes external classes of the package, uses CBO definition of coupling).
Each class counts only once. Zero if the package does not contain any classes or if external classes do not use the package's classes. Testability
Some Heuristics for Testability Loose CouplingEfferent Coupling between PackagesEfferent Coupling between packages (Ce) measures the total number of external classes coupled to classes of a package due to outgoing coupling (coupling to classes external classes of the package, uses Ce definition of coupling).
Each class counts only once. Zero if the package does not contain any classes or if external classes are not used by the package's classes. Testability
Metric for TestabilityWe will use a qualitative metric for testability: Testability Level.
Ordinal scale:
High : Highly testable (easy to test)
Medium: normal effort to test.
Low: Lowly testable (difficult to test)
Testability is related to unit testing effort.Testability
What’s Machine Learning ?Machine learning, a branch of artificial intelligence, is a scientific discipline that is concerned with the design and development of algorithms that allow computers to evolve behaviors based on empirical data.Data can be seen as examples that illustrate relations between observed variables.A major focus of machine learning research is to automatically learn to recognize complex patterns and make intelligent decisions based on data.Machine Learning
What’s Machine Learning ?Many approaches exist in the Machine Learning world.Neural networks, Bayesian networks, clustering,..Machine Learning
Some ML Approaches – Decision Tree Decision tree learning uses a decision tree as a predictive model which maps observations about an item to conclusions about the item's target value.Machine Learning
Some ML Approaches – Association Rule Association rule learning is a method for discovering interesting relations between variables in large databases.A typical and widely-used example of association rule mining is Market Basket Analysis.Example: Association rule "If A and B  are purchased then C is purchased on the same trip"Machine Learning
Some ML Approaches – Neural Network An artificial neural network (ANN), usually called "neural network" (NN), is a mathematical model or computational model that tries to simulate the structure and/or functional aspects of biological neural networks. It consists of an interconnected group of artificial neurons and processes information using a connectionist approach to computation.They are usually used to model complex relationships between inputs and outputs or to find patterns in data.Example: Milan Lab: Soccer ClubPredict injuries of the soccer player.Machine Learning
Some ML Approaches – Clustering Cluster analysis or clustering is the assignment of a set of observations into subsets (called clusters) so that observations in the same cluster are similar in some sense. Clustering is a method of unsupervised learning, and a common technique for statistical data analysis.Machine Learning
Some ML Approaches – Clustering A Bayesian network, belief network or directed acyclic graphical model is a probabilistic graphical model that represents a set of random variables and their conditional independencies via a directed acyclic graph (DAG). For example, a Bayesian network could represent the probabilistic relationships between diseases and symptoms. Machine Learning
Machine Learning & StatisticsStatistics: focus on understanding data in terms of modelsStatistics: interpretability, hypothesis testingMachine Learning: greater focus on predictionMachine Learning: focus on the analysis of learningalgorithms : not just large dataset.Machine Learning

More Related Content

PPTX
Introduction to Machine Learning
PPT
LearningAG.ppt
PPT
Promise 2011: "An Iterative Semi-supervised Approach to Software Fault Predic...
PDF
Ase12.ppt
PDF
bbbPaper
PPTX
introduction to machine learning and nlp
PPTX
AI: Learning in AI 2
PDF
Expert system neural fuzzy system
Introduction to Machine Learning
LearningAG.ppt
Promise 2011: "An Iterative Semi-supervised Approach to Software Fault Predic...
Ase12.ppt
bbbPaper
introduction to machine learning and nlp
AI: Learning in AI 2
Expert system neural fuzzy system

What's hot (19)

PPTX
Learning in AI
PDF
Programming with GUTs
PDF
Multi objective genetic algorithm for regression testing reduction
PDF
Multi objective genetic algorithm for regression
PDF
Sound Empirical Evidence in Software Testing
PPTX
A software fault localization technique based on program mutations
PDF
Automated parameter optimization should be included in future 
defect predict...
PPTX
Uncertain Knowledge and Reasoning in Artificial Intelligence
DOC
Chaptr 7 (final)
PPTX
Alanoud alqoufi inductive learning
PDF
H2O World - Top 10 Deep Learning Tips & Tricks - Arno Candel
PDF
Ssbse12b.ppt
PDF
A Defect Prediction Model for Software Product based on ANFIS
PDF
Icsoc12 tooldemo.ppt
DOC
Testing survey by_directions
PPTX
AI: Learning in AI
PDF
Expert System With Python -1
PDF
Towards a Better Understanding of the Impact of Experimental Components on De...
PDF
Barga Data Science lecture 3
Learning in AI
Programming with GUTs
Multi objective genetic algorithm for regression testing reduction
Multi objective genetic algorithm for regression
Sound Empirical Evidence in Software Testing
A software fault localization technique based on program mutations
Automated parameter optimization should be included in future 
defect predict...
Uncertain Knowledge and Reasoning in Artificial Intelligence
Chaptr 7 (final)
Alanoud alqoufi inductive learning
H2O World - Top 10 Deep Learning Tips & Tricks - Arno Candel
Ssbse12b.ppt
A Defect Prediction Model for Software Product based on ANFIS
Icsoc12 tooldemo.ppt
Testing survey by_directions
AI: Learning in AI
Expert System With Python -1
Towards a Better Understanding of the Impact of Experimental Components on De...
Barga Data Science lecture 3
Ad

Viewers also liked (7)

PPTX
What Every Software Engineer Should Know About Machine Learning - Peter Norvig
PDF
Predictive analytics: hot and getting hotter
PPT
Predictive Performance Testing: Integrating Statistical Tests into Agile Deve...
PPTX
Machine Learning in Software Engineering
PDF
Defect Prevention & Predictive Analytics - XBOSoft Webinar
PDF
Machine learning in software testing
PDF
Automated testing of software applications using machine learning edited
What Every Software Engineer Should Know About Machine Learning - Peter Norvig
Predictive analytics: hot and getting hotter
Predictive Performance Testing: Integrating Statistical Tests into Agile Deve...
Machine Learning in Software Engineering
Defect Prevention & Predictive Analytics - XBOSoft Webinar
Machine learning in software testing
Automated testing of software applications using machine learning edited
Ad

Similar to Using the Machine to predict Testability (20)

PPTX
Software testability slide share
PDF
AI in SE: A 25-year Journey
PDF
Design For Testability
PPT
Design testabilty
PPTX
A Software Testing Intro
PDF
A survey of fault prediction using machine learning algorithms
PDF
Artificial Intelligence for Automated Software Testing
PDF
An Approach to Software Testing of Machine Learning Applications
PPT
Unit 6
PDF
A review paper: optimal test cases for regression testing using artificial in...
PDF
Input Space Partitioning
PDF
Machine Learning: Learning with data
PDF
One talk Machine Learning
PDF
Changes and Bugs: Mining and Predicting Development Activities
PDF
Can we induce change with what we measure?
PPT
Quality Assurance
PDF
Agile Software Testing the Agilogy Way
PDF
Measuring Computational Complexity the qualitative and quantitative intertwin...
PPT
Software testing part
PPT
(Talk in Powerpoint Format)
Software testability slide share
AI in SE: A 25-year Journey
Design For Testability
Design testabilty
A Software Testing Intro
A survey of fault prediction using machine learning algorithms
Artificial Intelligence for Automated Software Testing
An Approach to Software Testing of Machine Learning Applications
Unit 6
A review paper: optimal test cases for regression testing using artificial in...
Input Space Partitioning
Machine Learning: Learning with data
One talk Machine Learning
Changes and Bugs: Mining and Predicting Development Activities
Can we induce change with what we measure?
Quality Assurance
Agile Software Testing the Agilogy Way
Measuring Computational Complexity the qualitative and quantitative intertwin...
Software testing part
(Talk in Powerpoint Format)

Recently uploaded (20)

PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
cuic standard and advanced reporting.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
A Presentation on Artificial Intelligence
PPTX
Big Data Technologies - Introduction.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
NewMind AI Monthly Chronicles - July 2025
PPT
Teaching material agriculture food technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Cloud computing and distributed systems.
PDF
Electronic commerce courselecture one. Pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Understanding_Digital_Forensics_Presentation.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
cuic standard and advanced reporting.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
A Presentation on Artificial Intelligence
Big Data Technologies - Introduction.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Review of recent advances in non-invasive hemoglobin estimation
MYSQL Presentation for SQL database connectivity
Spectral efficient network and resource selection model in 5G networks
NewMind AI Monthly Chronicles - July 2025
Teaching material agriculture food technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Cloud computing and distributed systems.
Electronic commerce courselecture one. Pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?

Using the Machine to predict Testability

  • 1. Using the Machine to predict TestabilityMiguel Lopez - ALGORISMI
  • 2. AgendaWho are we? Goal of the Presentation Definition of Testability Some Machine Learning ConceptsPredict TestabilityConclusionQuestions/Answers
  • 3. Algorismi is the Innovative Software Quality Company.Funded by IRSIB for R&D ProjectsExperienced Team : Operation,Development and DeploymentInnovation and Efficiency (cost / time)Our mission is to help you toDeliverBetter Software
  • 5. And to be prepared to change
  • 7. Some Aphorisms displayed on our Walls“The world is changing very fast. Big will not beat small anymore. It will be the fast beating the slow.” Rupert Murdoch, Chairman and CEO, News CorporationChange is inevitable, stability, and security a myth.Be prepared to change, to anticipate, provoke, participate ... but mostly avoid the subject.Who are we?4
  • 8. Software Quality OfferX-TRAXOur Test Management tool.ScaleOur Code Auditing tool.SQA ServiceWho are we?5
  • 9. Goal of the PresentationShow how to use Machine Learning Algorithms in the test management.Based on a toy example, we show how to proceed.Very small example of what we do in our R&D team.We want you to probe this in your company.Who are we?6
  • 10. TestabilityTestability as a Set of Factors.ISO defines testability as “attributes of software that bear on the effort needed to validate the software product” [ISO/IEC 9126].Various factors can contribute to testability (obvious).Which are the factors?
  • 11. Testability Fish-Bone by [Binder].Testability
  • 12. Testability Factors [Blinder]Documentation: With regards to testing, requirements and specifications are of prime importance.Implementation: The implementation is the target of all testing, and thus the extent to which the implementation al- lows itself to be tested is a key factor of the testing effort.Testability
  • 13. Testability Factors [Blinder]Test Suite: Factors of the test suite itself also determine the effort required to test. Desirable features of test suites are correctness, automated execution and reuse of test cases.Test Tools: The presence of appropriate test tools can alleviate many problems that originate in other parts of the ‘fish bone’ figure.Process Capability: The organizational structure, staff and resources supporting a certain activity are typically referred to collectively as a (business) process. Properties of the testing process obviously have great influence on the effort required to perform testing.Testability
  • 14. Focus on Source Code FactorTestability
  • 15. Some Heuristics for Testability Heuristic #1 ReuseFavor modularity before reuse. Its better to have code duplicates than to delay testing of a component because required changes to a superclass or library class it depends on are pending.Heuristic: Give higher priority to the modularity of a system than to the reuse of components.Testability
  • 16. Some Heuristics for Testability Heuristic #2 Loose CouplingLoosely coupled software is one where each of its components has, or makes use of, little or no knowledge of the definitions of other separate components.Heuristic: Reduce the number of used classes.Testability
  • 17. Some Heuristics for Testability Heuristics and Object-Oriented MetricsTestability
  • 18. Some Heuristics for Testability Reuse - Number of InterfacesAn interface in the Java programming language is an abstract type.
  • 19. Interfaces are declared using the interface keyword, and may only contain method signatures and constant declarations.
  • 20. Interfaces cannot be instantiated. A class that implements an interface must implement all of the methods described in the interface.Testability
  • 21. Some Heuristics for Testability Reuse - AbstractnessAbstractness = Na/Ncwhere Na = Number of abstract classes in a packageNc = Number of concrete classes in a package.Abstractness = 0 means a completely concrete package.
  • 23. Abstractness = 1 means a completely abstract package.Testability
  • 24. Some Heuristics for Testability Loose Coupling Afferent Coupling between PackagesAfferent Coupling between packages (Ca) measures the total number of external classes coupled to classes of a package due to incoming coupling (coupling from classes external classes of the package, uses CBO definition of coupling).
  • 25. Each class counts only once. Zero if the package does not contain any classes or if external classes do not use the package's classes. Testability
  • 26. Some Heuristics for Testability Loose CouplingEfferent Coupling between PackagesEfferent Coupling between packages (Ce) measures the total number of external classes coupled to classes of a package due to outgoing coupling (coupling to classes external classes of the package, uses Ce definition of coupling).
  • 27. Each class counts only once. Zero if the package does not contain any classes or if external classes are not used by the package's classes. Testability
  • 28. Metric for TestabilityWe will use a qualitative metric for testability: Testability Level.
  • 30. High : Highly testable (easy to test)
  • 32. Low: Lowly testable (difficult to test)
  • 33. Testability is related to unit testing effort.Testability
  • 34. What’s Machine Learning ?Machine learning, a branch of artificial intelligence, is a scientific discipline that is concerned with the design and development of algorithms that allow computers to evolve behaviors based on empirical data.Data can be seen as examples that illustrate relations between observed variables.A major focus of machine learning research is to automatically learn to recognize complex patterns and make intelligent decisions based on data.Machine Learning
  • 35. What’s Machine Learning ?Many approaches exist in the Machine Learning world.Neural networks, Bayesian networks, clustering,..Machine Learning
  • 36. Some ML Approaches – Decision Tree Decision tree learning uses a decision tree as a predictive model which maps observations about an item to conclusions about the item's target value.Machine Learning
  • 37. Some ML Approaches – Association Rule Association rule learning is a method for discovering interesting relations between variables in large databases.A typical and widely-used example of association rule mining is Market Basket Analysis.Example: Association rule "If A and B are purchased then C is purchased on the same trip"Machine Learning
  • 38. Some ML Approaches – Neural Network An artificial neural network (ANN), usually called "neural network" (NN), is a mathematical model or computational model that tries to simulate the structure and/or functional aspects of biological neural networks. It consists of an interconnected group of artificial neurons and processes information using a connectionist approach to computation.They are usually used to model complex relationships between inputs and outputs or to find patterns in data.Example: Milan Lab: Soccer ClubPredict injuries of the soccer player.Machine Learning
  • 39. Some ML Approaches – Clustering Cluster analysis or clustering is the assignment of a set of observations into subsets (called clusters) so that observations in the same cluster are similar in some sense. Clustering is a method of unsupervised learning, and a common technique for statistical data analysis.Machine Learning
  • 40. Some ML Approaches – Clustering A Bayesian network, belief network or directed acyclic graphical model is a probabilistic graphical model that represents a set of random variables and their conditional independencies via a directed acyclic graph (DAG). For example, a Bayesian network could represent the probabilistic relationships between diseases and symptoms. Machine Learning
  • 41. Machine Learning & StatisticsStatistics: focus on understanding data in terms of modelsStatistics: interpretability, hypothesis testingMachine Learning: greater focus on predictionMachine Learning: focus on the analysis of learningalgorithms : not just large dataset.Machine Learning
  • 42. Simple Example - WeatherIn the weather example, we want to predict the weather conditions to play outside.According to 4 variables (outlook,temperature, humidity, windy), we ask the following question:Can the children play in the garden?Machine Learning
  • 43. Simple Example - WeatherMachine Learning
  • 44. WEKA – ML SoftwareFor the Machine Learning, we use the software Weka.
  • 45. Weka is an open source project of the Machine Learning Group at University of Waikato.
  • 46. They have incorporated several standard ML techniques into a software "workbench" called WEKA, for Waikato Environment for Knowledge Analysis.
  • 47. But what is a Weka?Machine Learning
  • 48. WEKA – ML SoftwareFound only on the islands of New Zealand, the Weka is a endangered flightless bird.Machine Learning
  • 49. Simple Example -WeatherTwo steps process:Train the machine: build the decision tree based upon a data set.Predict on new data set: load the decision tree and ask for a new data set.Question: Can the children play outside with the following weather conditions:Outlook: rainyTemperature: 59°FHumidity: 89Windy: falseMachine Learning
  • 50. Simple Example -WeatherSee Demo WekaMachine Learning
  • 51. Metrics for Testability Predict Testability
  • 52. Metrics for Testability We will proceed the same way as in the weather example.
  • 53. OO Metrics are the attributes used to predict.
  • 55. Attribute to predict is testability.
  • 57. Data for TestabilityWe analyzed 9 packages of Java Application (Scale).
  • 58. For each package, we compute the different metrics with the Eclipse plugin Metrics.
  • 63. For each package, we assess the testability level of the package.Predict Testability
  • 64. Data for Testability: ARFF FormatPredict Testability
  • 65. Simplistic ModelMetrics model is too simplistic.
  • 68.
  • 69. The testability fish-bone must be measured.
  • 70. Qualitative & Quantitative measures.Conclusion
  • 71. Automate ML ProcessMeasurement Process must be automated.
  • 72. Many Metrics Tools can be automated.
  • 73. Learning & Prediction processes must be automated.
  • 78. Bibliography[Blinder] R. Binder. Design for testability in object-oriented systems. Comm. of the ACM, 37(9):87–101, 1994.Predicting Class Testability using Object-Oriented Metrics, M. Bruntink and A. van Deursen.Data mining: practical machine learning tools and techniques Par Ian H. Witten,Eibe Frank