Using Workbench, I would like to check if my function does emit a message under certain circumstances. How can I test this using an .mt file? I only know about the Test function and the CheckAbort function, but these seem not the right tool.

Test also accepts Message expression and list of Message expressions.
This form tests message names and arguments, but it automatically wraps message arguments with HoldForm, so it can be used only to test messages that are emitted with HoldForm-wrapped arguments.

Third, most versatile, form accepted by Test, is list of Message expressions wrapped with HoldForm. In contrast to previous form, it does not wrap arguments with anything, so it can be used to test arbitrary arguments.

Test[Message[f::argx, f, 2], Null, {HoldForm@Message[f::argx, f, 2]}]

Important fact is that all above forms of expected messages are used as patterns, against which actual messages are matched. So arbitrary patterns can be used:

Mathematica is a registered trademark of Wolfram Research, Inc. While the mark is used herein with the limited permission of Wolfram Research, Stack Exchange and this site disclaim all affiliation therewith.