If you're used to traditional test frameworks you've probably encountered setup() and teardown(). In Behave this functionality can be implemented via environment.py
Now that you know how to compose your Feature Files and write the implementation code of your API tests, let's now continue to improve on what we've started by using Scenario Outline to parameterize our tests.
The goal is to make a working automated tests to cover GoRest's user creation which is triggered by calling the POST method that is described on their homepage. I will not be automating all the API endpoint's on GoRest's site like viewing users and updating their details.
This is a follow-up series on how to use Python's Behave library to create automated Behavior Driven Tests. It assumes that you already have prior programming experience
Before we integrate the requests package in our Behave Tests, I'd like to do a quick overview on how the HTTP Protocol works...
Now that you're done prepping up your programming environment let's dive in on the directory structure and the components needed in order to run your first API tests. At the end of this article you should have your project scaffolding ready
This guide is targeted to Software Testers who wants to try implementing their automated tests using Python and Behave, A mature BDD testing Framework. And although Behave's Documentation is fantastic, it's sort of intimidating for Software Testers who doesn't have any background in programming.