SlideShare a Scribd company logo
1 of 15
Introducing DSLs
As Practical Applications of Formal Methods in Automated Verification
Nabarun Mondal, Principal, Product Solutions,
BayesTree
Automation – Cost vs Benefit
Measure Cost
Building : Initial Money spent (Investment)
Maintenance : Differential Money spent
Benefit
TACOS : Total Absolute Cost Saved
Reliability – NX measure
Optimize Cost Reduction
Reduce Code for Automation
Reduce “BUGs” in automation
Increase Benefit
Do more with less
Easily Accessible to Anyone
Problem – 1 : Filters in Grid
Multiple Filter Varity
1. Starts With
2. Ends With
3. Equal
4. Not Equal
5. General : Nothing exists such as X
Typical Automation Style - Filter
Problem – 2 : JSON Verification
Multiple Conformation Scheme
1. Nested Object Path exists
2. Field Exists and of Type
3. Value of Field
4. All of something has to be something
else
5. At least one has to “be” something
Typical Automation Style - JSON
Problems ?
Implicit Business Logic in Code
Too Much Code
Impossible to Stabilize
Refactor, Time And Again
“Key” is NOT the Word
Keyword Arg1 Arg2
Open ( A ) grid URL
Select ( A ) Filter Starts With
Verify ( V ) Filter ( HOW ? )
Keyword Arg1 Arg2
GET ( A ) JSON URL
Verify Field ( A ) ? ?
Grid Filter Verification
JSON Verification
Lacking
Branching
Functions
Data Driven
Verifications
What Do We Know Of Expressions
There is NO Element in the Collection, Such That :
Filter Condition P(.) on that Element is Violated
P := { startsWith() , endsWith(), equals(), … }
•Select
•Map
•Join
•For All
•There Exists
•Find
•For-Iterators
•And
•Or
•Not
•Xor
•Add
•Subtract
•Multiply
•Divide
Arithmetic
Common
Logic
Function &
Functionals
Order Logic
A Stich in Time – Declarative Paradigm
[ 1, 2, 3, 4, 5, 6, 7, 8 ] [ 6,7 ]
Let F be the Filter using Predicate P(.) over Collection C.
F is correct if and only if :
1. All element ‘f’ in F has the property P(f) = True AND
2. f is in C AND
3. No element ‘c’ exists in C such that P(c) = True AND
4. c is NOT in F
DSL – Verifying Filters
Grid : Data Source
Filter : Predicate (Index Function)
Verify/Apply : Higher Order Function
HIGHER ORDER
FUNCTION
INPUT
FUNCTION
DATA TO
INPUT
Introducing Expression Languages
Arithmetic & Logic
Expressions ARE Functions
JSR-223 : Easy Embedding
Implementation (Expression Language)
Step 1 : Verify Filter, this time, Correctly!
Step 2 : Pass Filter Criterion as Expression ( Higher Order Predicate Function )
Synthesis
Optimization
•Maintenance
•Automation Speed
Declarative
•Predicate Logic
•What, NOT How
DSL
•Turing Complete
•Expression Engine Driven
Questions?

More Related Content

Similar to formal methods in qa automation using dsl

Test in action – week 1
Test in action – week 1Test in action – week 1
Test in action – week 1Yi-Huan Chan
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 DsQundeel
 
Data Structure
Data StructureData Structure
Data Structuresheraz1
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 DsQundeel
 
Beyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureBeyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureJayaram Sankaranarayanan
 
Eclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDT
Eclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDTEclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDT
Eclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDTElena Laskavaia
 
PHP Barcelona 2010 - Architecture and testability
PHP Barcelona 2010 - Architecture and testabilityPHP Barcelona 2010 - Architecture and testability
PHP Barcelona 2010 - Architecture and testabilityGiorgio Sironi
 
Test Driven Development - The art of fearless programming
Test Driven Development - The art of fearless programmingTest Driven Development - The art of fearless programming
Test Driven Development - The art of fearless programmingChamil Jeewantha
 
