Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(autoware_behavior_path_start_planner_module): refactor unit tests by using parameter initialization function #9768

Conversation

kyoichi-sugahara
Copy link
Contributor

Description

Refactor geometric pull out path generation test class for better maintainability

  • Move parameter declaration and initialization to StartPlannerParameters::init
  • Add make_planner_data helper method to create test planner data with given start pose and route lane IDs
  • Rename plan method to call_plan for clarity
  • Remove redundant member variables and initialization methods

Related links

Parent Issue:

  • Link

How was this PR tested?

confimed colcon test passed with following command

colcon test --event-handlers console_cohesion+ --packages-select autoware_behavior_path_start_planner_module

and passed

1: [----------] Global test environment set-up.
1: [----------] 1 test from TestGeometricPullOut
1: [ RUN      ] TestGeometricPullOut.GenerateValidGeometricPullOutPath
1: [INFO 1735034976.751842153] [route_handler]: getMainLanelets: lanelet_sequence = [ids: 4618 4635 ] (getMainLanelets():2025)
1: primitive: 4618
1: preferred_primitive id : 4618
1: primitive: 4635
1: primitive: 7787
1: preferred_primitive id : 4635
1: [       OK ] TestGeometricPullOut.GenerateValidGeometricPullOutPath (489 ms)
1: [----------] 1 test from TestGeometricPullOut (489 ms total)
1: 
1: [  PASSED  ] 1 tests.

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Dec 24, 2024
Copy link

github-actions bot commented Dec 24, 2024

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@kyoichi-sugahara kyoichi-sugahara added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 24, 2024
@xmfcx xmfcx force-pushed the test/start_planner/refactor_parameter_initialization branch from 52f4be3 to a939ee2 Compare December 24, 2024 10:33
Copy link

codecov bot commented Dec 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.88%. Comparing base (421ec7d) to head (42ee398).
Report is 131 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9768      +/-   ##
==========================================
+ Coverage   29.72%   29.88%   +0.16%     
==========================================
  Files        1451     1455       +4     
  Lines      108839   108892      +53     
  Branches    42741    42741              
==========================================
+ Hits        32348    32538     +190     
+ Misses      73313    73185     -128     
+ Partials     3178     3169       -9     
Flag Coverage Δ *Carryforward flag
differential 9.01% <ø> (?)
total 29.65% <ø> (-0.07%) ⬇️ Carriedforward from 24bcd0e

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…s for shift pull out path generation by using parameter initialization function

Signed-off-by: kyoichi-sugahara <[email protected]>
@xmfcx xmfcx force-pushed the test/start_planner/refactor_parameter_initialization branch from a939ee2 to 42ee398 Compare December 24, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants