此内容没有您所选择的语言版本。

Chapter 8. Using list and map collections in test scenarios


The test scenarios designer supports list and map collections for both DMN-based as well as rules-based test scenarios. You can create and define a collection like a list or a map ​as the value of a particular cell in both GIVEN and EXPECT columns.

Note

For map entries, an entry key must be a String data type.

To pass the parameter in the EXPECT column of Rule-based collection editor use the actualValue keyword whereas use the ? keyword in DMN-based test scenario.

Procedure

  1. Set the column type first (use a field whose type is a list or a map).
  2. Double click a cell in the column to input a value.
  3. To create the list values for the data objects in the collection editor popup:

    1. Select Create List.
    2. Click Add new item.
    3. Enter the required value and click the check icon dmn datatype constraints tickmark to save each collection item that you add.
    4. Click Save.
    5. To edit an item from the collection, click the pencil icon in the collection popup editor.
    6. Click Save changes.
    7. To delete an item from the collection, click the bin icon in the collection popup editor.
  4. To define the list values for the data objects in the collection editor popup:

    1. Select Define List.
    2. Use the MVEL or FEEL expression to define a list value in the text field.

      Rule-based test scenario uses MVEL expression language and DMN-based test scenario uses FEEL expression language.

    3. Click Save.
  5. To create the map values for the data objects in the collection editor popup:

    1. Select Create Map.
    2. Click Add new item.
    3. Enter the required value and click the check icon dmn datatype constraints tickmark to save each collection item that you add.
    4. Click Save.
    5. To edit an item from the collection, click the pencil icon in the collection popup editor.
    6. Click Save changes.
    7. To delete an item from the collection, click the bin icon in the collection popup editor.
  6. To define the map values for the data objects in the collection editor popup:

    1. Select Define Map.
    2. Use the MVEL or FEEL expression to define a map value in the text field.

      Rule-based test scenario uses MVEL expression language and DMN-based test scenario uses FEEL expression language.

    3. Click Save.

      Note

      To define the map values for DMN-based test scenario, you can add a fact and use the FEEL expression, instead of using the collection editor.

  7. Click Remove to delete the entire collection.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat