1IO::Async::LoopTests(3)User Contributed Perl DocumentatioInO::Async::LoopTests(3)
2
3
4
6 "IO::Async::LoopTests" - acceptance testing for IO::Async::Loop
7 subclasses
8
10 use IO::Async::LoopTests;
11 run_tests( 'IO::Async::Loop::Shiney', 'io' );
12
14 This module contains a collection of test functions for running
15 acceptance tests on IO::Async::Loop subclasses. It is provided as a
16 facility for authors of such subclasses to ensure that the code
17 conforms to the Loop API required by IO::Async.
18
20 Certain tests require the use of timers or timed delays. Normally these
21 are counted in units of seconds. By setting the environment variable
22 "TEST_QUICK_TIMERS" to some true value, these timers run 10 times
23 quicker, being measured in units of 0.1 seconds instead. This value may
24 be useful when running the tests interactively, to avoid them taking
25 too long. The slower timers are preferred on automated smoke-testing
26 machines, to help guard against false negatives reported simply because
27 of scheduling delays or high system load while testing.
28
29 TEST_QUICK_TIMERS=1 ./Build test
30
32 run_tests
33 run_tests( $class, @tests )
34
35 Runs a test or collection of tests against the loop subclass given. The
36 class being tested is loaded by this function; the containing script
37 does not need to "require" or "use" it first.
38
39 This function runs "Test::More::plan" to output its expected test
40 count; the containing script should not do this.
41
43 The following test suite names exist, to be passed as a name in the
44 @tests argument to "run_tests":
45
46 io
47 Tests the Loop's ability to watch filehandles for IO readiness
48
49 timer
50 Tests the Loop's ability to handle timer events
51
52 signal
53 Tests the Loop's ability to watch POSIX signals
54
55 idle
56 Tests the Loop's support for idle handlers
57
58 process
59 Tests the Loop's support for watching child processes by PID
60
61 (Previously called "child")
62
63 control
64 Tests that the "run", "stop", "loop_once" and "loop_forever" methods
65 behave correctly
66
67 metrics
68 Tests that metrics are generated appropriately using Metrics::Any.
69
71 Paul Evans <leonerd@leonerd.org.uk>
72
73
74
75perl v5.32.1 2021-01-27 IO::Async::LoopTests(3)