SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
Java EE Behave!!!!
                                     Behaviour-Driven Development with Java EE

                                                                     Aaron Walker
                                                        a.walker@base2services.com
                                                                       @aaronwalker
                                                               http://aaronwalker.me
                                                       http://www.base2services.com
                                                                              #jeebehave
base2Services Pty Ltd Commercial in Confidence 2010
Agenda
                        • What is this BDD thingy
                        • JBehave
                        • How to make your tests behave!
                               •         { Demo }

                        • Java EE flavouring
                               •         { Demo }

                        • Q &A
                                                                     #jeebehave
                                                              base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
BDD
                                           ~ Behaviour Driven Development ~

                       “BDD facilitates agile development, which is an
                       approach to develop functional software, within
                         reasonable timeline, making everyone happy,
                                  without killing anyone, or
                                  burning down any bank.”

                                                                                 #jeebehave
                                                                          base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
BDD's Core Principles
                   •        It's all behaviour
                                  “The business & technology people should be
                                 speaking the same words when referring to the
                                 same idea,there should not be any translator.”
                   Behaviour: the addition of N values should yield the
                   summation of them

                   Example: the addition of 2 + 4 + 2 should yield 8

                                                                              #jeebehave
                                                                       base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
BDD's Core Principles

                   •        The evolution of test-driven development
                            (TDD) and acceptance-test driven design
                   •        Shifts the vocabulary from being test-based
                            to behaviour-based
                   •        Essentially a design philosophy


                                                                      #jeebehave
                                                               base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
Unit testing
                          frameworks mismatch
                                                     It’s all about the Behaviour




                                                                                    #jeebehave
base2Services Pty Ltd Commercial in Confidence 2010
Oh JBehave
                        •       a framework for Behaviour-Driven
                                Development.

                        •       pure Java implementation

                        •       Users can specify and run plain text-
                                based user stories

                        •       Annotation-based configuration and
                                Steps class specifications

                        •       Dependency Injection support (more
                                on this one later)

                        •       Tool/IDE integration

                               •       Ant, Maven, Selenium, Eclipse, IntelliJ,
                                       Netbeans

                                                                                         #jeebehave
                                                                                  base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
Yep....plain text




                                                                                #jeebehave
                                                                         base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
Narrative
                   • Describes the overall intent of the story
                   • Generally describes a single feature or use
                            case
                   • Should include any participating actors
                            “In order to learn about BDD and JBehave as
                            a JavaOne attendee I will attend session
                            24421- JEE Behave!”
                                                                        #jeebehave
                                                                 base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
Scenario

                   • Describes a specific interaction
                   • Generally fine-grained
                               •         test valid and invalid outcomes

                   • Support for parametrisation
                            “Scenario: User signs up with invalid data”

                                                                                  #jeebehave
                                                                           base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
Given|When|Then|And
                        • Given ... setting up system to a known
                                 state
                        • When ... exercising an event
                        • Then ... verifying an outcome
                        • And ... used to chain multiple Given, When
                                 and Then statements

                                                                    #jeebehave
                                                             base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
So where’s the Java?
                        •        Mapping Textual Scenario Steps to Java Methods via
                                 annotations
                        •         Steps instances may inherit or implement other class/
                                 interface as required by the model of the application under
                                 test.
                        •        allows many different ways to configure Embeddable Java
                                 classes
                               •         ConfigurableEmbedder: allows the specification of the
                                         Configuration and CandidateSteps.
                               •         InjectableEmbedder: allows the injection of a fully specified
                                         Embedder.
                                                                                                 #jeebehave
                                                                                          base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
JUnit
                        •        JUnit is supported out-of-the-box via several
                                 Embeddables implementations:
                               •         JUnitStory: provides a one-to-one mapping
                                         with the textual story via the
                                         StoryPathResolver.
                               •         JUnitStories: provides a many-to-one
                                         mapping with the textual story paths
                                         explicitly specified by overriding the
                                         storyPaths() method.
                                                                                        #jeebehave
                                                                                 base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
One Step at a time




                                                            #jeebehave
                                                     base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
And the config
                        • Fluent API for specifying configuration




                                                                            #jeebehave
                                                                     base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
{ Demo }
                                                      Enough Slide-ware
                                                     Show me the Code!!!




                                                                                  #jeebehave
                                                                           base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
Now lets sprinkle a
                            little bit of JEE on top

                                                            #jeebehave
                                                     base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
CDI/Weld

                        • Contexts and Dependency Injection for
                                 Java
                               •         (JSR-299 included in JEE6)

                        • Weld is the reference implementation
                               •         http://seamframework.org/Weld



                                                                                #jeebehave
                                                                         base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
JBehave CDI support
                        • jbehave-weld module
                               •         Uses Weld Java-SE integration to bootstrap the CDI
                                         container

                        • can inject configuration and steps using
                                 CDI annotations
                        • greatly simplifies the configuration and
                                 management of step classes
                                                                                           #jeebehave
                                                                                    base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
Inject the Configuration
                        •        Use a CDI @Produces along with a
                                 @WeldConfiguration qualifier annotation
                        •        Gets automatically injected into the running
                                 scenario




                                                                               #jeebehave
                                                                        base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
What about the Steps
                        •        Simply mark Step classes with a @WeldStep
                                 annotation
                        •        They get automatically added as candidate steps
                        •        Steps can use @Inject to inject dependencies




                                                                              #jeebehave
                                                                       base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
{ Demo }
                                                     Show me a better way!!!




                                                                                      #jeebehave
                                                                               base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
JBehave Web
                        • JBehave Web is an extension of the JBehave
                                 framework providing a web integration layer
                        • Features include:
                               •         Web Queue to allow generic stories to be run asynchronously
                                         via a simple web interface.

                               •         Web Runner to allow generic stories to be run synchronously
                                         via a simple web interface.

                               •         Selenium integration module to allow automation of stories
                                         for web applications using Selenium.
                                                                                                #jeebehave
                                                                                         base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
{ Demo }
                                                 Now let’s put all this together




                                                                                          #jeebehave
                                                                                   base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
System Integration
                                           Testing
                        • JBehave is a good language for describing
                                 system integration
                        • BA’s, QA’s, architects, and developers are all
                                 speaking the same language
                        • Self documented acceptance tests
                                                                       #jeebehave
                                                                base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
What’s Next

                        • Custom CDI Scopes
                         • @StoryScope, @ScenarioScope
                        • Arquillian Integration
                        • ???????
                                                                          #jeebehave
                                                                   base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010
Q &A
                        • http://behaviour-driven.org/
                        • http://jbehave.org - JBehave project site
                        • github.com/aaronwalker/JavaOne2011 -
                                 demo code
                        • http://aaronwalker.me - blog
                        • a.walker@base2services.com - email
                        • @aaronwalker - twitter
                                                                       #jeebehave
                                                                base2Services Pty Ltd 2011
base2Services Pty Ltd Commercial in Confidence 2010

Weitere ähnliche Inhalte

Was ist angesagt?

The Executive Centre Brisbane
The Executive Centre BrisbaneThe Executive Centre Brisbane
The Executive Centre Brisbaneferrypranata
 
Introduction to design specifications to Summer of Code NZ students
Introduction to design specifications to Summer of Code NZ studentsIntroduction to design specifications to Summer of Code NZ students
Introduction to design specifications to Summer of Code NZ studentsLulu Pachuau
 
TAUS MT SHOWCASE, Strategies for Building Competitive Advantage and Revenue f...
TAUS MT SHOWCASE, Strategies for Building Competitive Advantage and Revenue f...TAUS MT SHOWCASE, Strategies for Building Competitive Advantage and Revenue f...
TAUS MT SHOWCASE, Strategies for Building Competitive Advantage and Revenue f...TAUS - The Language Data Network
 
IPexcel - Company Overview
IPexcel - Company OverviewIPexcel - Company Overview
IPexcel - Company OverviewIPexcel
 
Final indocorp group brochure small size
Final indocorp group brochure small sizeFinal indocorp group brochure small size
Final indocorp group brochure small sizeSrikant Gupta
 

