Glue code
Glue code is integration code that connects otherwise separate software components, tools, or systems so they can work together.
BDD in Action, Second Edition
Glue code is integration code that connects executable behavior specifications or test steps to application code and services.
- How it is used
- Connects Gherkin scenario steps to automation code so Cucumber can execute acceptance tests.
- How deep it goes
- Works through annotated methods, test-data conversion, and service design; develops underlying behavior through separate unit tests.
- Examples
- Illustrates train-departure step methods and frequent-flyer setup in Java and TypeScript.
- What you can do after
- Build it from scratch by binding steps to methods, converting test data, calling services, and checking results.
Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond
Code whose main purpose is to connect separate modules or components together.
- How it is used
- Connects cohesive modules in an application’s main logic, keeping the integration layer simple.
- How deep it goes
- Shows integration from imports and setup through rendering, game turns, and event listeners.
- Examples
- Uses Blackjack setup and play, plus a Hangman plan that places integration code in index.
- What you can do after
- Build it from scratch by importing modules and wiring their functions into game behavior.
Also covered in
- Effective Behavior-Driven DevelopmentIn early access (MEAP)
- Simple Object-Oriented Design: Create clean, maintainable applications
What to know first
- moduleA module is a cohesive unit of code or computation that groups related functionality within a larger system and defines a scope or boundary for organizing or sharing it.
Related concepts
- parameter typehas part · A user-defined parameter type that matches text in a step and converts it into a value for step-handling code.
- hookhas part · A hook is a software extension point that triggers a callback or action at a specified event, lifecycle point, or stage of execution.
- step definitionhas part · A step definition is executable code that maps a human-readable behavior-specification step to code that performs or verifies the corresponding behavior.
- N×M integration problemused by · The N×M integration problem is the growth in custom integrations that results when each of N applications must connect independently to each of M external systems or providers.
Questions about glue code
What is glue code?
Glue code is integration code that connects otherwise separate software components, tools, or systems so they can work together.
Which Manning books explain glue code?
BDD in Action, Second Edition and Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond.
What should I know before learning glue code?
Manning books that teach glue code usually introduce module first.
What is glue code a kind of?
Glue code is a kind of automation code. Code that automates interactions with a system and supports the execution of behavioral scenarios.
What are the parts of glue code?
Glue code includes parameter type, hook and step definition.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

