I think you can overrideextend Magento/Ui/view/base/web/templates/grid/cells/actions.html
. Second solution, you can add a new column action for test
like
<actionsColumn name="test_actions" class="Space\YourModule\Ui\Component\Listing\Column\TestAction">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="indexField" xsi:type="string">id</item>
<item name="sortable" xsi:type="boolean">false</item>
<item name="label" xsi:type="string" translate="true">Test Action</item>
<item name="urlEntityParamName" xsi:type="string">id</item>
</item>
</argument>
</actionsColumn>
And with class Space\YourModule\Ui\Component\Listing\Column\TestAction
in prepareDataSource, we have :
$url = $this->urlBuilder->getUrl(
'test_action',
['id' => $item['id']]
);
$html = '<a href="'. $url.'" target="_blank">
<button class="action-scalable action-default scalable">Test</button></a>';
$item[$this->getData('name')] = $html;