Was ist angesagt? (6)

The Executive Centre Brisbane
The Executive Centre BrisbaneThe Executive Centre Brisbane
The Executive Centre Brisbane
 
Introduction to design specifications to Summer of Code NZ students
Introduction to design specifications to Summer of Code NZ studentsIntroduction to design specifications to Summer of Code NZ students
Introduction to design specifications to Summer of Code NZ students
 
Business Skils For Technical Profession
Business Skils For Technical ProfessionBusiness Skils For Technical Profession
Business Skils For Technical Profession
 
TAUS MT SHOWCASE, Strategies for Building Competitive Advantage and Revenue f...
TAUS MT SHOWCASE, Strategies for Building Competitive Advantage and Revenue f...TAUS MT SHOWCASE, Strategies for Building Competitive Advantage and Revenue f...
TAUS MT SHOWCASE, Strategies for Building Competitive Advantage and Revenue f...
 
IPexcel - Company Overview
IPexcel - Company OverviewIPexcel - Company Overview
IPexcel - Company Overview
 
Final indocorp group brochure small size
Final indocorp group brochure small sizeFinal indocorp group brochure small size
Final indocorp group brochure small size
 

Ähnlich wie Java EE Behave!!!!

OSDC 2010 - You've Got Cucumber in my Java and it Tastes Great
OSDC 2010 - You've Got Cucumber in my Java and it Tastes GreatOSDC 2010 - You've Got Cucumber in my Java and it Tastes Great
OSDC 2010 - You've Got Cucumber in my Java and it Tastes GreatAaron Walker
 
Enterprise IPv6 Deployment
Enterprise IPv6 Deployment Enterprise IPv6 Deployment
Enterprise IPv6 Deployment Cisco Canada
 
Running successful agile projects
Running successful agile projectsRunning successful agile projects
Running successful agile projectsMartin Aspeli
 
The Conversation Roadmap A Foundation for Better Sales Tools and More
The Conversation Roadmap A Foundation for Better Sales Tools and MoreThe Conversation Roadmap A Foundation for Better Sales Tools and More
The Conversation Roadmap A Foundation for Better Sales Tools and MoreCorporate Visions
 
Ebsylon & IRML KIID Services
Ebsylon & IRML KIID ServicesEbsylon & IRML KIID Services
Ebsylon & IRML KIID Servicesebsylon
 
A study of the characteristics of Behaviour Driven Development
A study of the characteristics of Behaviour Driven DevelopmentA study of the characteristics of Behaviour Driven Development
A study of the characteristics of Behaviour Driven DevelopmentCarlos Solís
 
Common mistakes, pitfalls and misconceptions to avoid when launching your DAM...
Common mistakes, pitfalls and misconceptions to avoid when launching your DAM...Common mistakes, pitfalls and misconceptions to avoid when launching your DAM...
Common mistakes, pitfalls and misconceptions to avoid when launching your DAM...joel_warwick
 
Enterprise Cloud Development and Agile Transformation Strategy - China 2012
Enterprise Cloud Development and Agile Transformation Strategy - China 2012 Enterprise Cloud Development and Agile Transformation Strategy - China 2012
Enterprise Cloud Development and Agile Transformation Strategy - China 2012 Laszlo Szalvay
 
Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...
Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...
Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...Cheryl McKinnon
 
DbyDx Software Corporate Presentation
DbyDx Software Corporate PresentationDbyDx Software Corporate Presentation
DbyDx Software Corporate PresentationDbyDx Software
 
ETIS10 - BI Business Requirements - Presentation
ETIS10 - BI Business Requirements - PresentationETIS10 - BI Business Requirements - Presentation
ETIS10 - BI Business Requirements - PresentationDavid Walker
 
ProV - Your search for IT services partner ends here
ProV - Your search for IT services partner ends hereProV - Your search for IT services partner ends here
ProV - Your search for IT services partner ends hereProV International
 
