Help language development. Donate to The Perl Foundation

Test::Notice zef:raku-community-modules last updated on 2022-03-13


Tests on source


Test::Notice - Display noticable messages to users during tests


use Test::Notice;
notice 'Install Foo::Bar::Baz for extra awesome features!';

# Do not use colors
notice 'Now without colors!', :!try-color;


This module lets you display highly visible messages to users during the run of your test, pausing long enough for them to read it.


notice( Str $message, Bool :$try-color = True )

notice 'Install Foo::Bar::Baz for extra awesome features!';

Takes one mandatory argument: the string to display in the message. Does not return anything meaningful. The message will be coloured if optional Terminal::ANSIColor is installed. The output also pauses long enough for an average reader to read the entire message (regardless of its length), unless NONINTERACTIVE_TESTING environmental variable is set.

You can turn detection of the coloring module by setting :try-color to False.


The current implementation always assumes the terminal width of 80 characters. If you can figure out how to get the actual width when test is run with prove, patches are more than welcome.

Currently, any amount of whitespace in the displayed message will be squashed into a single space.


Fork this module on GitHub:


To report bugs or request features, please use


Zoffix Znet (

Currently maintained by the Raku Community Adoption devs.


You can use and distribute this module under the terms of the The Artistic License 2.0. See the LICENSE file included in this distribution for complete details.