Quantcast
Channel: Planet Python
Viewing all articles
Browse latest Browse all 22462

Brian Okken: Test Case Design using Given-When-Then from BDD (PT010)

$
0
0

Designing your test methods using a simple structure such as given-when-then will help you:

  • Communicate the purpose of your test more clearly
  • Focus your thinking while writing the test
  • Make test writing faster
  • Make it easier to re-use parts of your test
  • Highlight the assumptions you are making about the test preconditions
  • Highlight what outcomes you are expecting and testing against.

Discussed:

  • The Given-When-Then structure for test method/function development.
  • How and why to utilize fixtures for your given or precondition code.
  • Similarities with other structure discriptions.
    • Setup-Test-Teardown
    • Setup-Excercise-Verify-Teardown.
    • Arrange-Act-Assert
    • Preconditions-Trigger-Postconditions.
  • Benefits listed above discussed in more detail.

The post Test Case Design using Given-When-Then from BDD (PT010) appeared first on Python Testing.


Viewing all articles
Browse latest Browse all 22462

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>