Behavior Driven Development BDDandContinuous Integration Delivery CI CD
Behavior Driven Development BDDandContinuous Integration Delivery CI CD
• Unit Tests focuses on testing a specific unit or component, such as a class method.
It confirms that the function is built right.
• Acceptance Tests are the final level of testing which verifies whether the system’s
functionality matches the specification. It confirms whether we have built the
right thing.
Overview of BDD
• The Agile methodology implements testing and validation as an ongoing process, via the
“as a user” approach. BDD using the same approach, makes it the most suitable practice
within Agile.
• BDD focuses on the acceptance criteria from the inception by defining how each feature
of the application should behave from the end user’s perspective.
• BDD enables collaboration across all stake holders: Customer, Dev & QA
• In BDD, the Scenarios are created using DSL (Domain Specific Language) and the Code is
written to support the target behavior
• BDD results into faster user acceptance cycles leading to faster deployments
More insights
BDD is an abstraction of TDD (Test Driven Development) .They both essentially follow the same
practices, but, BDD focuses more on the behavior of the application, rather than implementation,
using a language where all stakeholders can participate and collaborate.
TDD vs BDD
TDD BDD
( Test Driven Development ) ( Behavior Driven Development )
Focuses on the developer’s opinion on how Focuses on the user’s opinion on how they
functions of the software should work. It is want the application to behave. It is basically
basically a programmer’s view. a customer’s view.
Verifies whether the implementation of the Verifies whether the application behaves the
functionalities are correct way user wants it to behave
• The Agile approach has lead to visibly better design and results
• In the BDD world, the Test Cases are broken down into the Gherkin Scenarios
• The Scenarios are then implemented using the Gherkin’s G-W-T construct
BDD Framework
Cucumber ( https://cucumber.io/ )
Behave ( http://pythonhosted.org/behave/ )
JBehave ( http://jbehave.org/ )
When | run SIP INVITE call-flows for CLIENT using uac_invite.xml for 1 users configured Example SIP DSL grammar
in user.csv at ABOT
When | run the SSH command “cat output file | grep ‘Successful call’ | awk ‘{print $1,$2,$6}’” at ABOT
Then I verify the presence of the following values in the SIP response:
| String | occurrence |
Example SIP and SSH DSL grammar to
| Successful call 1 | PRESENT |
execute command and validate output
When | run the SSH command “cat output file | grep ‘RTP pckts sent’ | awk ‘{print $1,$3,$4,$5}’” at ABOT
Then I verify the presence of the following values in the SSH response:
| String | occurrence |
| 236 RTP pckts sent | PRESENT | Example SSH DSL grammar to execute
command and perform validation
Continuous Integration and Delivery (CI-CD) enables the features to be integrated, tested and
deployed into Production on an ongoing basis.
It is possible to do CI-CD without BDD, but with the BDD practices, the benefits are evidently better.
Source Automated
Plan Develop Build Reports
Control Test
Continuous Integration
Customer
CI Release Deploy Staging Release UAT Production
Candidate
Continuous Delivery
Rebaca has extensive experience in building a BDD powered framework to implement CI-CD in the
software development life cycle providing Automation at each step to create the environment (handle
orchestration), deploy the software,perform all configurations, run test suites, generate reports,
collect artifacts and notify all stakeholders.