Flowable 6.6.0 BPMN用户指南 -18 Tooling - 18.2 Maven原型(archetypes)

Flowable 6.6.0 用户指南相关文档下载


《Flowable 6.6.0 BPMN用户指南》

1. 入门
2. 配置
3 The Flowable API
4 Flowable 6.6.0 BPMN用户指南 - (4)Spring集成
5 Spring Boot
6 部署
7 BPMN 2.0简介
8 BPMN 2.0的构造
9 表单(Forms)
10 流程实例迁移
11 JPA
12 历史(History)
13 身份管理(Identity management)
14 REST API
15 CDI集成
16 LDAP集成
17 高级用例
18 Tooling

有关Flowable的更多文档,参见:

《Flowable文档大全》


18.2 Maven原型(archetypes)

18.2.1 创建测试用例

During development, sometimes it is helpful to create a small test case to test an idea or a feature, before implementing it in the real application. This helps to isolate the subject under test. JUnit test cases are also the preferred tools for communicating bug reports and feature requests. Having a test case attached to a bug report or feature request jira issue, considerably reduces its fixing time.

在开发过程中,有时在实际应用程序中实现一个想法或特性之前,创建一个小的测试用例是很有帮助的。这有助于隔离受试者。JUnit测试用例也是沟通bug报告和特性请求的首选工具。将测试用例附加到bug报告或特性请求jira问题上,可以大大减少其修复时间。

To facilitate creation of a test case, a maven archetype is available. By use of this archetype, one can rapidly create a standard test case. The archetype should be already available in the standard repository. If not, you can easily install it in your local maven repository folder by just typing mvn install in tooling/archtypes folder.

The following command creates the unit test project:

为了方便创建测试用例,可以使用maven原型。通过使用这个原型,可以快速地创建一个标准测试用例。原型应该已经在标准存储库中可用。如果没有,只需在tooling/archtypes文件夹中键入mvninstall,就可以轻松地将其安装到本地maven存储库文件夹中。

以下命令创建单元测试项目:

mvn archetype:generate \
-DarchetypeGroupId=org.flowable \
-DarchetypeArtifactId=flowable-archetype-unittest \
-DarchetypeVersion=<current version> \
-DgroupId=org.myGroup \
-DartifactId=myArtifact

The effect of each parameter is explained in the following table:

下表说明了每个参数的影响:

单元测试生成原型参数

参数解释
1archetypeGroupId原型的组id。应该是组织流动性
2archetypeArtifactId原型的Artifact。应该是flowable-archetype-unittest
3archetypeVersion生成的测试项目中使用的Flowable版本
4groupId生成的测试项目的组id
5artifactId生成的测试项目的项目id

The directory structure of the generated project would be like this:

生成的项目的目录结构如下所示:
.
├── pom.xml
└── src
└── test
├── java
│ └── org
│ └── myGroup
│ └── MyUnitTest.java
└── resources
├── flowable.cfg.xml
├── log4j.properties
└── org
└── myGroup
└── my-process.bpmn20.xml

You can modify the Java unit test case and its corresponding process model, or add new test cases and process models. If you are using the project to articulate a bug or a feature, test case should fail initially. It should then pass after the desired bug is fixed or the desired feature is implemented. Please make sure to clean the project by typing mvn clean before sending it.

您可以修改Java单元测试用例及其相应的流程模型,或者添加新的测试用例和流程模型。如果您正在使用项目来阐明一个bug或一个特性,那么测试用例最初应该失败。然后,它应该在所需的bug被修复或所需的特性实现之后通过。请确保在发送前键入 mvn clean来清理项目。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

月满闲庭

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值