Skip to main content Crate test_with_derive Copy item path Source runner Provide a test runner and test on each module tokio_runner cpu_core Run test case when cpu core enough env Run test case when the environment variable is set. executable Run test case when the executables exist. file Run test case when the file exist. group Run test case when runner in group http Run test case when the http service exist. https Run test case when the https service exist. icmp Run test case when the server online.
Please make sure the role of test case runner have capability to open socket lock Run test case one by one when the lock is acquired
It will automatically implement a file lock for the test case to prevent it run in the same
time. Also, you can pass the second parameter to specific the waiting seconds, default will be
60 seconds. mem Run test case when memory size enough module Help each function with #[test_with::runtime_*] in the module can register to run
Also you can set up a mock instance for all of the test in the module no_env Ignore test case when the environment variable is set. path Run test case when the path(file or folder) exist. phy_core Run test case when physical cpu core enough root Run test case when runner is root runtime_available_mem Run test case when the example running and available memory size enough runtime_cpu_core Run test case when cpu core enough runtime_env Run test case when the example running and the environment variable is set. runtime_executable Run test case when the executable existing runtime_file Run test case when the example running and the file exist. runtime_free_mem Run test case when the example running and free memory size enough runtime_free_swap Run test case when the example running and free swap enough runtime_group Run test case when runner in group runtime_http Run test case when the example running and the http service exist. runtime_https Run test case when the example running and the http service exist. runtime_icmp Run test case when the example running and the server online.
Please make sure the role of test case runner have capability to open socket runtime_ignore_if Ignore test case when function return some reason
The function should be fn() -> Option<String> runtime_mem Run test case when the example running and memory size enough runtime_no_env Ignore test case when the example running and the environment variable is set. runtime_path Run test case when the example running and the path(file or folder) exist. runtime_phy_cpu_core Run test case when physical core enough runtime_root Run test case when runner is root runtime_swap Run test case when the example running and swap enough runtime_tcp Run test case when the example running and socket connected runtime_timezone Run test case when the example running within specific timezones. runtime_user Run test case when runner is specific user swap Run test case when swap size enough tcp Run test case when socket connected timezone Run test case when the timezone is expected. user Run test case when runner is specific user