Skip to main content

BHive: Behavior-Driven Development Meets B-Method

  • Conference paper
  • First Online:
Quality Software Through Reuse and Integration (FMI 2016, IRI 2016 2016)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 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. 2.

    max_ticket is a parameter manually introduced in the synthesis process for TakeANumber to limit state explosion during model checking activities.

References

  1. 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

    Google Scholar 

  2. 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/

  3. 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)

    Google Scholar 

  4. North, D.: Behavior modification: the evolution of behaviour-driven development. Better Softw. Mag., March 2006. “Introducing BDD”

    Google Scholar 

  5. Evans, E.: Domain-Driven Design: Tackling Complexity in the Heart of Software. Addison-Wesley Longman, Boston (2003)

    Google Scholar 

  6. Gherkin wiki (2016), https://github.com/cucumber/cucumber/wiki/Gherkin

  7. Rice, B., Jones, R., Enge, J.: Welcome to behave! (2014), http://pythonhosted.org/behave/

  8. Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580 (1969)

    Article  MATH  Google Scholar 

  9. Abrial, J.-R.: The B-book: Assigning Programs to Meanings. Cambridge University Press, New York (1996)

    Book  MATH  Google Scholar 

  10. Abrial, J.-R.: Modeling in Event-B: System and Software Engineering. Cambridge University Press, New York (2010)

    Book  MATH  Google Scholar 

  11. 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)

    Google Scholar 

  12. 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)

    Google Scholar 

  13. Scott, K.: The Unified Process Explained. Addison-Wesley Longman, Boston (2002)

    Google Scholar 

  14. 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)

    Google Scholar 

  15. Meyer, B.: Applying “design by contract”. Computer 25, 40–51 (1992)

    Article  Google Scholar 

  16. Beck, K.: Test-Driven Development: By Example. Addison-Wesley Longman, Boston (2002)

    Google Scholar 

  17. Beck, K., Andres, C.: Extreme Programming Explained: Embrace Change, 2nd edn. Addison-Wesley Professional, Boston (2004)

    Google Scholar 

  18. 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)

    Google Scholar 

  19. 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)

    Google Scholar 

  20. Erdogmus, H., Morisio, M., Torchiano, M.: On the effectiveness of the test-first approach to programming. IEEE Trans. Softw. Eng. 31, 226–237 (2005)

    Article  Google Scholar 

  21. Black, S., Boca, P.P., Bowen, J.P., Gorman, J., Hinchey, M.: Formal versus agile: survival of the fittest. Computer 42, 37–45 (2009)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to John Douglas Carter .

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics