本文介绍了整理JBehave故事的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们刚刚开始考虑使用JBehave进行验收测试,我想知道正在使用JBehave的人们如何组织故事的编写和故事文件的存储.目前,只有它们正在开发中,因此我们将故事文件与Java代码一起存储在资源文件夹中,以实现它们.

We've just started looking at using JBehave for acceptance tests and I was wondering how people that are using it are organising the writing of stories and the storage of story files. It's just development that are working on them at the moment so we have the story files stored in the resources folder alongside the Java code to implement them.

我想我的实际问题是,您如何将故事文件存储在何处以及如何与产品所有者或QA编写故事一起使用?

I guess my actual question is how and where are you storing your story files and how does this work with the product owner or QA writing stories?

推荐答案

@MrWiggles
正如t0rx告诉您的,很幸运有QA编写故事/场景.
您的问题:
行为驱动的开发鼓励您开始通过表达场景的方式来定义故事所需的文本格式的行为.
您可以通过在Maven(pom.xml)中进行配置来运行JBehave Stories.

@MrWiggles
as t0rx told you are lucky to have QA to write stories/scenarios.
coming to your question:
Behaviour-Driven Development encourages you to start defining the stories via scenarios that express the desired behavior in a textual format.
JBehave Stories you can run by configuring in Maven (pom.xml).

您可以创建一个文件夹,用于将故事文件存储在包结构中,如下所示:

You can make a folder for storing your story files in your package structure, like below:

Your_Project
      |
      |
      |--Source_Code
      |
      |--Stories
      |
      |--Testing
      |
      *pom.xml

通过在Maven中配置故事,每次构建项目时,都会获得成功和失败的故事/场景结果的结果.
质量检查人员将更新故事"文件夹中的方案,开发人员将通过省略现有步骤(已开发并在其他方案中使用)逐步实现方案.
质量检查人员只需运行场景/故事,他就会以文本(可理解的)格式找出结果.
如下所示:

测试级别的行为驱动开发.

By configuring your stories in maven, every time you build project it will give result with succeeded and failed stories/scenarios results.
QA will update the scenarios in the folder Stories, and the developer will implement the scenarios step by step by omitting existing steps (which are already developed and came in other scenarios).
QA simply run the scenario/story and he will find out the result in a textual (understandable) format.
Like below:

Behaviour-Driven Development in test levels.

JBehave的某些功能集中于易于组织.

Some of the JBehave features concentrate on easy organizing.

  • 基于注释的配置和Steps类规范
  • 依赖注入支持,允许通过您喜欢的容器(Guice, PicoContainer, Spring)组成配置实例和步骤实例.
  • 可扩展的故事报告:输出以不同的人类可读的基于文件的格式(HTML, TXT, XML)执行的故事.完全可样式化的视图.
  • 自动生成挂起的步骤,因此构建不会因缺少的步骤而中断,但可以选择为挂起的步骤配置中断的构建.
  • 用户故事的本地化,允许以任何语言编写.
  • IDE集成:故事可以作为JUnit测试或其他基于注释的单元测试框架运行,从而可以轻松地与您喜欢的IDE集成.
  • Ant集成:允许通过Ant任务运行故事
  • Maven集成:允许故事在给定的构建阶段通过Maven插件运行
  • Annotation-based configuration and Steps class specifications
  • Dependency Injection support allowing both configuration and Steps instances composed via your favourite container (Guice, PicoContainer, Spring).
  • Extensible story reporting: outputs stories executed in different human-readable file-based formats (HTML, TXT, XML). Fully style-able view.
  • Auto-generation of pending steps so the build is not broken by a missing step, but has option to configure breaking build for pending steps.
  • Localisation of user stories, allowing them to be written in any language.
  • IDE integration: stories can be run as JUnit tests or other annotation-based unit test frameworks, providing easy integration with your favourite IDE.
  • Ant integration: allows stories to be run via Ant task
  • Maven integration: allows stories to be run via Maven plugin at given build phase

这篇关于整理JBehave故事的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 23:30