In Behaviour Driven Development (BDD), functionality needs to match intent, and tests need to match requirements. BDD has changed today’s software development landscape so that requirements are correctly translated into the tests that evaluate the quality of code written. Tests are tightly interwoven with requirements captured from user stories, with an emphasis on validating requirements to be tested well before writing functional code.
End-to-End Collaboration When Testing in BDD
Establishing clear requirements before coding ensures quality is built into applications from the start. Developers write code good enough to pass every in-sprint test, rather than testing for code after the fact. This constant refactoring of code to tests accumulates, ensuring that clean code is built up over time. For effective requirements-based testing to work, important discussions need to be held upfront to get everyone on the same page – whether they work on the business side of the organization or in testing or development. If this shared understanding between technical and nontechnical stakeholders is less than crystal clear, then Agile teams will end up with lots of rework and high technical debt.
Businesses need to address the inevitable communication challenges that crop up when technical and nontechnical stakeholders discuss how an application should perform. Teams need to be able to collaborate and to develop narrative user stories and scenarios that describe the who, the what and the various when-then conditions for how the application will work. The output of these discussions defines test requirements and executable code to be developed. Specifically, teams need to know if they have moved through all possible test cases systematically for an optimal set of test cases – clearly and unambiguously capturing all logical variations for maximum test coverage. Adding to this complexity are the hundreds of thousands of tests created manually today, making maintenance a nightmare as requirements change.
Clearly, it’s time to move from words to pictures for teams to manage developing to requirements with a model-based testing tool.
7 Key Considerations for Model-Based Testing
When taking a model-based approach to building application requirements that is tooled for today’s fast-paced development environments, development teams need to keep these 7 key considerations in mind:
- Single Source of Truth. When using a model-based approach, collaboration must be made simple. Everyone on the team should be able to visualize how they want users to experience an application and to determine what they want to happen when certain actions are taken. There is a shared understanding across the business, development and quality assurance teams.
- Better Requirements Definitions. When working with model-based testing, test smart by creating a visual roadmap for how users will move through the application. That means teams are less likely to miss an important requirement and more likely to test where it matters for more thorough test coverage. Teams “test right” based on actual requirements.
- Optimized for Testing In-Sprint. The visual models and automation in model-based testing should help development teams work faster – testing code the moment it is created. Teams can generate optimal test cases and automation scripts direct from requirements – streamlining Agile releases while eliminating the endless iterations previously needed to clarify ambiguity and to get everyone in sync. Teams can fail faster for more immediate feedback in-sprint, while reducing loads on the test environment for better resource utilization.
- Test Design Automation. Teams should be able to simply make the appropriate menu selections, define the tests to be automatically generated, and enjoy easy test case maintenance. Manually parameterizing data values in tests for code changes before replaying tests in an automated fashion is not test design automation. In model-based testing, teams just focus on keeping their models up to date. All requirements and tests are updated automatically in lock step as changes are made, while maintaining requirements traceability across the entire development and testing lifecycle.
- 100% Test Coverage. Model-based testing should automatically generate the smallest number of test cases to achieve 100 percent coverage for development teams. They can avoid wasteful redundancy and costly gaps through clear dependency visualization that aids in capacity planning and in decision making during Agile planning.
- Share, Reuse Test Assets. Teams should be able to tailor their test coverage based on what they are trying to do in their model-based testing approach. That includes easily importing test cases, removing duplicates and sharing optimized test cases using existing application lifecycle management tools such as Rally, HPE ALM, JIRA and more. Store, share and reuse test cases and other test assets in a central repository so teams can quickly recreate and execute tests and put applications through the paces as they evolve.
- Continuous Test Feedback. Teams should be able to manage for the impact of requirements changes and to prioritize what needs to be tested. Continuous test feedback that’s anchored in visibility and traceability helps maintain the validity of the test designs used. In model-based testing, teams should be able to layer on reporting tools like Serenity to generate rich test reports that are simple enough for a business analyst with no technical background to understand. This allows teams to drill down and see screen shots of every step, and easily monitor if something goes wrong.
Take the Next Steps
It’s time to adopt a new approach to requirements design that keeps pace with the speed of Agile development – testing smart and at scale while truly in sprint.
Start by watching our recent webinar on Model-Based Testing & Behavior Driven Development to learn more. See how to leverage the power of model-based testing properly, from requirements to executable Gherkin/Cucumber behavior driven tests, using focused insights drawn from enriched Acceptance Test-Driven Development reporting with Serenity.
After watching the webinar, sign up for your free trial of Agile Requirements Designer and see firsthand how you can now address the 7 considerations discussed above for model-based testing.
- Acceptance Testing
- Agile Development
- Agile Testing
- Application Testing
- Automated Testing
- Behavior Driven Development
- Continuous Development
- Continuous Integration
- Functional Testing
- Model Based Testing
- Open Source
- Performance Engineering
- Requirements Testing
- tech blogs
- Test Case Optimization
- Test Center of Excellence
- Test CoE
- Test Collaboration
Collin enjoys helping traditional Central IT and Agile development teams Plan-Build-Test-Run for speed in quality application release. Taking on grassroots engagements with practitioners in application test automation for the Agile software development lifecycle and DevOps delivery, Collin has broken new grounds in next generation programs like predictive insights for Dev-QA teams, and hybrid cloud management solutions for Ops teams in the software defined datacenter.