Urgent.News

What's breaking now, across thousands of outlets.

Tech

BDD Without Gherkin

I've been writing acceptance tests in Given-When-Then since 2009 and I've never written a feature file by choice. So when someone asks whether you can do BDD without Gherkin, my answer is that I've never done it any other way. Cucumber has been the default for long enough that the two have merged in people's heads. They shouldn't have. BDD is a way of specifying behaviour. Gherkin is a file…

For years, behavior-driven development (BDD) has been synonymous with the Gherkin file format. However, the source material explains that one can conduct BDD without using Gherkin. The tool was designed to allow non-developers to write scenarios in plain text, which could then be run without any code changes. This format is ideal for testers or analysts who open a repository, write .feature files, and run them.

In practice, though, most teams write their scenarios in tickets using Given/When/Then, then copy these words into feature files and create step definitions to bind them. This process adds unnecessary duplication of effort.

Renaming a method disrupts the .feature file, while rewording a step changes its match silently. Step definitions, which hold the actual logic, accumulate over time and are neither part of the specification nor the test. The report generated by Gherkin only shows whether the test passed or failed, but not what the system did during execution, such as the request made, messages exchanged between services, or the response received.

The source material argues that while this approach was a reasonable solution in the past due to limited refactoring support and parsing test source at runtime, the current constraints have changed and the costs associated with maintaining separate feature files, step definitions, and code persist.

The article suggests generating the report directly from the test, which captures the request made, messages exchanged, and the response received. This approach eliminates the need for separate feature files and step definitions, reduces duplication, and provides a more readable output for product owners. The source discusses two options for implementing this approach on the JVM: Kotest's BehaviorSpec or JUnit with good method names, and Yatspec or Kensa, which read the test method itself and generate the report at runtime.

Kensa links the report back to the ticket, allowing the analyst who wrote the Given/When/Then in Jira to see what the system actually did. This method uses only one artifact, ensuring that it stays in sync with the code.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

An Attacker's Multi-Agent Framework Stole Thousands of Credentials in Under Six Hours

A financially motivated attacker ran reconnaissance, exploitation, and cleanup with almost no human in the loop — using the same design patterns you'd use to build a helpful agent.

  • Multi-agent framework stole credentials in under six hours
  • Attack used AI coding chatbot and preconfigured Markdown files
  • Organizations must shift detection focus to behavioral signals

I tested my sandbox against Deno and plain Python on 63 AI-written scripts

I've been building a language where a function's signature declares which effects it may perform, and a runtime refuses anything outside a budget you grant.

  • Velaris language caught integer overflow errors in 6 out of 11 categories
  • Python and JavaScript failed to detect issues despite stricter permission models
  • Velaris fell short in scenarios with incorrect answers or dangerous command printing

🚀 Getting Back Into Building Mode

After spending time learning and strengthening my development skills, I've decided to take a more structured approach to becoming job-ready as a software developer.

  • Focuses on systematic software engineering learning
  • Studies frontend, backend, Python, SQL, data structures
  • Aims to understand AI/ML integration in systems

Building per-app dictation on macOS: focus, profiles, and optional send

Dictating a coding prompt and dictating an email can involve the same microphone and speech recognizer. They should not necessarily involve the same writing style—or the same action after the text…

  • Clavio separates application identity, preferences, listening mode, and delivery.
  • Profile stores user preferences keyed by application bundle ID.
  • Clavio resolves tone and intensity overrides separately to maintain distinction.

More from Saturday 12 September →