Skip to content

tooniez/behave-bdd-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Behave BDD Test Examples πŸš€πŸ”¬

GitHub issues GitHub forks Github Stars MIT Behave 1.2.0 Selenium 4.0.0

Elevate Your BDD with Behave!

Contents

  1. Introduction
  2. Join the Community!
  3. License

Introduction

This repository serves as a reference for working on BDD Behave and Selenium integration, ensuring clarity on the existing features and their implementations.

πŸ“¦ Packages Used

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

πŸ” Types of Features

  1. Unit Tests:

    • Scenarios for creating mock objects and using utility functions.
  2. API Tests:

    • Scenarios for testing reponse code using Requests library.
  3. E2E Tests:

    • Scenarios for opening the Google webpage and performing searches.

πŸ§ͺ Steps Implemented

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

Utilities

  • Logging:
    • Sets default log format.

Getting Started

Run make all to install dependencies and run the tests. See the provided Makefile for other run commands.

Join the Community!

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!

License

Copyright Β© 2024 tooniez.
This project is MIT licensed.

About

πŸ“ƒ Elevate Your BDD with Behave!

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published