Concordion & ATDD (Lightning Talk)

13
Acceptance Test Driven Development with Concordion By Mike McGarr
  • date post

    21-Oct-2014
  • Category

    Technology

  • view

    2.559
  • download

    1

description

A 5-minute presentation on Concordion and the concept of Acceptance Test Driven Development (ATDD).

Transcript of Concordion & ATDD (Lightning Talk)

Page 1: Concordion & ATDD (Lightning Talk)

Acceptance Test Driven Development with Concordion

By Mike McGarr

Page 2: Concordion & ATDD (Lightning Talk)

Acceptance Test Driven Development?

ATDD is TDD applied at a coarse grain level.With ATDD your focus is on verifying behavior that is visible to customersThe emphasis is on creating executable specifications (user stories, use cases, etc.)Like TDD, you define your behavior first, write a failing test, and then write the code.

Page 3: Concordion & ATDD (Lightning Talk)

ATDD & TDD

http://www.methodsandtools.com/archive/archive.php?id=72p9

Page 4: Concordion & ATDD (Lightning Talk)

What we wantedJava-based frameworkEasily integrated with Maven and HudsonProvided traceabilityPublish requirements/test results

Page 5: Concordion & ATDD (Lightning Talk)

ConcordionAn open source Java framework built on JUnitHTML-based specifications

Page 6: Concordion & ATDD (Lightning Talk)

How Concordion Works

http://www.concordion.org/

Page 7: Concordion & ATDD (Lightning Talk)

How Concordion Works<html xmlns:concordion="http://www.concordion.org/2007/concordion"><head><title>Record Type Code</title></head> <body> <h1>00001 - Record Type Code</h1> <p>The following record type codes are valid. All other codes will cause a record to be rejected.</p> <div class="example"> 01 = Separation 02 = Transfer 03 = At Retirement 04 = Death in Service 05 = FERS Election 06 = Preliminary Disability Retirement 07 = Re-employed Annuitant </div>

<div class="example"> <h3>Acceptance Criteria</h3> <table concordion:execute="#isValid = validateRecordTypeCode(#recordType, #recordTypeCode)"> <tr> <th concordion:set="#recordType">Record Type</th> <th concordion:set="#recordTypeCode">Record Type Code</th> <th concordion:assertEquals="#isValid">Is Valid?</th> </tr> <tr> <td>ElectronicRetirementRecord</td> <td>00</td> <td>false</td> </tr> …

<html><head><title>Record Type Code</title></head> <body> <h1>00001 - Record Type Code</h1> <p>The following record type codes are valid. All other codes will cause a record to be rejected.</p> <div class="example"> 01 = Separation 02 = Transfer 03 = At Retirement 04 = Death in Service 05 = FERS Election 06 = Preliminary Disability Retirement 07 = Re-employed Annuitant </div>

<div class="example"> <h3>Acceptance Criteria</h3> <table> <tr> <th>Record Type</th> <th>Record Type Code</th> <th>Is Valid?</th> </tr> <tr> <td>ElectronicRetirementRecord</td> <td>00</td> <td>false</td> </tr> …

Page 8: Concordion & ATDD (Lightning Talk)

How Concordion Works

Page 9: Concordion & ATDD (Lightning Talk)

AdvantagesNo requirements documentRequirements, code, tests versioned togetherAllows for a variety of requirements stylesCustomers can easily see which requirements are passingCustomers don’t need to learn a new requirements styleWorks great with Build Pipelines

Page 10: Concordion & ATDD (Lightning Talk)

Things to ConsiderStill need to write an Application DriverRequirements written in HTML

Page 11: Concordion & ATDD (Lightning Talk)

Concordion AlternativesTabular Style Requirements

FitFitNesse

Behaviour Driven DevelopmenteasybJBehave

Page 12: Concordion & ATDD (Lightning Talk)

Further ReadingConcordion, http://www.concordion.org Acceptance TDD Explained, http://bit.ly/9eRyXq Books

Test Driven: Practical TDD and Acceptance TDD for Java Developers, by Lasse Koskela, http://www.manning.com/koskela

Growing Object Oriented Code, Guided by Tests, by Steve Freeman and Nat Pryce, http://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/0321503627

Page 13: Concordion & ATDD (Lightning Talk)

About MeMike McGarrExcella Consulting Lead for Excella’s Java Center of ExcellenceConsulting for Federal and Commercial clientsInterested in Agile Software [email protected]@jmichaelmcgarrhttp://earlyandoften.wordpress.com