Craft Compelling Interactive Content for Live Online Training
Craft Compelling Interactive Content for Live Online TrainingCraft Compelling Interactive Content for Live Online Training
Craft Compelling Interactive Content for Live Online TrainingRaptivity
 
HP Discover Session BB2160: Agile DevOps Continuous Delivery
HP Discover Session BB2160:  Agile DevOps Continuous DeliveryHP Discover Session BB2160:  Agile DevOps Continuous Delivery
HP Discover Session BB2160: Agile DevOps Continuous DeliveryCapgemini
 
Unlock Value in Your Oracle Business Intelligence Investments
Unlock Value in Your Oracle Business Intelligence InvestmentsUnlock Value in Your Oracle Business Intelligence Investments
Unlock Value in Your Oracle Business Intelligence InvestmentsJade Global
 
Composite Applications with SOA, BPEL and Java EE
Composite  Applications with SOA, BPEL and Java EEComposite  Applications with SOA, BPEL and Java EE
Composite Applications with SOA, BPEL and Java EEDmitri Shiryaev
 
2007: Achieving Interoperability In Systems Architecture - SOA Vision And Rea...
2007: Achieving Interoperability In Systems Architecture - SOA Vision And Rea...2007: Achieving Interoperability In Systems Architecture - SOA Vision And Rea...
2007: Achieving Interoperability In Systems Architecture - SOA Vision And Rea...rchopra13
 

Ähnlich wie Java EE Behave!!!! (20)

OSDC 2010 - You've Got Cucumber in my Java and it Tastes Great
OSDC 2010 - You've Got Cucumber in my Java and it Tastes GreatOSDC 2010 - You've Got Cucumber in my Java and it Tastes Great
OSDC 2010 - You've Got Cucumber in my Java and it Tastes Great
 
Telcom Offshoring
Telcom OffshoringTelcom Offshoring
Telcom Offshoring
 
Enterprise IPv6 Deployment
Enterprise IPv6 Deployment Enterprise IPv6 Deployment
Enterprise IPv6 Deployment
 
Running successful agile projects
Running successful agile projectsRunning successful agile projects
Running successful agile projects
 
The Conversation Roadmap A Foundation for Better Sales Tools and More
The Conversation Roadmap A Foundation for Better Sales Tools and MoreThe Conversation Roadmap A Foundation for Better Sales Tools and More
The Conversation Roadmap A Foundation for Better Sales Tools and More
 
Ebsylon & IRML KIID Services
Ebsylon & IRML KIID ServicesEbsylon & IRML KIID Services
Ebsylon & IRML KIID Services
 
A study of the characteristics of Behaviour Driven Development
A study of the characteristics of Behaviour Driven DevelopmentA study of the characteristics of Behaviour Driven Development
A study of the characteristics of Behaviour Driven Development
 
Common mistakes, pitfalls and misconceptions to avoid when launching your DAM...
Common mistakes, pitfalls and misconceptions to avoid when launching your DAM...Common mistakes, pitfalls and misconceptions to avoid when launching your DAM...
Common mistakes, pitfalls and misconceptions to avoid when launching your DAM...
 
Siebel_CRM_6yrs_Prof
Siebel_CRM_6yrs_ProfSiebel_CRM_6yrs_Prof
Siebel_CRM_6yrs_Prof
 
Enterprise Cloud Development and Agile Transformation Strategy - China 2012
Enterprise Cloud Development and Agile Transformation Strategy - China 2012 Enterprise Cloud Development and Agile Transformation Strategy - China 2012
Enterprise Cloud Development and Agile Transformation Strategy - China 2012
 
Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...
Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...
Capture is Powerful - Harvey Spencer presentation to AIIM Ottawa Event Oct 27...
 
DbyDx Software Corporate Presentation
DbyDx Software Corporate PresentationDbyDx Software Corporate Presentation
DbyDx Software Corporate Presentation
 
ETIS10 - BI Business Requirements - Presentation
ETIS10 - BI Business Requirements - PresentationETIS10 - BI Business Requirements - Presentation
ETIS10 - BI Business Requirements - Presentation
 
ProV - Your search for IT services partner ends here
ProV - Your search for IT services partner ends hereProV - Your search for IT services partner ends here
ProV - Your search for IT services partner ends here
 
Craft Compelling Interactive Content for Live Online Training
Craft Compelling Interactive Content for Live Online TrainingCraft Compelling Interactive Content for Live Online Training
Craft Compelling Interactive Content for Live Online Training
 
HP Discover Session BB2160: Agile DevOps Continuous Delivery
HP Discover Session BB2160:  Agile DevOps Continuous DeliveryHP Discover Session BB2160:  Agile DevOps Continuous Delivery
HP Discover Session BB2160: Agile DevOps Continuous Delivery
 
Unlock Value in Your Oracle Business Intelligence Investments
Unlock Value in Your Oracle Business Intelligence InvestmentsUnlock Value in Your Oracle Business Intelligence Investments
Unlock Value in Your Oracle Business Intelligence Investments
 
Composite Applications with SOA, BPEL and Java EE
Composite  Applications with SOA, BPEL and Java EEComposite  Applications with SOA, BPEL and Java EE
Composite Applications with SOA, BPEL and Java EE
 
2007: Achieving Interoperability In Systems Architecture - SOA Vision And Rea...
2007: Achieving Interoperability In Systems Architecture - SOA Vision And Rea...2007: Achieving Interoperability In Systems Architecture - SOA Vision And Rea...
2007: Achieving Interoperability In Systems Architecture - SOA Vision And Rea...
 
Dbydx profile
Dbydx profileDbydx profile
Dbydx profile
 

Mehr von Aaron Walker

Just Enough Infrastructure
Just Enough InfrastructureJust Enough Infrastructure
Just Enough InfrastructureAaron Walker
 
Amazon VPC Lattice: The Service Mesh you actually want!!
Amazon VPC Lattice: The Service Mesh you actually want!!Amazon VPC Lattice: The Service Mesh you actually want!!
Amazon VPC Lattice: The Service Mesh you actually want!!Aaron Walker
 
Berlin AWS User Group - 10 May 2022
Berlin AWS User Group - 10 May 2022 Berlin AWS User Group - 10 May 2022
Berlin AWS User Group - 10 May 2022 Aaron Walker
 
Do you REALLY know what is going on in your AWS Accounts?
Do you REALLY know what is going on in your AWS Accounts?Do you REALLY know what is going on in your AWS Accounts?
Do you REALLY know what is going on in your AWS Accounts?Aaron Walker
 
Berlin CI/CD Meetup - Reusable Serverless CI/CD pipelines with Jenkins
Berlin CI/CD Meetup - Reusable Serverless CI/CD pipelines with JenkinsBerlin CI/CD Meetup - Reusable Serverless CI/CD pipelines with Jenkins
Berlin CI/CD Meetup - Reusable Serverless CI/CD pipelines with JenkinsAaron Walker
 
Meetup - AWS Berlin October 2018 - Account Management and AWS Organizations
Meetup - AWS Berlin October 2018 - Account Management and AWS OrganizationsMeetup - AWS Berlin October 2018 - Account Management and AWS Organizations
Meetup - AWS Berlin October 2018 - Account Management and AWS OrganizationsAaron Walker
 
Meetup AWS Berlin July 2018 - You're writing WAY too much CloudFormation
Meetup AWS Berlin July 2018 - You're writing WAY too much CloudFormationMeetup AWS Berlin July 2018 - You're writing WAY too much CloudFormation
Meetup AWS Berlin July 2018 - You're writing WAY too much CloudFormationAaron Walker
 
Berlin DevOps Meetup 2018-07-12
Berlin DevOps Meetup 2018-07-12Berlin DevOps Meetup 2018-07-12
Berlin DevOps Meetup 2018-07-12Aaron Walker
 
Enabling your DevOps culture with AWS-webinar
Enabling your DevOps culture with AWS-webinarEnabling your DevOps culture with AWS-webinar
Enabling your DevOps culture with AWS-webinarAaron Walker
 
Enabling your DevOps culture with AWS
Enabling your DevOps culture with AWSEnabling your DevOps culture with AWS
Enabling your DevOps culture with AWSAaron Walker
 
JavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the Cloud
JavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the CloudJavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the Cloud
JavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the CloudAaron Walker
 
OSDC-2010 Database Full-text Search.... making it not suck
OSDC-2010 Database Full-text Search.... making it not suckOSDC-2010 Database Full-text Search.... making it not suck
OSDC-2010 Database Full-text Search.... making it not suckAaron Walker
 

Mehr von Aaron Walker (12)

Just Enough Infrastructure
Just Enough InfrastructureJust Enough Infrastructure
Just Enough Infrastructure
 
Amazon VPC Lattice: The Service Mesh you actually want!!
Amazon VPC Lattice: The Service Mesh you actually want!!Amazon VPC Lattice: The Service Mesh you actually want!!
Amazon VPC Lattice: The Service Mesh you actually want!!
 
Berlin AWS User Group - 10 May 2022
Berlin AWS User Group - 10 May 2022 Berlin AWS User Group - 10 May 2022
Berlin AWS User Group - 10 May 2022
 
Do you REALLY know what is going on in your AWS Accounts?
Do you REALLY know what is going on in your AWS Accounts?Do you REALLY know what is going on in your AWS Accounts?
Do you REALLY know what is going on in your AWS Accounts?
 
Berlin CI/CD Meetup - Reusable Serverless CI/CD pipelines with Jenkins
Berlin CI/CD Meetup - Reusable Serverless CI/CD pipelines with JenkinsBerlin CI/CD Meetup - Reusable Serverless CI/CD pipelines with Jenkins
Berlin CI/CD Meetup - Reusable Serverless CI/CD pipelines with Jenkins
 
Meetup - AWS Berlin October 2018 - Account Management and AWS Organizations
Meetup - AWS Berlin October 2018 - Account Management and AWS OrganizationsMeetup - AWS Berlin October 2018 - Account Management and AWS Organizations
Meetup - AWS Berlin October 2018 - Account Management and AWS Organizations
 
Meetup AWS Berlin July 2018 - You're writing WAY too much CloudFormation
Meetup AWS Berlin July 2018 - You're writing WAY too much CloudFormationMeetup AWS Berlin July 2018 - You're writing WAY too much CloudFormation
Meetup AWS Berlin July 2018 - You're writing WAY too much CloudFormation
 
Berlin DevOps Meetup 2018-07-12
Berlin DevOps Meetup 2018-07-12Berlin DevOps Meetup 2018-07-12
Berlin DevOps Meetup 2018-07-12
 
Enabling your DevOps culture with AWS-webinar
Enabling your DevOps culture with AWS-webinarEnabling your DevOps culture with AWS-webinar
Enabling your DevOps culture with AWS-webinar
 
Enabling your DevOps culture with AWS
Enabling your DevOps culture with AWSEnabling your DevOps culture with AWS
Enabling your DevOps culture with AWS
 
JavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the Cloud
JavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the CloudJavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the Cloud
JavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the Cloud
 
OSDC-2010 Database Full-text Search.... making it not suck
OSDC-2010 Database Full-text Search.... making it not suckOSDC-2010 Database Full-text Search.... making it not suck
OSDC-2010 Database Full-text Search.... making it not suck
 

