Skip to content

feat: add script and GitHub Actions workflow for CX-0127 test data generation#1479

Closed
ds-vlisenco wants to merge 33 commits intoeclipse-tractusx:mainfrom
ds-vlisenco:clean/script-and-workflow-only
Closed

feat: add script and GitHub Actions workflow for CX-0127 test data generation#1479
ds-vlisenco wants to merge 33 commits intoeclipse-tractusx:mainfrom
ds-vlisenco:clean/script-and-workflow-only

Conversation

@ds-vlisenco
Copy link

@ds-vlisenco ds-vlisenco commented Jun 17, 2025

Description

This PR introduces an automated pipeline for generating CX-0127-compliant test data.

Changes

  • Added Python script: tx-backend/testdata/scripts/automotive_test_data_generator_updated.py
  • Added GitHub Actions workflow: .github/workflows/generate_testdata.yml
  • Includes version scanning and auto-increment logic
  • Stores output as: CX_Testdata_MessagingTest_vX.X.X.json
  • Opens PR from auto/testdata-vX.X.X
  • Supports manual trigger via workflow_dispatch

Notes

  • Fully tested in a private fork
  • No breaking changes
  • Compatible with existing codebase structure

Related

Automate Test Data Generation via GitHub Action


Pre-review checks

  • DEPENDENCIES are up-to-date
  • Copyright and license header
  • CHANGELOG.md updated under [Unreleased - 17.06.2025]

Added input validation to PolicyServiceImpl#getPolicy to throw IllegalArgumentException
when policy ID is null or blank. This ensures consistent error handling and aligns with
unit test expectations.

Also resolves failing test cases in PolicyServiceImplTest that check for invalid inputs.
Added input validation to PolicyServiceImpl#getPolicy to throw IllegalArgumentException
when policy ID is null or blank. This ensures consistent error handling and aligns with
unit test expectations.

Also resolves failing test cases in PolicyServiceImplTest that check for invalid inputs.
fix: add null checks to PolicyServiceImpl to handle invalid input
Introduced @nested classes to logically group tests by method
Added helper method createPolicyResponse to reduce duplication and simplify test setup
Fixed usage of PolicyResponse.policyId() to match record syntax (instead of incorrect getPolicyId())
Corrected construction of Payload and IrsPolicyResponse based on their actual constructors
Improved test assertions to verify actual field values instead of only presence or size
Preserved existing test coverage for all main methods
license header is provided
feature/policy-unit-test
license header is provided
…neration

feature/automate-test-data-generation
…neration

feature/automate-test-data-generation
…ation' into feature/automate-test-data-generation
…neration

feature/automate-test-data-generation
@ds-vlisenco ds-vlisenco deleted the clean/script-and-workflow-only branch June 25, 2025 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant