Public Sector

We've had the pleasure of working with UK and overseas central and local government departments, including Healthcare (NHS and Foundation Trusts), Defence, Education (Universities and colleges), many of the main Civil Service departments, Emergency Services; also public-owned corporations including the BBC, Bank of England, Ordnance Survey, and regulatory bodies such as Ofgem.

We are registered on Crown Commercial Service’s (CCS) Dynamic Purchasing System (RM6219 Training and Learning) and also with numerous tender portals such as Ariba, Coupa and Delta E-Sourcing.

Read more...

Graduate Training Schemes

Framework Training has a strong track record of providing a solid introduction into the working world for technical graduates across myriad industries. We provide the opportunity to learn and gain valuable hands-on experience in a supportive, friendly and sociable training environment.

Attract & retain the brightest new starters

We know it is vital for our clients to invest in the future of their talented grads; not only to provide them with high-quality, professional training essential for their roles, but to embed them within the organisation’s culture and guide them on the right path to a successful career.

After all, your new hires could well be the next leaders and their creative ideas and unique insights are invaluable to your business.

Read more ...

Learning & Development

Our unique portfolio of high-quality technical courses and training programmes are industry-respected. They’re carefully designed so that delegates can seamlessly apply what they’ve learnt back in the workplace. Our team of domain experts, trainers, and support teams know our field — and all things tech — inside out, and we work hard to keep ourselves up to speed with the latest innovations. 

We’re proud to develop and deliver innovative learning solutions that actually work and make a tangible difference to your people and your business, driving through positive lasting change. Our training courses and programmes are human-centred. Everything we do is underpinned by our commitment to continuous improvement and learning and generally making things much better.

Read more...

Corporate & Volume Pricing

Whether you are looking to book multiple places on public scheduled courses (attended remotely or in our training centres in London) or planning private courses for a team within your organisation, we will be happy to discuss preferential pricing which maximise your staff education budget.

Enquire today about:

  • Training programme pricing models  

  • Multi-course voucher schemes

Read more...

Custom Learning Paths

We understand that your team training needs don't always fit into a "one size fits all" mould, and we're very happy to explore ways in which we can tailor a bespoke learning path to fit your learning needs.

Find out about how we can customise everything from short overviews, intensive workshops, and wider training programmes that give you coverage of the most relevant topics based on what your staff need to excel in their roles.

Read more...

Behave: BDD Automation for Python

Build Robust Python Applications with Automated BDD Tests.

About the course

Clear communication and a shared understanding of system behaviour are paramount for successful software delivery. Behaviour-Driven Development (BDD) provides a highly effective framework for fostering this collaboration by defining system behaviour through concrete, human-readable examples. This 3-day hands-on training course is specifically designed for Python professionals who want to master the automation of these behaviours using Behave, a capable and widely-used open-source BDD framework for the Python ecosystem. Participants will gain the practical skills to translate collaborative specifications into robust, maintainable, and automated acceptance tests that serve as living documentation.

The course begins by reinforcing core BDD fundamentals and providing a deep dive into the Gherkin language, enabling participants to write clear, concise, and unambiguous feature files that accurately describe system behaviour from a user's perspective. Participants will then transition to mastering the core techniques of automating these specifications with Behave, learning how to set up a Behave project, link Gherkin steps to executable Python code by writing Step Definitions, and effectively work with structured data within scenarios using DataTables. A significant portion is dedicated to understanding and applying Behave's context object for safely and cleanly sharing state between steps within a scenario, a fundamental technique for building well-structured and maintainable automation frameworks in Behave.

Beyond the core automation mechanics, the course covers essential strategies for structuring and organising Behave assets in larger projects and implementing common automation patterns in Python for interacting with different application layers (such as APIs or user interfaces). Participants will learn how to manage complex data scenarios and leverage Behave's data-driven features like Scenario Outline. The course concludes by demonstrating how to run Behave tests using various methods, interpret the reporting capabilities, and integrate their automated BDD tests into Continuous Integration (CI) pipelines, equipping Python teams with the comprehensive skills needed to build, maintain, and leverage a powerful suite of automated BDD tests for their applications.

