SlideShare uma empresa Scribd logo
1 de 19
Baixar para ler offline
Using Godog for writing
human readable tests
@gkGaneshR @openebs
Introduction
What is Test Driven Development (TDD)?
Problems with TDD?
Desired "behavior" of an system is specified in terms of code, not always the right
way to capture behavior
Other stakeholders in Software lifecycle find it hard to be involved in the whole
process
Unit testing is a component of Test Driven
Development
// hello_test.go
package main
import "testing"
func TestHello(t *testing.T) {
got := Hello()
want := "Hello, world"
if got != want {
t.Errorf("got '%s' want '%s'", got, want)
}
}
// hello.go
package main
import "fmt"
func Hello() string {
return "Hello, world"
}
func main() {
fmt.Println(Hello())
}
Introduction
What is Behaviour Driven Development (BDD)?
● BDD is TDD done right!!!
● BDD uses natural language to describe the "desired behavior" of the system,
that can be understood by both the developer and the customer
● Demo of an existing BDD application using Godog predominantly used with
golang
Need for BDD
Automatically generate test code from "behavior" description, eliminating the
intermediate step of writing test code.
This allows the direct execution of "behaviors" on application code.
Godog makes BDD available to the developer community, by reducing the
learning curve, time and effort
Need for BDD
In existing BDD frameworks, developer needs to manually write the glue code
which maps "behaviors" to the implementation code
This mapping involves writing code for interpreting behaviors in terms of
test-cases
Writing this glue code is tedious and error prone, if the written test code does not
depict the specified behavior
Can this intermediate step of writing glue code be automated?
Syntax
GIVEN, an initial context
WHEN, occurrence of an event
THEN, expected outcome
Parameters in Quotes, " "
Connectives - And and Not (only in then condition)
Example
Scenario 1: Account Deposit
Given a bank account with a balance of "100" $
When a customer deposits "20" $
Then the balance of the account should be "120" $
Demo : Create a virtual cStorPool on disk
Feature: create cStorPools
In order to store data efficiently
As a devops admin
I need to be able to create cStorPools
Scenario: create 1 out of 2
Given there are 2 cStorPool requests
When I create 1
Then there should be 1 remaining
openebs/litmus
Litmus is all about kubernetizing godog
It is all about how the software is going to be presented to end user.
End user can debug by running test cases written in language he can understand.
Litmus bridges two world : kubernetes and user
Litmus is generic that can be extended for your application if plugged onto k8s.
Mapping between user stories and corresponding backend api is done via
matching string, which is currently supported.
Litmus feature requests - plans
Have some generic plugins along with user stories.
Auto debug of k8s-failure
Chaos engineering - induce failure and check
Instead of developers coding function with user stories, apply simple yaml
files(using kubernetes CRD)
Feature request to BDD
NLP along with(instead of) Memorization
Natural Language Processing
● Language Augmentation
● Prioritizing/weighting words: based on Part of Speech (POS), e.g., verb, noun, adjective
● Filtering out unimportant words, e.g.,"a", "the", "is"
● Clarifying language meaning using:
● Synonyms
● Stemming
● Grammatical structure
● Using: openNLP, StanfordNLP, WordNet, Snowball
NLP Augmentation engine
● Make inference about order of parameters that are passed.
● Augment with root words and synonyms.
● Make as much inference as possible.
Reference:
Godog
Cucumber
smartBDD-trying out NLP in java, it seems
OpenEBS Hackfest
Each Contributor will get an OpenEBS Hackfest Special edition T-Shirt
Every Week 2 best PR's will get Programming book of their choice
The Best PR of Hackfest can win a laptop
THANKS FOR THE PATIENCE !!
Contributors are welcomed !! https://github.com/openebs/litmus
Support and Follow us @gkGaneshR and @openebs

Mais conteúdo relacionado

Mais procurados

DevLabs Alliance top 20 Cucumber Interview Questions for SDET
DevLabs Alliance top 20 Cucumber Interview Questions for SDETDevLabs Alliance top 20 Cucumber Interview Questions for SDET
DevLabs Alliance top 20 Cucumber Interview Questions for SDETDevLabs Alliance
 
Behat - human-readable automated testing
Behat - human-readable automated testingBehat - human-readable automated testing
Behat - human-readable automated testingnyccamp
 
Calabash Mobile Application Testing Overview
Calabash Mobile Application Testing OverviewCalabash Mobile Application Testing Overview
Calabash Mobile Application Testing OverviewEmil Cordun
 
Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...marcin_pajdzik
 
Mark asoi ppt
Mark asoi pptMark asoi ppt
Mark asoi pptmark-asoi
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go langAmal Mohan N
 
Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven DevelopmentRichard Ruiter
 
Detangling Your JavaScript
Detangling Your JavaScriptDetangling Your JavaScript
Detangling Your JavaScriptChris Powers
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 
Journey to JavaScript (from C#)
Journey to JavaScript (from C#)Journey to JavaScript (from C#)
Journey to JavaScript (from C#)Ed Charbeneau
 
Approval Testing & Mutation Testing - Cork Software Crafters - June 2019
Approval Testing & Mutation Testing - Cork Software Crafters - June 2019Approval Testing & Mutation Testing - Cork Software Crafters - June 2019
Approval Testing & Mutation Testing - Cork Software Crafters - June 2019Paulo Clavijo
 

Mais procurados (17)

BDD with Behat
BDD with BehatBDD with Behat
BDD with Behat
 
DevLabs Alliance top 20 Cucumber Interview Questions for SDET
DevLabs Alliance top 20 Cucumber Interview Questions for SDETDevLabs Alliance top 20 Cucumber Interview Questions for SDET
DevLabs Alliance top 20 Cucumber Interview Questions for SDET
 
Behat - human-readable automated testing
Behat - human-readable automated testingBehat - human-readable automated testing
Behat - human-readable automated testing
 
Calabash Mobile Application Testing Overview
Calabash Mobile Application Testing OverviewCalabash Mobile Application Testing Overview
Calabash Mobile Application Testing Overview
 
Language Workbenches
Language WorkbenchesLanguage Workbenches
Language Workbenches
 
Behavior Driven GUI Testing
Behavior Driven GUI TestingBehavior Driven GUI Testing
Behavior Driven GUI Testing
 
Cucumber in Practice(en)
Cucumber in Practice(en)Cucumber in Practice(en)
Cucumber in Practice(en)
 
Cucumber_Training_ForQA
Cucumber_Training_ForQACucumber_Training_ForQA
Cucumber_Training_ForQA
 
C# 6
C# 6C# 6
C# 6
 
Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...Bridging the gap between business and technology - Behaviour Driven Developme...
Bridging the gap between business and technology - Behaviour Driven Developme...
 
Mark asoi ppt
Mark asoi pptMark asoi ppt
Mark asoi ppt
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
 
Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven Development
 
Detangling Your JavaScript
Detangling Your JavaScriptDetangling Your JavaScript
Detangling Your JavaScript
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Journey to JavaScript (from C#)
Journey to JavaScript (from C#)Journey to JavaScript (from C#)
Journey to JavaScript (from C#)
 
Approval Testing & Mutation Testing - Cork Software Crafters - June 2019
Approval Testing & Mutation Testing - Cork Software Crafters - June 2019Approval Testing & Mutation Testing - Cork Software Crafters - June 2019
Approval Testing & Mutation Testing - Cork Software Crafters - June 2019
 

Semelhante a BDD Testing Using Godog - Bangalore Golang Meetup # 32

Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with PythonBrian Lyttle
 
The pragmatic programmer
The pragmatic programmerThe pragmatic programmer
The pragmatic programmerLeylimYaln
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to GoSimon Hewitt
 
Java And Community Support
Java And Community SupportJava And Community Support
Java And Community SupportWilliam Grosso
 
Advantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksAdvantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksKaty Slemon
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...Maarten Balliauw
 
Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Robin O'Brien
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by ExampleNalin Goonawardana
 
Web performance
Web  performance Web  performance
Web performance Major Ye
 
javabasics_ programming development chapter01
javabasics_ programming development chapter01javabasics_ programming development chapter01
javabasics_ programming development chapter01Udeshg90
 
Agile development with Ruby
Agile development with RubyAgile development with Ruby
Agile development with Rubykhelll
 
DEF CON 23 - Saif el-sherei and etienne stalmans - fuzzing
DEF CON 23 - Saif el-sherei and etienne stalmans - fuzzingDEF CON 23 - Saif el-sherei and etienne stalmans - fuzzing
DEF CON 23 - Saif el-sherei and etienne stalmans - fuzzingFelipe Prado
 
Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven DevelopmentAndy Kelk
 

Semelhante a BDD Testing Using Godog - Bangalore Golang Meetup # 32 (20)

Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with Python
 
The pragmatic programmer
The pragmatic programmerThe pragmatic programmer
The pragmatic programmer
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
Java
JavaJava
Java
 
Java And Community Support
Java And Community SupportJava And Community Support
Java And Community Support
 
Switch case looping
Switch case loopingSwitch case looping
Switch case looping
 
Quick Intro to Clean Coding
Quick Intro to Clean CodingQuick Intro to Clean Coding
Quick Intro to Clean Coding
 
Advantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksAdvantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworks
 
Intro To AOP
Intro To AOPIntro To AOP
Intro To AOP
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
 
Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro
Gherkin /BDD intro
 
C Language
C LanguageC Language
C Language
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Web performance
Web  performance Web  performance
Web performance
 
javabasics_ programming development chapter01
javabasics_ programming development chapter01javabasics_ programming development chapter01
javabasics_ programming development chapter01
 
Agile development with Ruby
Agile development with RubyAgile development with Ruby
Agile development with Ruby
 
DDD with Behat
DDD with BehatDDD with Behat
DDD with Behat
 
DEF CON 23 - Saif el-sherei and etienne stalmans - fuzzing
DEF CON 23 - Saif el-sherei and etienne stalmans - fuzzingDEF CON 23 - Saif el-sherei and etienne stalmans - fuzzing
DEF CON 23 - Saif el-sherei and etienne stalmans - fuzzing
 
Behaviour Driven Development
Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven Development
 

Mais de OpenEBS

Redis Conf 2019--Container Attached Storage for Redis
Redis Conf 2019--Container Attached Storage for RedisRedis Conf 2019--Container Attached Storage for Redis
Redis Conf 2019--Container Attached Storage for RedisOpenEBS
 
Replication and rebuild in cStor
Replication and rebuild in cStorReplication and rebuild in cStor
Replication and rebuild in cStorOpenEBS
 
Data Agility for Devops - OSI 2018
Data Agility for Devops - OSI 2018Data Agility for Devops - OSI 2018
Data Agility for Devops - OSI 2018OpenEBS
 
Introduction to cStor replica - Contributors Meet 5th Oct 2018
Introduction to cStor replica - Contributors Meet 5th Oct 2018Introduction to cStor replica - Contributors Meet 5th Oct 2018
Introduction to cStor replica - Contributors Meet 5th Oct 2018OpenEBS
 
Running OpenEBS on GPDs - Weekly Contributors Meet 28th Sep 2018
Running OpenEBS on GPDs - Weekly Contributors Meet 28th Sep 2018Running OpenEBS on GPDs - Weekly Contributors Meet 28th Sep 2018
Running OpenEBS on GPDs - Weekly Contributors Meet 28th Sep 2018OpenEBS
 
Container Attached Storage (CAS) with OpenEBS - SDC 2018
Container Attached Storage (CAS) with OpenEBS -  SDC 2018Container Attached Storage (CAS) with OpenEBS -  SDC 2018
Container Attached Storage (CAS) with OpenEBS - SDC 2018OpenEBS
 
Volume Policies in OpenEBS 0.7
Volume Policies in OpenEBS 0.7Volume Policies in OpenEBS 0.7
Volume Policies in OpenEBS 0.7OpenEBS
 
Thoughts on heptio's ark - Contributors Meet 21st Sept 2018
Thoughts on heptio's ark - Contributors Meet 21st Sept 2018Thoughts on heptio's ark - Contributors Meet 21st Sept 2018
Thoughts on heptio's ark - Contributors Meet 21st Sept 2018OpenEBS
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications OpenEBS
 
Deploying OpenEBS with Availability Zones
Deploying OpenEBS with Availability ZonesDeploying OpenEBS with Availability Zones
Deploying OpenEBS with Availability ZonesOpenEBS
 
Kubernetes Monitoring and Troubleshooting using Weavescope- Kubernetes Meetup...
Kubernetes Monitoring and Troubleshooting using Weavescope- Kubernetes Meetup...Kubernetes Monitoring and Troubleshooting using Weavescope- Kubernetes Meetup...
Kubernetes Monitoring and Troubleshooting using Weavescope- Kubernetes Meetup...OpenEBS
 
OpenEBS Visualization and Monitoring using Weave-scope - Contributors Meet 1s...
OpenEBS Visualization and Monitoring using Weave-scope - Contributors Meet 1s...OpenEBS Visualization and Monitoring using Weave-scope - Contributors Meet 1s...
OpenEBS Visualization and Monitoring using Weave-scope - Contributors Meet 1s...OpenEBS
 
Container Attached Storage (CAS) with OpenEBS - Berlin Kubernetes Meetup - Ma...
Container Attached Storage (CAS) with OpenEBS - Berlin Kubernetes Meetup - Ma...Container Attached Storage (CAS) with OpenEBS - Berlin Kubernetes Meetup - Ma...
Container Attached Storage (CAS) with OpenEBS - Berlin Kubernetes Meetup - Ma...OpenEBS
 
Container Attached Storage - Chennai Kubernetes Meetup #2 - April 21st 2018
Container Attached Storage - Chennai Kubernetes Meetup #2 - April 21st 2018Container Attached Storage - Chennai Kubernetes Meetup #2 - April 21st 2018
Container Attached Storage - Chennai Kubernetes Meetup #2 - April 21st 2018OpenEBS
 
Kubernetes Visualization-and-Monitoring-using-Weave-scope
Kubernetes Visualization-and-Monitoring-using-Weave-scopeKubernetes Visualization-and-Monitoring-using-Weave-scope
Kubernetes Visualization-and-Monitoring-using-Weave-scopeOpenEBS
 
OpenEBS CAS SDC India - 2018
OpenEBS CAS SDC India - 2018OpenEBS CAS SDC India - 2018
OpenEBS CAS SDC India - 2018OpenEBS
 
OpenEBS hangout #4
OpenEBS hangout #4OpenEBS hangout #4
OpenEBS hangout #4OpenEBS
 
Containerized Storage for Containers
Containerized Storage for ContainersContainerized Storage for Containers
Containerized Storage for ContainersOpenEBS
 
South Bay Kubernetes DevOps
South Bay Kubernetes DevOps South Bay Kubernetes DevOps
South Bay Kubernetes DevOps OpenEBS
 
Containerized Storage for Containers Meetup #3
Containerized Storage for Containers Meetup #3Containerized Storage for Containers Meetup #3
Containerized Storage for Containers Meetup #3OpenEBS
 

Mais de OpenEBS (20)

Redis Conf 2019--Container Attached Storage for Redis
Redis Conf 2019--Container Attached Storage for RedisRedis Conf 2019--Container Attached Storage for Redis
Redis Conf 2019--Container Attached Storage for Redis
 
Replication and rebuild in cStor
Replication and rebuild in cStorReplication and rebuild in cStor
Replication and rebuild in cStor
 
Data Agility for Devops - OSI 2018
Data Agility for Devops - OSI 2018Data Agility for Devops - OSI 2018
Data Agility for Devops - OSI 2018
 
Introduction to cStor replica - Contributors Meet 5th Oct 2018
Introduction to cStor replica - Contributors Meet 5th Oct 2018Introduction to cStor replica - Contributors Meet 5th Oct 2018
Introduction to cStor replica - Contributors Meet 5th Oct 2018
 
Running OpenEBS on GPDs - Weekly Contributors Meet 28th Sep 2018
Running OpenEBS on GPDs - Weekly Contributors Meet 28th Sep 2018Running OpenEBS on GPDs - Weekly Contributors Meet 28th Sep 2018
Running OpenEBS on GPDs - Weekly Contributors Meet 28th Sep 2018
 
Container Attached Storage (CAS) with OpenEBS - SDC 2018
Container Attached Storage (CAS) with OpenEBS -  SDC 2018Container Attached Storage (CAS) with OpenEBS -  SDC 2018
Container Attached Storage (CAS) with OpenEBS - SDC 2018
 
Volume Policies in OpenEBS 0.7
Volume Policies in OpenEBS 0.7Volume Policies in OpenEBS 0.7
Volume Policies in OpenEBS 0.7
 
Thoughts on heptio's ark - Contributors Meet 21st Sept 2018
Thoughts on heptio's ark - Contributors Meet 21st Sept 2018Thoughts on heptio's ark - Contributors Meet 21st Sept 2018
Thoughts on heptio's ark - Contributors Meet 21st Sept 2018
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications
 
Deploying OpenEBS with Availability Zones
Deploying OpenEBS with Availability ZonesDeploying OpenEBS with Availability Zones
Deploying OpenEBS with Availability Zones
 
Kubernetes Monitoring and Troubleshooting using Weavescope- Kubernetes Meetup...
Kubernetes Monitoring and Troubleshooting using Weavescope- Kubernetes Meetup...Kubernetes Monitoring and Troubleshooting using Weavescope- Kubernetes Meetup...
Kubernetes Monitoring and Troubleshooting using Weavescope- Kubernetes Meetup...
 
OpenEBS Visualization and Monitoring using Weave-scope - Contributors Meet 1s...
OpenEBS Visualization and Monitoring using Weave-scope - Contributors Meet 1s...OpenEBS Visualization and Monitoring using Weave-scope - Contributors Meet 1s...
OpenEBS Visualization and Monitoring using Weave-scope - Contributors Meet 1s...
 
Container Attached Storage (CAS) with OpenEBS - Berlin Kubernetes Meetup - Ma...
Container Attached Storage (CAS) with OpenEBS - Berlin Kubernetes Meetup - Ma...Container Attached Storage (CAS) with OpenEBS - Berlin Kubernetes Meetup - Ma...
Container Attached Storage (CAS) with OpenEBS - Berlin Kubernetes Meetup - Ma...
 
Container Attached Storage - Chennai Kubernetes Meetup #2 - April 21st 2018
Container Attached Storage - Chennai Kubernetes Meetup #2 - April 21st 2018Container Attached Storage - Chennai Kubernetes Meetup #2 - April 21st 2018
Container Attached Storage - Chennai Kubernetes Meetup #2 - April 21st 2018
 
Kubernetes Visualization-and-Monitoring-using-Weave-scope
Kubernetes Visualization-and-Monitoring-using-Weave-scopeKubernetes Visualization-and-Monitoring-using-Weave-scope
Kubernetes Visualization-and-Monitoring-using-Weave-scope
 
OpenEBS CAS SDC India - 2018
OpenEBS CAS SDC India - 2018OpenEBS CAS SDC India - 2018
OpenEBS CAS SDC India - 2018
 
OpenEBS hangout #4
OpenEBS hangout #4OpenEBS hangout #4
OpenEBS hangout #4
 
Containerized Storage for Containers
Containerized Storage for ContainersContainerized Storage for Containers
Containerized Storage for Containers
 
South Bay Kubernetes DevOps
South Bay Kubernetes DevOps South Bay Kubernetes DevOps
South Bay Kubernetes DevOps
 
Containerized Storage for Containers Meetup #3
Containerized Storage for Containers Meetup #3Containerized Storage for Containers Meetup #3
Containerized Storage for Containers Meetup #3
 

Último

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 

BDD Testing Using Godog - Bangalore Golang Meetup # 32

  • 1. Using Godog for writing human readable tests @gkGaneshR @openebs
  • 2.
  • 3. Introduction What is Test Driven Development (TDD)? Problems with TDD? Desired "behavior" of an system is specified in terms of code, not always the right way to capture behavior Other stakeholders in Software lifecycle find it hard to be involved in the whole process
  • 4. Unit testing is a component of Test Driven Development // hello_test.go package main import "testing" func TestHello(t *testing.T) { got := Hello() want := "Hello, world" if got != want { t.Errorf("got '%s' want '%s'", got, want) } } // hello.go package main import "fmt" func Hello() string { return "Hello, world" } func main() { fmt.Println(Hello()) }
  • 5. Introduction What is Behaviour Driven Development (BDD)? ● BDD is TDD done right!!! ● BDD uses natural language to describe the "desired behavior" of the system, that can be understood by both the developer and the customer ● Demo of an existing BDD application using Godog predominantly used with golang
  • 6.
  • 7. Need for BDD Automatically generate test code from "behavior" description, eliminating the intermediate step of writing test code. This allows the direct execution of "behaviors" on application code. Godog makes BDD available to the developer community, by reducing the learning curve, time and effort
  • 8. Need for BDD In existing BDD frameworks, developer needs to manually write the glue code which maps "behaviors" to the implementation code This mapping involves writing code for interpreting behaviors in terms of test-cases Writing this glue code is tedious and error prone, if the written test code does not depict the specified behavior Can this intermediate step of writing glue code be automated?
  • 9. Syntax GIVEN, an initial context WHEN, occurrence of an event THEN, expected outcome Parameters in Quotes, " " Connectives - And and Not (only in then condition)
  • 10. Example Scenario 1: Account Deposit Given a bank account with a balance of "100" $ When a customer deposits "20" $ Then the balance of the account should be "120" $
  • 11. Demo : Create a virtual cStorPool on disk Feature: create cStorPools In order to store data efficiently As a devops admin I need to be able to create cStorPools Scenario: create 1 out of 2 Given there are 2 cStorPool requests When I create 1 Then there should be 1 remaining
  • 12. openebs/litmus Litmus is all about kubernetizing godog It is all about how the software is going to be presented to end user. End user can debug by running test cases written in language he can understand. Litmus bridges two world : kubernetes and user Litmus is generic that can be extended for your application if plugged onto k8s. Mapping between user stories and corresponding backend api is done via matching string, which is currently supported.
  • 13. Litmus feature requests - plans Have some generic plugins along with user stories. Auto debug of k8s-failure Chaos engineering - induce failure and check Instead of developers coding function with user stories, apply simple yaml files(using kubernetes CRD)
  • 14.
  • 15. Feature request to BDD NLP along with(instead of) Memorization
  • 16. Natural Language Processing ● Language Augmentation ● Prioritizing/weighting words: based on Part of Speech (POS), e.g., verb, noun, adjective ● Filtering out unimportant words, e.g.,"a", "the", "is" ● Clarifying language meaning using: ● Synonyms ● Stemming ● Grammatical structure ● Using: openNLP, StanfordNLP, WordNet, Snowball
  • 17. NLP Augmentation engine ● Make inference about order of parameters that are passed. ● Augment with root words and synonyms. ● Make as much inference as possible. Reference: Godog Cucumber smartBDD-trying out NLP in java, it seems
  • 18. OpenEBS Hackfest Each Contributor will get an OpenEBS Hackfest Special edition T-Shirt Every Week 2 best PR's will get Programming book of their choice The Best PR of Hackfest can win a laptop
  • 19. THANKS FOR THE PATIENCE !! Contributors are welcomed !! https://github.com/openebs/litmus Support and Follow us @gkGaneshR and @openebs