2. Agenda Who are we? Goal of the Presentation Definition of Testability Some Machine Learning Concepts Predict Testability Conclusion Questions/Answers
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 Corporation Change 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 Offer X-TRAX Our Test Management tool. Scale Our Code Auditing tool. SQA Service Who are we? 5
9. Goal of the Presentation Show 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. Testability Testability 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?
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
15. Some Heuristics for Testability Heuristic #1 Reuse Favor 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 Coupling Loosely 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 Metrics Testability
18.
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
23. Abstractness = 1 means a completely abstract package.Testability
24.
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.
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
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 Club Predict 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 & Statistics Statistics: focus on understanding data in terms of models Statistics: interpretability, hypothesis testing Machine Learning: greater focus on prediction Machine Learning: focus on the analysis of learning algorithms : not just large dataset. Machine Learning
42. Simple Example - Weather In 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
49. Simple Example -Weather Two 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: rainy Temperature: 59°F Humidity: 89 Windy: false Machine Learning
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