Upload
milind-kelkar
View
327
Download
2
Embed Size (px)
Citation preview
©Unpickle, 2016. All Rights Reserved - Privileged and Confidentialwww.unpickle.in
Automated testing of software
applications using Machine Learning
Milind Kelkar
Chief Analytics Officer
August 05, 2016
1
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
CONFERENCE PROGRAM AUG 05, 2016
2
• STePIN SUMMIT 2016
• Conference Day 2
• Park Plaza, Bangalore, India
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Today’s Agenda
3
• What is Machine Learning (ML)
• Framework to leverage ML
• Software Testing Use Cases
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Support
Vector
Machine
Machine Learning Techniques
4
Deep
Learning
Dimension
Reduction
Regression
Anomaly Detection Classification
Ensemble Bayes
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Deep Learning
5ww.huffingtonpost.com
Driverless Car using Neural Networks
Stay on
Course
Accelerator
Brakes
Steering
Wheel
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential 6
Zebra or Horse
Stripes
Yes
SLP MLP ABT
No
GBN PNN
Classification
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Why Machine Learning for Testing
7
• Embed a “robot” inside a program
– Fast, consistent conformance of a product to requirements
• Real time decisioning
– Reduce time to test and monitor
• Software applications we cannot program by hand
– Analyse the weaknesses of test suites so as to be able to
iteratively improve them
• Self-Customization Programs
– Auto-correct complexity of the software application
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
T
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Framework to leverage ML
8
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Leveraging Machine Learning (ML)
9
Machines testing software applications
Machines masquerading as Humans
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Summarizing Machine Learning
10
• Virtual Assistant
• Re-engineering of
test suites
• Driverless Car
• Adaptive
Automation
• Spam detection
• Software Defect
Prediction
• Intelligent Search
• Live Validation
Humans RationalA
ctThin
k
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Software defect prediction in 3 steps
11
• Goal of Machine Learning
1. BUILD computer systems
2. Learn from EXPERIENCE
3. Improve PERFORMANCE over experience
1. BUILD
% of code correctly classified as “defect”
or “not a defect”
Machine classifying a line code as “defect”
or “not a defect”
2. EXPERIENCEMachine - Learning from YOU labelling a
code as “defect” or “not a defect”
3. PERFORM
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Software defect prediction
12
Occurrence of corrections to a tested file
Physical
Line of
Code
Total Line
count
Blank Line
of Code
Comment
Line of
Code
Coupling
between
Objects
Cyclomatic
Complexity
Number
Weighted
Methods per
Class
Depth of
Inheritance
Tree
Source Code
Metric Set
Test Source Code
Metric Set
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Intelligent Search
13
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Live Validation - Infer
14
• Finding Bugs before it goes Live
• Potential issues and bad coding habits
• Guesses rationally
• Spot bugs in minutes
• Fix rate of about 80 percent
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Adaptive Automation – Test Case Generation
15
• Adaptive Automation: Leveraging Machine Learning to Support Uninterrupted Automated Testing of Software
Application; Rajesh Mathur, Scott Miles, Miao Du arXiv:1508.00671v1 [cs.SE] 4 Aug 2015
1. Automatically exploring the screens or
pages
2. Generating tests which exercise all of the
discovered fields
3. Guide the values used in the test cases
4. Employ a database of common field
names and associated formats
5. Historical user interaction logs to test
most often used navigation pathsCheck that it
only accepts
mobile formats
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Act like Humans
16
Commercial Bank of Dubai
https://www.cbd.ae/Virtual Assistant on the Website
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Link Problems to Test Cases
17
• Using Machine Learning to Refine Black-Box Test Specifications and Test Suites; Lionel
C. Briand ; Yvan Labiche; Zaheer Bawar; (2007)
Problems Causes
MisspecificationMissed Category
Unused
Categories
Ill-defined
Choices
Missing Test
Cases
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Languages for Machine Learning
18
• Prolog
• Python
• R
• Matlab
• Scala
• Clojure
• Ruby
• Rapidminer
• Java
• Weka Toolkit
• SpringXD
• Mahout
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
T
©Unpickle, 2016. All Rights Reserved - Privileged and Confidential
Thank You
19