Abstract
Behavior-Driven Development (BDD) is an “outside-in” approach to software development built upon semi-formal mediums for specifying the behavior of a system as it would be observed externally. Through the representation of a system as a collection of user stories and scenarios using BDD’s notation, practitioners automate acceptance tests using examples of desired behavior for the envisioned system. A formal model created in concert with BDD tests would provide valuable insight into test validity and enhance the visibility of the problem domain. This work called BHive builds upon the formal underpinnings of BDD scenarios by mapping their “Given,” “When,” and “Then” statements to “Precondition,” “Command,” and “Postcondition” constructs as introduced by Floyd-Hoare logic. We posit that this mapping allows for a B-Method representation to be created and that such a model is useful for exploring system behavior and exposing gaps in requirements and test plans. In this extension of previous work, we outline recent additions to BDD tooling required for the described integration, present a new strategy for test case generation from our approach, and expand on the benefits of the BHive approach to integrating formalism within a BDD project.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
A fourth scope, tag, does exist which provides a scope of each unique tag applied to a scenario. This feature is not presently used by BHive..
- 2.
max_ticket is a parameter manually introduced in the synthesis process for TakeANumber to limit state explosion during model checking activities.
References
Carter, J., Gardner, W.: BHive: towards behaviour-driven development supported by B-Method. In: Proceedings of 4th IEEE International Workshop of Formal Methods Integration (FMi) at IEEE 17th International Conference on Information Reuse and Integration (IRI), Pittsburgh, PA, pp. 249–256. IEEE, July 2016
Beck, K., Beedle, M., van Bennekum, A., Cockburn, A., Cunningham, W., Fowler, M., Grenning, J., Highsmith, J., Hunt, A., Jeffries, R., Kern, J., Marick, B., Martin, R.C., Mellor, S., Schwaber, K., Sutherland, J., Thomas, D.: Manifesto for Agile Software Development (2001), http://www.agilemanifesto.org/
Forsberg, K., Mooz, H.: The relationship of system engineering to the project cycle. In: Proceedings of the National Council for Systems Engineering First Annual Conference, pp. 57–61 (1991)
North, D.: Behavior modification: the evolution of behaviour-driven development. Better Softw. Mag., March 2006. “Introducing BDD”
Evans, E.: Domain-Driven Design: Tackling Complexity in the Heart of Software. Addison-Wesley Longman, Boston (2003)
Gherkin wiki (2016), https://github.com/cucumber/cucumber/wiki/Gherkin
Rice, B., Jones, R., Enge, J.: Welcome to behave! (2014), http://pythonhosted.org/behave/
Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580 (1969)
Abrial, J.-R.: The B-book: Assigning Programs to Meanings. Cambridge University Press, New York (1996)
Abrial, J.-R.: Modeling in Event-B: System and Software Engineering. Cambridge University Press, New York (2010)
Leuschel, M., Bendisposto, J., Dobrikov, I., Krings, S., Plagge, D.: From animation to data validation: the ProB constraint solver 10 years on. In: Boulanger, J.-L. (ed.) Formal Methods Applied to Complex Systems: Implementation of the B Method, chap. 14, pp. 427–446, Wiley ISTE, Hoboken (2014)
Eleftherakis, G., Cowling, A.J.: An agile formal development methodology. In: Proceedings of 1st South-East European Workshop on Formal Methods (SEEFM 2003), pp. 36–47 (2003)
Scott, K.: The Unified Process Explained. Addison-Wesley Longman, Boston (2002)
Ostroff, J.S., Makalsky, D., Paige, R.F.: Agile specification-driven development. In: Eckstein, J., Baumeister, H. (eds.) Proceedings of Extreme Programming and Agile Processes in Software Engineering (XP 2004), vol. 3092. Lecture Notes in Computer Science, pp. 104–112. Springer (2004)
Meyer, B.: Applying “design by contract”. Computer 25, 40–51 (1992)
Beck, K.: Test-Driven Development: By Example. Addison-Wesley Longman, Boston (2002)
Beck, K., Andres, C.: Extreme Programming Explained: Embrace Change, 2nd edn. Addison-Wesley Professional, Boston (2004)
Lopez-Nores, M., Pazos-Arias, J.J., Garcia-Duque, J., Barragans-Martinez, B.: An agile approach to support incremental development of requirements specifications. In: Proceedings of Australian Software Engineering Conference (ASWEC 2006), Washington, DC, pp. 9–18. IEEE Computer Society (2006)
Rutledge, R., Duggins, S., Lo, D., Tsui, F.: Formal specification-driven development. In: Proceedings of the International Conference on Software Engineering Research and Practice (SERP), p. 1, The Steering Committee of The World Congress in Computer Science, Computer Engineering and Applied Computing (WorldComp) (2014)
Erdogmus, H., Morisio, M., Torchiano, M.: On the effectiveness of the test-first approach to programming. IEEE Trans. Softw. Eng. 31, 226–237 (2005)
Black, S., Boca, P.P., Bowen, J.P., Gorman, J., Hinchey, M.: Formal versus agile: survival of the fittest. Computer 42, 37–45 (2009)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG
About this paper
Cite this paper
Carter, J.D., Gardner, W.B. (2018). BHive: Behavior-Driven Development Meets B-Method. In: Rubin, S., Bouabana-Tebibel, T. (eds) Quality Software Through Reuse and Integration. FMI IRI 2016 2016 2016. Advances in Intelligent Systems and Computing, vol 561. Springer, Cham. https://doi.org/10.1007/978-3-319-56157-8_11
Download citation
DOI: https://doi.org/10.1007/978-3-319-56157-8_11
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-56156-1
Online ISBN: 978-3-319-56157-8
eBook Packages: EngineeringEngineering (R0)