Instructor-led online and in-house face-to-face options are available - as part of a wider customised training programme, or as a standalone workshop, on-site at your offices or at one of many flexible meeting spaces in the UK and around the World.

    • Explain key BDD fundamentals and write clear specifications using Gherkin syntax (Given-When-Then).
    • Set up and configure a BDD automation project using the Behave framework.
    • Write Step Definitions in Python that effectively link Gherkin steps to executable code.
    • Work with structured data in scenarios using Behave DataTables.
    • Manage and share state safely between steps using the Behave context object.
    • Structure and organise Behave feature files and step definitions for maintainability and scalability.
    • Implement patterns for automating interactions with different application layers (e.g., API clients, UI interactions basics) within Behave step definitions.
    • Manage complex data scenarios using techniques like Composite Steps and Scenario Outline.
    • Run Behave tests from the command line, interpret reports, and integrate tests into CI pipelines.
  • This 3-day hands-on training course is designed for Python Developers, Quality Assurance (QA) professionals, and Automation Engineers who work within the Python ecosystem and want to learn how to effectively automate Behaviour-Driven Development specifications using the Behave framework. It is ideal for:

    • Python teams that are adopting BDD or need to automate their existing Gherkin specifications.

    • Python developers and QAs who want to build robust, maintainable, and collaborative automated acceptance tests.

    • Automation engineers focusing on Python applications who are looking to learn Behave and best practices for structuring automation frameworks.

    • Anyone involved in defining and verifying requirements for Python applications who wants to gain practical skills in BDD automation.

  • Participants should have:

    • Practical experience with software development or testing in the Python environment.

    • Have a basic understanding of Behaviour-Driven Development (BDD) principles (what BDD is, why use it, the concept of Gherkin scenarios). We can add a day to your course for BDD fundamentals if required - please let us know.

    • A development environment set up for Python development, with a supported Python 3.x installation, pip, and a suitable IDE or code editor. Familiarity with virtual environments is helpful.

    This course is hands-on and focuses on the automation aspects of BDD using the Behave framework in Python.

    Get in touch to find out how we can deliver tailored training which focuses on your project requirements and learning goals.

  • This BDD with Python course is available for private / custom delivery for your team - as an in-house face-to-face workshop at your location of choice, or as online instructor-led training via MS Teams (or your own preferred platform).

    Get in touch to find out how we can deliver tailored training which focuses on your project requirements and learning goals.

  • BDD Fundamentals Review

    • Quick review of Behaviour-Driven Development (BDD) principles and benefits.

    • The importance of collaboration (The Three Amigos) and shared understanding.

    • The Discovery phase: Exploring requirements using examples (Example Mapping/Specification by Example).

    • The Formulation phase: Writing good BDD scenarios.

    • Good and bad scenario writing patterns (The 6 BRIEF principles).

    • Separation of problem domain (Gherkin) and solution domain (automation code).

    • Hands-On Lab: Collaborative exercise on Example Mapping for a feature, writing initial Gherkin feature files.

    Gherkin Syntax Deep Dive

    • The Purpose and Structure of Gherkin Feature Files (Feature, Scenario).

    • Keywords: Given, When, Then - defining context, action, and outcome.

    • Connecting Steps: And, But.

    • Providing Context: Background.

    • Testing Multiple Examples: Scenario Outline and Examples table.

    • Organising Features: Using Tags (@tagname).

    • Writing Clear, Concise, and Unambiguous Gherkin.

    • Hands-On Lab: Writing comprehensive Gherkin Feature files and Scenarios using all key syntax elements, ensuring clarity and adherence to best practices.

    Introduction to Behave

    • What is Behave? Its role as a leading Python BDD automation framework.

    • Installing Behave using pip.

    • Setting up a Behave project structure (features directory, steps directory).

    • Understanding the environment.py file for hooks (e.g., before_scenario, after_feature).

    • Basic Behave workflow: Writing a feature, writing step definitions, running behave.

    • Hands-On Lab: Setting up a new Python project and installing Behave, creating initial feature and steps directories, writing a first simple feature file and running behave (demonstrating step definition hints), creating a basic environment.py.

    Writing Step Definitions with Behave

    • What are Step Definitions in Behave? The Python code implementation of Gherkin steps.

    • Matching Gherkin steps to Step Definition functions (@given, @when, @then decorators).

    • Using Regular Expressions vs. Parsers (e.g., parse, cfparse) for step matching and parameter extraction.

    • Parameterising Steps: Extracting data from Gherkin text into Step Definition function parameters.

    • Organising Step Definition files (.py) within the steps directory.

    • Best practices for writing maintainable and reusable Step Definitions in Python.

    • Hands-On Lab: Writing Step Definitions in Python for the Gherkin scenarios from previous labs, implementing the necessary code to make the steps executable, practicing step parameterisation using different matching methods.

    Working with Behave DataTables

    • Introduction to Gherkin DataTables for structured data within scenarios.

    • Accessing DataTables in Step Definitions using the Behave context.table object.

    • Processing DataTable data in Python: Iterating through rows, accessing cell values.

    • Mapping DataTable data to Python objects (e.g., using dictionaries or custom classes).

    • Performing assertions based on DataTable data.

    • Best practices for effectively using DataTables in scenarios.

    • Hands-On Lab: Updating selected scenarios to incorporate DataTables, writing Step Definitions that access and process DataTable data from context.table.

    Sharing State between Steps using Behave Context

    • The challenge of safely and cleanly sharing state between independently executed Step Definitions within a scenario.

    • Understanding the Behave context object: A place to store contextual information.

    • Storing and accessing data on the context object within Step Definitions.

    • Using the context object to pass information from one step to the next.

    • Comparing using the context object to other state sharing methods in Python.

    • Using hooks in environment.py (before_scenario, after_scenario) to set up and tear down state on the context.

    • Hands-On Lab: Refactoring Step Definitions to use the Behave context object to share necessary state (e.g., created objects, test data, instantiated drivers) between steps within a scenario.

    Structuring Scenarios and Organising Behave Assets

    • Finding the right structure for Feature files within the project.

    • Strategies for Organising Step Definition files (.py) and functions for maintainability and discoverability in larger projects.

    • Using Behave Tags (@tagname) effectively for grouping, filtering, and categorising scenarios and features.

    • Excluding scenarios or features using tags.

    • Traceability: Linking scenarios to requirements, user stories, or backlog items (using conventions or integration tools - concept).

    • Behave Configuration (behave.ini or setup.cfg): Basic configuration options.

    • Hands-On Lab: Restructuring feature files and step definition files in the project, applying tags for filtering, practicing running subsets of scenarios using tags via the behave CLI.

    Managing Data and Scenarios

    • Strategies for managing complex test data in scenarios and automation code.

    • Techniques for Pushing data down to the automation layer (reducing excessive data in Gherkin).

    • Composite steps: Calling one step definition from another (using context.execute_steps).

    • Implementing Field and workflow-level defaults for common scenario data.

    • Strategies for managing Baseline data and implementing test data management.

    • Behave Data-Driven Scenarios (Scenario Outline): Deep dive into using Scenario Outline and the Examples table for managing data variations for the same scenario structure in Behave.

    • Hands-On Lab: Refactoring scenarios to use composite steps, implementing data-driven scenarios using Scenario Outline and Examples in Behave, exploring strategies for test data management.

    Scenarios vs. Tests & The Testing Pyramid

    • Clarifying the purpose: Scenarios as illustrations of behaviour vs. Tests for comprehensive coverage.

    • When to use Data-Driven Scenarios vs. multiple distinct scenarios.

    • Understanding the Automated Testing Pyramid (Unit, Integration, Acceptance/BDD, UI).

    • Mapping Behave scenarios to the Testing Pyramid – where automated BDD tests typically fit (Acceptance, Integration levels).

    • Balancing different levels of automation in a Python project.

    • Hands-On Lab: Discussion and analysis exercise on where different types of tests fit within the testing pyramid in a Python project context, evaluating existing test suites (conceptual).

    Structuring the Automation Layer

    • Separation of automation logic and testing concerns within the Behave project structure.

    • Layering the automation solution (e.g., separating UI interaction, API calls, service layer logic).

    • Common Automation Patterns for Test Maintainability in Python:

      • Page Object Model (POM) for UI automation (if applicable).

      • Patterns for API/Service automation clients (e.g., using the requests library).

    • Where to place Assertions in the automation layer (typically in Step Definitions).

    • Designing for reusability, readability, and maintainability of the Python automation code.

    • Integrating automation layer objects with the Behave context object.

    • Hands-On Lab: Restructuring automation code using a layered approach or a pattern like POM (simplified) in Python, demonstrating how to keep Step Definitions clean by delegating complex interactions to other classes/modules, integrating them via context.

    Running, Reporting & CI Integration with Behave

    • Running Behave tests:

      • Running tests from the command line (behave).

      • Running specific features, scenarios, or tags from the CLI.

      • Using configuration files (behave.ini).

    • Understanding Behave Reports: Default console output and generating different report formats (e.g., JUnit XML, JSON) using formatters.

    • Introduction to external reporting tools (e.g., Allure) for richer reports.

    • Integrating Behave Tests into Continuous Integration (CI) pipelines:

      • Configuring CI platforms to execute behave commands.

      • Examples: Setting up steps in common CI platforms used in the Python ecosystem (e.g., GitHub Actions, GitLab CI, Jenkins) to run Behave tests and publish results/reports (e.g., JUnit XML).

    • Maintaining BDD Assets (Feature files and Step Definitions) in a CI/CD environment.

    • Hands-On Lab: Running Behave tests using different CLI options, generating JUnit XML or JSON reports, configuring a simple CI pipeline (simulated or using a basic online tool) to run Behave tests and publish results.

    • Behave Documentation: The official and comprehensive guide for installing, configuring, writing tests, and advanced features in the Behave framework. This should be your primary reference.

    • Gherkin Reference: Official documentation for the Gherkin language syntax used in feature files.

    • Python requests Library: A popular and easy-to-use library for making HTTP requests in Python, often used in API automation step definitions.

    • pytest Documentation: While Behave has its own runner, pytest is the dominant test framework in Python. Understanding it can be helpful for unit/integration tests often run alongside BDD tests.

Trusted by

Crown Commercial Service Supplier (CCS) logo Amadeus Services company logo

Public Courses Dates and Rates

Please get in touch for pricing and availability.

Related courses