A step towards next generation of development methodology??Say Hello to “Behavior Driven Development” “BEHAVIOR” sounds cool!I think I can add another “Buzz Word” in my resume!Mahmudul Haque Azad
A brief history (or story) of almost all developers
What is TDD and why it is needed??
But…I have been in development for years with lots of successful projects
Questions that raises in mindWHY the developers feel uncomfortable to write test code, even after completion of development? Is there any way to over come this?
Lets dig a practical example!TDD
What could be the possible test cases.This program should send email if To address is valid.This program should send email if CC address is valid even if To address is not valid This program should send email if BCC address is valid even if CC and To address is not valid. This program should send email even if the subject line is empty. This program should send email even if the body is empty.
And Then…
Lets find a cure!
What ifSpecification /RequirementBehavior of the ModuleHow it will behave in all possible situation?
At first! You must know how the medicine is going to work!Researchers have spent lots of time to figure out a possible format of “requirement specification” that is easy to understand to both technical and non technical person. Experts term this type of language as Ubiquitous Language or Domain Specific Language (DSL).
Lets learn some Buzz Word! Human Computer InteractionUbiquitious LanguageDomain Specific LanguageDDDDomain Driven Design
Why Buzz words in middle of such complex problem?
Good News!What ever your write follow Given-When-Then rule.
Can be written by any person regardless of technical background.
This plain English can be compliable!
Plain English to C#/Java/Python…I can be a language with a simple RULE but I have a name!
Here is the same requirement following this rule!Given that a web based email module has been developed And I am accessing it with proper authenticationWhen I shall write sender email address in To field Or write sender email address in CC filed by not keeping empty the To field Or write sender email address in BCC field by not keeping empty either To fieldAnd keeping the subject field non emptyAnd write something in body text area which excepts rich textAnd press or click send buttonThen my email will be sent And the event will be logged in log file.Isn't it easy to write and read and understand?
Isn't it covers and depicts all possible test cases?
Hey! Isn't it actually writing a documentation of email module to be developed?A new concept!Such type of requirement actually depicts how the module would behave once developed and developer can concentrate more on behavior rather than writing test cases. Such phenomenon are termed as Behavior Driven Development (BDD) and I am pretty sure you have understood the basic concept of BDD by now.Huh!  I know BDD  now and I can add it to my resume without hesitation!
Lets See BDD in Action!For Java: Use Jbehavehttp://jbehave.org/reference/stable/getting-started.htmlFor .Net use SpecFlow.

Say Hello 2 Bdd

  • 1.
    A step towardsnext generation of development methodology??Say Hello to “Behavior Driven Development” “BEHAVIOR” sounds cool!I think I can add another “Buzz Word” in my resume!Mahmudul Haque Azad
  • 2.
    A brief history(or story) of almost all developers
  • 3.
    What is TDDand why it is needed??
  • 4.
    But…I have beenin development for years with lots of successful projects
  • 5.
    Questions that raisesin mindWHY the developers feel uncomfortable to write test code, even after completion of development? Is there any way to over come this?
  • 6.
    Lets dig apractical example!TDD
  • 7.
    What could bethe possible test cases.This program should send email if To address is valid.This program should send email if CC address is valid even if To address is not valid This program should send email if BCC address is valid even if CC and To address is not valid. This program should send email even if the subject line is empty. This program should send email even if the body is empty.
  • 8.
  • 9.
  • 10.
    What ifSpecification /RequirementBehaviorof the ModuleHow it will behave in all possible situation?
  • 11.
    At first! Youmust know how the medicine is going to work!Researchers have spent lots of time to figure out a possible format of “requirement specification” that is easy to understand to both technical and non technical person. Experts term this type of language as Ubiquitous Language or Domain Specific Language (DSL).
  • 12.
    Lets learn someBuzz Word! Human Computer InteractionUbiquitious LanguageDomain Specific LanguageDDDDomain Driven Design
  • 13.
    Why Buzz wordsin middle of such complex problem?
  • 14.
    Good News!What everyour write follow Given-When-Then rule.
  • 15.
    Can be writtenby any person regardless of technical background.
  • 16.
    This plain Englishcan be compliable!
  • 17.
    Plain English toC#/Java/Python…I can be a language with a simple RULE but I have a name!
  • 18.
    Here is thesame requirement following this rule!Given that a web based email module has been developed And I am accessing it with proper authenticationWhen I shall write sender email address in To field Or write sender email address in CC filed by not keeping empty the To field Or write sender email address in BCC field by not keeping empty either To fieldAnd keeping the subject field non emptyAnd write something in body text area which excepts rich textAnd press or click send buttonThen my email will be sent And the event will be logged in log file.Isn't it easy to write and read and understand?
  • 19.
    Isn't it coversand depicts all possible test cases?
  • 20.
    Hey! Isn't itactually writing a documentation of email module to be developed?A new concept!Such type of requirement actually depicts how the module would behave once developed and developer can concentrate more on behavior rather than writing test cases. Such phenomenon are termed as Behavior Driven Development (BDD) and I am pretty sure you have understood the basic concept of BDD by now.Huh! I know BDD now and I can add it to my resume without hesitation!
  • 21.
    Lets See BDDin Action!For Java: Use Jbehavehttp://jbehave.org/reference/stable/getting-started.htmlFor .Net use SpecFlow.