DSR Testing (Part 1)
DSR Testing (Part 1)DSR Testing (Part 1)
DSR Testing (Part 1)Steve Upton
 
Reflected intelligence evolving self-learning data systems
Reflected intelligence  evolving self-learning data systemsReflected intelligence  evolving self-learning data systems
Reflected intelligence evolving self-learning data systemsTrey Grainger
 
LecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdfLecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdfAmirMohamedNabilSale
 
Python高级编程(二)
Python高级编程(二)Python高级编程(二)
Python高级编程(二)Qiangning Hong
 
Good ideas that we forgot
Good ideas that we forgot   Good ideas that we forgot
Good ideas that we forgot J On The Beach
 
Functional Programming.pptx
Functional Programming.pptxFunctional Programming.pptx
Functional Programming.pptxKarthickT28
 
Code Analysis-run time error prediction
Code Analysis-run time error predictionCode Analysis-run time error prediction
Code Analysis-run time error predictionNIKHIL NAWATHE
 
Weblog Extraction With Fuzzy Classification Methods
Weblog Extraction With Fuzzy Classification MethodsWeblog Extraction With Fuzzy Classification Methods
Weblog Extraction With Fuzzy Classification MethodsEdy Portmann
 
Functional Programming Patterns (BuildStuff '14)
Functional Programming Patterns (BuildStuff '14)Functional Programming Patterns (BuildStuff '14)
Functional Programming Patterns (BuildStuff '14)Scott Wlaschin
 

Similar to formal methods in qa automation using dsl (20)

Test in action – week 1
Test in action – week 1Test in action – week 1
Test in action – week 1
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 Ds
 
Data Structure
Data StructureData Structure
Data Structure
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 Ds
 
Blackbox
BlackboxBlackbox
Blackbox
 
Beyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureBeyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software Architecture
 
Eclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDT
Eclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDTEclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDT
Eclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDT
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
PHP Barcelona 2010 - Architecture and testability
PHP Barcelona 2010 - Architecture and testabilityPHP Barcelona 2010 - Architecture and testability
PHP Barcelona 2010 - Architecture and testability
 
Test Driven Development - The art of fearless programming
Test Driven Development - The art of fearless programmingTest Driven Development - The art of fearless programming
Test Driven Development - The art of fearless programming
 
DSR Testing (Part 1)
DSR Testing (Part 1)DSR Testing (Part 1)
DSR Testing (Part 1)
 
Code metrics in PHP
Code metrics in PHPCode metrics in PHP
Code metrics in PHP
 
Reflected intelligence evolving self-learning data systems
Reflected intelligence  evolving self-learning data systemsReflected intelligence  evolving self-learning data systems
Reflected intelligence evolving self-learning data systems
 
LecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdfLecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdf
 
Python高级编程(二)
Python高级编程(二)Python高级编程(二)
Python高级编程(二)
 
Good ideas that we forgot
Good ideas that we forgot   Good ideas that we forgot
Good ideas that we forgot
 
Functional Programming.pptx
Functional Programming.pptxFunctional Programming.pptx
Functional Programming.pptx
 
Code Analysis-run time error prediction
Code Analysis-run time error predictionCode Analysis-run time error prediction
Code Analysis-run time error prediction
 
Weblog Extraction With Fuzzy Classification Methods
Weblog Extraction With Fuzzy Classification MethodsWeblog Extraction With Fuzzy Classification Methods
Weblog Extraction With Fuzzy Classification Methods
 
Functional Programming Patterns (BuildStuff '14)
Functional Programming Patterns (BuildStuff '14)Functional Programming Patterns (BuildStuff '14)
Functional Programming Patterns (BuildStuff '14)
 

Recently uploaded

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 

Recently uploaded (20)

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 

formal methods in qa automation using dsl

  • 1. Introducing DSLs As Practical Applications of Formal Methods in Automated Verification Nabarun Mondal, Principal, Product Solutions, BayesTree
  • 2. Automation – Cost vs Benefit Measure Cost Building : Initial Money spent (Investment) Maintenance : Differential Money spent Benefit TACOS : Total Absolute Cost Saved Reliability – NX measure Optimize Cost Reduction Reduce Code for Automation Reduce “BUGs” in automation Increase Benefit Do more with less Easily Accessible to Anyone
  • 3. Problem – 1 : Filters in Grid Multiple Filter Varity 1. Starts With 2. Ends With 3. Equal 4. Not Equal 5. General : Nothing exists such as X
  • 5. Problem – 2 : JSON Verification Multiple Conformation Scheme 1. Nested Object Path exists 2. Field Exists and of Type 3. Value of Field 4. All of something has to be something else 5. At least one has to “be” something
  • 7. Problems ? Implicit Business Logic in Code Too Much Code Impossible to Stabilize Refactor, Time And Again
  • 8. “Key” is NOT the Word Keyword Arg1 Arg2 Open ( A ) grid URL Select ( A ) Filter Starts With Verify ( V ) Filter ( HOW ? ) Keyword Arg1 Arg2 GET ( A ) JSON URL Verify Field ( A ) ? ? Grid Filter Verification JSON Verification Lacking Branching Functions Data Driven Verifications
  • 9. What Do We Know Of Expressions There is NO Element in the Collection, Such That : Filter Condition P(.) on that Element is Violated P := { startsWith() , endsWith(), equals(), … } •Select •Map •Join •For All •There Exists •Find •For-Iterators •And •Or •Not •Xor •Add •Subtract •Multiply •Divide Arithmetic Common Logic Function & Functionals Order Logic
  • 10. A Stich in Time – Declarative Paradigm [ 1, 2, 3, 4, 5, 6, 7, 8 ] [ 6,7 ] Let F be the Filter using Predicate P(.) over Collection C. F is correct if and only if : 1. All element ‘f’ in F has the property P(f) = True AND 2. f is in C AND 3. No element ‘c’ exists in C such that P(c) = True AND 4. c is NOT in F
  • 11. DSL – Verifying Filters Grid : Data Source Filter : Predicate (Index Function) Verify/Apply : Higher Order Function HIGHER ORDER FUNCTION INPUT FUNCTION DATA TO INPUT
  • 12. Introducing Expression Languages Arithmetic & Logic Expressions ARE Functions JSR-223 : Easy Embedding
  • 13. Implementation (Expression Language) Step 1 : Verify Filter, this time, Correctly! Step 2 : Pass Filter Criterion as Expression ( Higher Order Predicate Function )

Editor's Notes

  1. Today we are going to start talking about something that almost no one wants to talk about – Efficacy of Automation, and how to improve them. It can not be done by automating more, but by more initial coding and thereby less coding. The idea of Domain Specific Language will be introduced. But before we begin, let me introduce myself, started as Embedded System Developer for Biotechnological devices as contractor for Applied Biosystems, joined MSFT in 2004 as SDET. Created first automation framework that was the gold standard in IDC for UI Automation for couple of years. Later moved into Windows Kernel in Application Compatibility. This process ensured I know Windows core, and related technologies – most importantly CLR and UI Automation core. Switched industry to join D.E.Shaw as Performance and Automation Test lead, created multiple DSL : ApiUnit, CHAITIN, GECO, nJexl there, streamlined the automation left there as Product Manager. Joined LinkedIn Bengaluru as Staff Engineer, and from there moved to BayesTree as the first Employee & Partner.
  2. Let’s begin. Automation has become so much deeply ingrained that NO ONE wants to measure anything about it anymore. It is NOT Cool to question it. But you know what? You should. You must. So, what we need to measure? Cost vs Benefit. What sort of Cost? Is it reliable? If I run it 10 times, how many times it properly run? Repeat with100 times? That is nX measure, a very standard measure taken when I was in MSFT. And I guess it still is. Cost reduction, what about it? Did it help at all? How do you know? This talk will be focusing more on Optimize. How can we write less automation code to do more, and do it less and less. And… don’t’ worry I am not here to sale any tool. I am here for selling the idea and stopping Automation Hell. Yes, that is actually a thing. Automation hell is where too many people trying to automate too less a thing – say 10 people automated to give 10% of functional coverage.
  3. Lets start thinking about optimization, but first, solve couple of very standard problem. How do we – test this?
  4. Ah, you say, this is a nice code, and how neatly I am writing verification code!
  5. And, now we have similar, but different problem. Again, how to?
  6. Don’t worry, we can write more code, more and more code to test the code… gazillion lines …. With whole of Indian Population acting as testers…and it won’t be enough. Nah. It won’t be.
  7. Previous slides brings us to the point of this. These are the problems. In fact , these are the ONLY problems. The last point, ensures that there can never be any optimization. But is that true? The proponent of keyword driven automation makes another point – business driven development and testing, which .. Is next.
  8. Classic case of how a Keyword Driven case can be made on the previous examples. Arguments can be made saying that is not true, no business process is being verified here. That is a moot argument because, formally speaking , a business process is nothing but a computable function – thereby, making these sub problems homomorphic to the original problem. Eventually, one has to solve this, and then the question becomes how? It is one thing to have abstraction, another to implement it correctly. Turns out, keywords were always misnomer, they are really pointing to the direction of what we will discuss next – expressions and DSLs
  9. Let’s look at one of the problem – filter, carefully. We can see we can formalize this as a logical statement. Is it possible to have some kind of library function support to do all of these? By default? Then, by definition, using aid of this library, one can implement any verification!
  10. But before we get ahead of ourselves, let’s understand the pitfall of “imperative” paradigm. There you go. What went wrong? We missed basic stuff. How? Because we were not thinking about truth and statements, but we were thinking about implementation! Truth, is relative, and axiomatic in nature. The formal method of proving truth is called theorem proving and is a mechanistic process, therefore, one can simply declare a statement about something, and a system can verify the fact about such a system. Thus, the idea is to ”declare” what we need to verify, rather than actually implement it. By that standard, the logic, the paradigm, everything is a clear failure.
  11. This is how we want the Automation infra to work. Declarative, but at the same time, making it Turing Complete . Observe the use of defining aspects of interest, Filter, verification but how filter or verification works is abstracted. That is one part of the declarative style. Overall this is a progress – and this is a custom computer language – a domain specific language we dare to say! We talk about higher order functions – what are they? A higher order function is a function that takes at least one another function as input, and data, And use the input function by using the data to input to produce output. One such function is sorting which uses comparator. But, in our case, what about the TEST function itself? What it supposed to do? Apply a filter function with a parameter Get the values and check using another validation function that Value In, Value out , Parameter passed is verified! Now, we get into another problem. Who evaluates expressions? How do I even know the $VALUE what it evaluates into? What every DSL need, is an embedded expression language. That, is the next slide.
  12. Because I have developed 4 DSL on JVM and only 1 on CLR, I will talk about Expression languages on JVM. Left side we have languages which are embedded, and does not claim to become a full language, right side full language implementation In JVM. Anyone using drools will know MVEL, gradle is groovy. ZoomBA is pretty recent addition to the mix, BayesTree use ZoomBA in many places. I n LinkedIn I have created this framework called Layman – UI layout tester which employs ZoomBA as the expression language These languages ensure ALU operations, and functional evaluation when required in a DSL design. JSR 223 standard provides for scriptability for JVM. The end result, DSL becomes Turing complete – that is, it becomes a generic language where I can do expression, conditional jump.
  13. Given BT use ZoomBA, I will showcase why we use it. Observe the logic expressions are matching literally line by line against a very SQL ish syntax of the expression language. In Step 2, we introduce you to currying – partial functions which are being evaluated as expressions from string via automatic eval functionl. We can well understand the implication of such, massive reduction is code size, maintainability, and testability in the test code itself.
  14. The synthesis of all these concepts when put together – gets into this