StackStorm / StackStorm/st2

Feature Request : Add capability to retrieve action's parameters via the YAML file in pack unit tests

Open
#3,574 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feature
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

When writing unit tests i can never remember the correct combination of default and required necessary for whatever logic i'm trying to implement. Also i can never remember what values will actually be passed in with the various combinations.

To remedy this it would be handy if i could some how "pipe" parameters through the action's YAML file validation and defaults.

This would allow me to verify defaults, requirements, and other values passed into an action at test time.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the pack unit-test entry points that process an action's YAML file, then trace how validation, defaults, and required parameters are currently handled. Define the expected way tests retrieve those values and verify the behavior with focused unit tests covering the parameter combinations described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.