Mockdata for Workflow #5460

Closed
opened 2026-02-21 18:11:04 -05:00 by yindo · 1 comment
Owner

Originally created by @FrancisVarga on GitHub (Sep 8, 2024).

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

For start variables provide mockdata for testing.

2. Additional context or comments

If you test a workflow u dont need always to re-enter the data

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @FrancisVarga on GitHub (Sep 8, 2024). ### Self Checks - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. For start variables provide mockdata for testing. ### 2. Additional context or comments If you test a workflow u dont need always to re-enter the data ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 💪 enhancementstale labels 2026-02-21 18:11:04 -05:00
yindo closed this issue 2026-02-21 18:11:04 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 8, 2024):

Hello @FrancisVarga! I'm here to help you with any bugs, questions, or becoming a contributor while you wait for a human maintainer. Let's tackle this together!

You can use the following mock data for testing workflow start variables to avoid re-entering data each time:

@pytest.fixture
def default_variables():
    value = [
        VariableEntity(
            variable="text_input",
            label="text-input",
            type=VariableEntityType.TEXT_INPUT,
        ),
        VariableEntity(
            variable="paragraph",
            label="paragraph",
            type=VariableEntityType.PARAGRAPH,
        ),
        VariableEntity(
            variable="select",
            label="select",
            type=VariableEntityType.SELECT,
        ),
        VariableEntity(
            variable="number",
            label="number",
            type=VariableEntityType.NUMBER,
        ),
        VariableEntity(
            variable="file",
            label="file",
            type=VariableEntityType.FILE,
        ),
    ]
    return value

The start node supports defining input variables of the following types:

  • Text
  • Paragraph
  • Dropdown Options
  • Number
  • File (coming soon)

These variables can be configured in the start node to prompt for their values during workflow execution [1][2][3][4].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 8, 2024): <!-- Greeting --> Hello @FrancisVarga! I'm here to help you with any bugs, questions, or becoming a contributor while you wait for a human maintainer. Let's tackle this together! <!-- Answer --> You can use the following mock data for testing workflow start variables to avoid re-entering data each time: ```python @pytest.fixture def default_variables(): value = [ VariableEntity( variable="text_input", label="text-input", type=VariableEntityType.TEXT_INPUT, ), VariableEntity( variable="paragraph", label="paragraph", type=VariableEntityType.PARAGRAPH, ), VariableEntity( variable="select", label="select", type=VariableEntityType.SELECT, ), VariableEntity( variable="number", label="number", type=VariableEntityType.NUMBER, ), VariableEntity( variable="file", label="file", type=VariableEntityType.FILE, ), ] return value ``` The start node supports defining input variables of the following types: * Text * Paragraph * Dropdown Options * Number * File (coming soon) These variables can be configured in the start node to prompt for their values during workflow execution <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/tests/unit_tests/services/workflow/test_workflow_converter.py)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/workflow/node/start.md)</sup><sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/node/start.md)</sup><sup>[[4]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/workflow/variables.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5460