Kürzlich hochgeladen

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Kürzlich hochgeladen (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Java EE Behave!!!!

  • 1. Java EE Behave!!!! Behaviour-Driven Development with Java EE Aaron Walker a.walker@base2services.com @aaronwalker http://aaronwalker.me http://www.base2services.com #jeebehave base2Services Pty Ltd Commercial in Confidence 2010
  • 2. Agenda • What is this BDD thingy • JBehave • How to make your tests behave! • { Demo } • Java EE flavouring • { Demo } • Q &A #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 3. BDD ~ Behaviour Driven Development ~ “BDD facilitates agile development, which is an approach to develop functional software, within reasonable timeline, making everyone happy, without killing anyone, or burning down any bank.” #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 4. BDD's Core Principles • It's all behaviour “The business & technology people should be speaking the same words when referring to the same idea,there should not be any translator.” Behaviour: the addition of N values should yield the summation of them Example: the addition of 2 + 4 + 2 should yield 8 #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 5. BDD's Core Principles • The evolution of test-driven development (TDD) and acceptance-test driven design • Shifts the vocabulary from being test-based to behaviour-based • Essentially a design philosophy #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 6. Unit testing frameworks mismatch It’s all about the Behaviour #jeebehave base2Services Pty Ltd Commercial in Confidence 2010
  • 7. Oh JBehave • a framework for Behaviour-Driven Development. • pure Java implementation • Users can specify and run plain text- based user stories • Annotation-based configuration and Steps class specifications • Dependency Injection support (more on this one later) • Tool/IDE integration • Ant, Maven, Selenium, Eclipse, IntelliJ, Netbeans #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 8. Yep....plain text #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 9. Narrative • Describes the overall intent of the story • Generally describes a single feature or use case • Should include any participating actors “In order to learn about BDD and JBehave as a JavaOne attendee I will attend session 24421- JEE Behave!” #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 10. Scenario • Describes a specific interaction • Generally fine-grained • test valid and invalid outcomes • Support for parametrisation “Scenario: User signs up with invalid data” #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 11. Given|When|Then|And • Given ... setting up system to a known state • When ... exercising an event • Then ... verifying an outcome • And ... used to chain multiple Given, When and Then statements #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 12. So where’s the Java? • Mapping Textual Scenario Steps to Java Methods via annotations • Steps instances may inherit or implement other class/ interface as required by the model of the application under test. • allows many different ways to configure Embeddable Java classes • ConfigurableEmbedder: allows the specification of the Configuration and CandidateSteps. • InjectableEmbedder: allows the injection of a fully specified Embedder. #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 13. JUnit • JUnit is supported out-of-the-box via several Embeddables implementations: • JUnitStory: provides a one-to-one mapping with the textual story via the StoryPathResolver. • JUnitStories: provides a many-to-one mapping with the textual story paths explicitly specified by overriding the storyPaths() method. #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 14. One Step at a time #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 15. And the config • Fluent API for specifying configuration #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 16. { Demo } Enough Slide-ware Show me the Code!!! #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 17. Now lets sprinkle a little bit of JEE on top #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 18. CDI/Weld • Contexts and Dependency Injection for Java • (JSR-299 included in JEE6) • Weld is the reference implementation • http://seamframework.org/Weld #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 19. JBehave CDI support • jbehave-weld module • Uses Weld Java-SE integration to bootstrap the CDI container • can inject configuration and steps using CDI annotations • greatly simplifies the configuration and management of step classes #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 20. Inject the Configuration • Use a CDI @Produces along with a @WeldConfiguration qualifier annotation • Gets automatically injected into the running scenario #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 21. What about the Steps • Simply mark Step classes with a @WeldStep annotation • They get automatically added as candidate steps • Steps can use @Inject to inject dependencies #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 22. { Demo } Show me a better way!!! #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 23. JBehave Web • JBehave Web is an extension of the JBehave framework providing a web integration layer • Features include: • Web Queue to allow generic stories to be run asynchronously via a simple web interface. • Web Runner to allow generic stories to be run synchronously via a simple web interface. • Selenium integration module to allow automation of stories for web applications using Selenium. #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 24. { Demo } Now let’s put all this together #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 25. System Integration Testing • JBehave is a good language for describing system integration • BA’s, QA’s, architects, and developers are all speaking the same language • Self documented acceptance tests #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 26. What’s Next • Custom CDI Scopes • @StoryScope, @ScenarioScope • Arquillian Integration • ??????? #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010
  • 27. Q &A • http://behaviour-driven.org/ • http://jbehave.org - JBehave project site • github.com/aaronwalker/JavaOne2011 - demo code • http://aaronwalker.me - blog • a.walker@base2services.com - email • @aaronwalker - twitter #jeebehave base2Services Pty Ltd 2011 base2Services Pty Ltd Commercial in Confidence 2010