diff --git a/realsense2_camera/test/README.md b/realsense2_camera/test/README.md index 9624848955..ea3a043a92 100644 --- a/realsense2_camera/test/README.md +++ b/realsense2_camera/test/README.md @@ -158,7 +158,7 @@ If a user wants to add a test to this conditional skip, user can add by adding a RS_ROS_REGRESSION=1 PYTHONPATH=$PYTHONPATH:$PWD/realsense2_camera/test/utils:$PWD/realsense2_camera//launch:$PWD/realsense2_camera//scripts pytest-3 -s realsense2_camera/test/live_camera/test_camera_aligned_tests.py -k test_camera_align_depth_color_all -m d415 ## Points to be noted while writing pytests -The tests that are in one file are normally run in parallel. So if there are multiple tests in one file, the system capacity can influence the test execution. It's recomended to have 3-4 tests in file, more than that can affect the test results due to delays. +The tests that are in one file are normally run in parallel, there could also be changes in the pytest plugin. So if there are multiple tests in one file, the system capacity can influence the test execution. It's recomended to have 3-4 tests in file, more than that can affect the test results due to delays. ### Passing/changing parameters The parameters passed while creating the node can be initialized individually for each test, please see the test_parameterized_template example for reference. The default values are taken from rs_launch.py and the passed parameters are used for overriding the default values. The parameters that can be dynamically modified can be changed using the param interface provided. However, the function create_param_ifs has to be called to create this interface. Please see the test_d455_basic_tests.py for reference. There are specific functions to change the string, integer and bool parameters, the utils can be extended if any more types are needed. ### Difference in setting the bool parameters diff --git a/realsense2_camera/test/live_camera/test_d415_basic_tests.py b/realsense2_camera/test/live_camera/test_d415_basic_tests.py index 8b88a30e67..d93bbe5b57 100644 --- a/realsense2_camera/test/live_camera/test_d415_basic_tests.py +++ b/realsense2_camera/test/live_camera/test_d415_basic_tests.py @@ -49,6 +49,7 @@ 1. Only a subset of parameter types are implemented in py_rs_utils, it has to be extended for others 2. After setting the param, rclpy.spin_once may be needed.Test passes even without this though. ''' +@pytest.mark.d415 @pytest.mark.parametrize("launch_descr_with_parameters", [test_params_depth_avg_1],indirect=True) @pytest.mark.launch(fixture=launch_descr_with_parameters) class TestD415_Change_Resolution(pytest_rs_utils.RsTestBaseClass): diff --git a/realsense2_camera/test/live_camera/test_d455_basic_tests.py b/realsense2_camera/test/live_camera/test_d455_basic_tests.py index fcf4561714..0d2163a3e3 100644 --- a/realsense2_camera/test/live_camera/test_d455_basic_tests.py +++ b/realsense2_camera/test/live_camera/test_d455_basic_tests.py @@ -49,6 +49,7 @@ 1. Only a subset of parameter types are implemented in py_rs_utils, it has to be extended for others 2. After setting the param, rclpy.spin_once may be needed.Test passes even without this though. ''' +@pytest.mark.d455 @pytest.mark.parametrize("launch_descr_with_parameters", [test_params_depth_avg_1],indirect=True) @pytest.mark.launch(fixture=launch_descr_with_parameters) class TestD455_Change_Resolution(pytest_rs_utils.RsTestBaseClass):