This repository serves as a reference for working on BDD Behave and Selenium integration, ensuring clarity on the existing features and their implementations.
- behave: A behavior-driven development (BDD) framework written in Python.
- selenium: A tool for automating web applications for testing purposes.
- requests: A HTTP library to handle requests and responses.
-
Unit Tests:
- Scenarios for creating mock objects and using utility functions.
-
API Tests:
- Scenarios for testing reponse code using Requests library.
-
E2E Tests:
- Scenarios for opening the Google webpage and performing searches.
-
Given Steps:
- Creating mock objects.
- Makes a HTTP requests
- Opening the Google webpage.
-
When Steps:
- Calling the mock object.
- Response is returned.
- Searching for a query on Google.
-
Then Steps:
- Validating the expected results from the mock object.
- Checking response code is valid.
- Checking if the search results contain the queried term.
- Logging:
- Sets default log format.
Run make all
to install dependencies and run the tests. See the provided Makefile
for other run commands.
Got ideas? We'd love your input! Check out our Contributing Guidelines and dive in. Don't forget to drop a βοΈ if you like what you see!