Skip to content

Conversation

@imashkanov
Copy link

🎯 Implemented duplicate test plan functionality

📋 What was implemented:

🔧 Core Components:

  • TmsTestPlanService.duplicate() - Interface method for test plan duplication
  • TmsTestPlanServiceImpl.duplicate() - Full e2e implementation
  • TmsTestPlanMapper.duplicateTestPlan() - MapStruct mapping with "-copy" postfix
  • TmsTestPlanAttributeService.duplicateTestPlanAttributes() - Attributes duplication
  • TmsTestPlanController.duplicateTestPlan() - Updated endpoint implementation

🏗️ Architecture & Implementation:

✅ Consistent with existing patterns:

  • Same architecture as TmsTestCase duplication
  • Same naming convention (adding "-copy" postfix)
  • Same transactional boundaries and error handling
  • Same MapStruct mapping patterns

✅ Complete functionality:

  • Duplicates test plan with "-copy" postfix in name
  • Preserves all attributes of the original test plan
  • Duplicates all test cases from original plan into same folders
  • Adds "-copy" postfix to all duplicated test case names
  • Links duplicated test cases to the new test plan
  • Returns test plan with execution statistics
  • Proper error handling and validation

🚀 Features implemented:

Full test plan duplication including all linked test cases
Folder structure preservation (test cases duplicated to same folders)
Name postfix "-copy" for plan and all test cases
Attributes preservation for both plan and test cases
Manual scenarios duplication (text and steps scenarios)
Transactional safety and proper error handling
Consistent API responses with execution statistics

📂 Files modified:

  • TmsTestPlanService.java - Added duplicate method to interface
  • TmsTestPlanServiceImpl.java - Full duplicate implementation
  • TmsTestPlanMapper.java - Added duplicateTestPlan mapping method
  • TmsTestPlanAttributeService.java - Added duplicateTestPlanAttributes method
  • TmsTestPlanAttributeServiceImpl.java - Implemented attributes duplication
  • TmsTestPlanAttributeMapper.java - Added duplicateTestPlanAttribute mapping
  • TmsTestPlanController.java - Updated duplicateTestPlan endpoint
  • TmsTestCaseMapper.java - Fixed to add "-copy" postfix to test case names

🎯 Result:

Complete e2e duplicate test plan functionality that:

  • Duplicates test plan with all its test cases preserving folder structure
  • Adds "-copy" postfix to test plan and all test case names
  • Maintains all attributes and manual scenarios
  • Provides consistent error handling and validation
  • Follows existing architectural patterns

Ready for integration and testing! 🚀

@imashkanov imashkanov requested a review from pbortnik as a code owner October 20, 2025 16:41
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 20, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/EPMRPP-duplicate-test-plan-to-manual-launches-to-migrate-tms-to-develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@imashkanov imashkanov force-pushed the feature/EPMRPP-duplicate-test-plan-to-manual-launches-to-migrate-tms-to-develop branch from a7665f4 to 36b37d4 Compare October 21, 2025 09:28
@imashkanov imashkanov force-pushed the feature/EPMRPP-duplicate-test-plan-to-manual-launches-to-migrate-tms-to-develop branch from 176af3e to bab25f1 Compare October 22, 2025 13:16
@imashkanov imashkanov merged commit c7d29f7 into feature/EPMRPP-manual-launches-to-migrate-tms-to-develop Oct 22, 2025
8 of 10 checks passed
@imashkanov imashkanov deleted the feature/EPMRPP-duplicate-test-plan-to-manual-launches-to-migrate-tms-to-develop branch October 22, 2025 13:59
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