8.5.2: How to use routes by name

Permalink
I have routers with names:
$groupRouter->get('/test', 'TestController::index')
    ->setName('test');
$groupRouter->get('/show/{id}', 'TestController::show')
    ->setName('show');

How can I use it in a view by its name, not by path?

That is, when I'm at the /test, I need a url for the show route. So how do I get a path from the route name?

linuxoid