Skip to content

Improve validation of the test data for fragment inputs#8988

Open
mgoworko wants to merge 3 commits intostagingfrom
fragment-input-test-validation
Open

Improve validation of the test data for fragment inputs#8988
mgoworko wants to merge 3 commits intostagingfrom
fragment-input-test-validation

Conversation

@mgoworko
Copy link
Contributor

@mgoworko mgoworko commented Feb 19, 2026

Describe your changes

There was an issue with input validation during fragment testing. Fragment input parameters can be configured with additional validation rules, such as being marked as required or restricted to a predefined set of values.

In the test mechanism, test data samples are generated by the mocked source and become available only after the source is invoked. However, for fragments, validation is executed before the source is invoked. As a result, validation of fragment input parameters always failed, when the parameters were marked as required.

Solution:

  • always validate the test input before starting test execution. This was already partially implemented by calling the validation endpoint on the frontend, but validation is now also executed immediately before the test is performed.
  • disable validation for mocked fragment input sources during test execution

Checklist before merge

  • Related issue ID is placed at the beginning of PR title in [brackets] (can be GH issue or Nu Jira issue)
  • Code is cleaned from temporary changes and commented out lines
  • Parts of the code that are not easy to understand are documented in the code
  • Changes are covered by automated tests
  • Showcase in dev-application.conf added to demonstrate the feature
  • Documentation added or updated
  • Added entry in Changelog.md describing the change from the perspective of a public distribution user
  • Added MigrationGuide.md entry in the appropriate subcategory if introducing a breaking change
  • Verify that PR will be squashed during merge

@mgoworko mgoworko changed the title Improve test data validation for fragments Improve validation of the test data for fragment inputs Feb 20, 2026
@mgoworko mgoworko marked this pull request as ready for review February 20, 2026 10:27
@mgoworko mgoworko force-pushed the fragment-input-test-validation branch 2 times, most recently from b81a509 to 52fc125 Compare February 24, 2026 10:55
Copy link
Member

@piotrp piotrp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a changelog entry

@github-actions github-actions bot added the docs label Feb 27, 2026
@mgoworko mgoworko force-pushed the fragment-input-test-validation branch from a35bb71 to 43ba3fd Compare February 27, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants