Automating BDD test creation in Zephyr with an AI agent

Q2BSTUDIO developed Zephyr AI, a tool that automates the creation of BDD scenarios in Gherkin from PRD documents, integrating Confluence, Google Gemini and Zephyr Scale to transform product requirements into test cases in minutes. It accelerates the delivery cycle and improves quality

sábado, 16 de agosto de 2025 • 3 min read • Q2BSTUDIO Team

Artificial-Intelligence-

Summary At Q2BSTUDIO we explain how we developed Zephyr AI, a command-line tool that automates the creation of BDD scenarios in Gherkin from PRD documents, integrating Confluence, Google Gemini and Zephyr Scale to transform product requirements into test cases in minutes

Why it matters Manually writing BDD test cases from lengthy requirements is slow and repetitive. Zephyr AI bridges the gap between specifications and test management, improving quality and accelerating the delivery cycle

Workflow 1 Fetch Requirement securely connecting to a Confluence page via API to obtain the raw PRD 2 Clean amp Prepare cleaning and extracting relevant content from Confluence HTML 3 Generate BDD with AI sending the cleaned text to Google Gemini with a refined prompt to generate BDD scenarios in Gherkin 4 Create Test Case in Zephyr using the generated Gherkin script to automatically create test cases in Zephyr Scale via its REST API

Tech stack Project developed in Python using Google Gemini API, Confluence API and Zephyr Scale REST API. Key libraries requests for HTTP calls, BeautifulSoup for HTML parsing, python-dotenv for secret management and HTML-to-text conversion tools

Prompt engineering The quality of a large language model's output depends largely on the prompt. We treat the model as a junior QA engineer given very specific instructions to generate complete, end-to-end scenarios, inferring user roles, error messages and success confirmations when the PRD is brief

Practical problem solved A real challenge was correctly assigning the folder in Zephyr Scale. The intuitive payload with a folder object was ignored by the API and cases were created at the root. The solution was to use the top level folderId parameter in the request body to ensure cases are created in the desired folder

Results Zephyr AI has proven to save significant time by automating the creation of tests aligned with specifications. This allows the team to focus on higher-value exploratory testing and complex tasks that require human judgment

Next steps For the next phase we plan to develop a simple web interface with Flask or Streamlit so the whole team can use the tool without relying on the command line. We are also considering expanding the AI agent to support different languages, custom Gherkin templates and bidirectional synchronization with requirements management systems

About Q2BSTUDIO Q2BSTUDIO is a custom software and application development company, specializing in artificial intelligence, cybersecurity and AWS and Azure cloud services. We offer custom software solutions, business intelligence services and Power BI implementations, as well as AI agents and AI solutions for companies that automate processes and improve decision-making

Featured services Custom applications custom software artificial intelligence cybersecurity aws and azure cloud services business intelligence services ai for companies ai agents power bi. If you are looking to automate test case generation, integrate AI into your processes or deploy secure cloud solutions, Q2BSTUDIO can help you

Contact and call to action If you are interested in optimizing traceability between requirements and tests, or want to develop AI agents that automate key quality and validation tasks, contact Q2BSTUDIO for a personalized consultation and demonstration

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.