If it’s frontend testing, then you really need to use something like ATS rather than the Unit Testing module. As ATS runs tests through the browser, it is able to test widgets and client interaction that the Unit Testing module can’t.
Hope this helps.
ATS is good, but it is a paid service. In case you are not willing or able to raise the funds, here is some more information:
You do need to understand: module Unittesting helps you to test small units of your code. Basically, stuff that is ‘under the hood of your application’. For tests you are asking about Selenium is a better option. This records and plays client-actions on the frontend.
Wow, a nice next question shows that Megumi Koshiba is creating the extra functions for Unittest, exactly what you need: https://forum.mendix.com/link/questions/110930. Contact him, have him improve Unittesting and feed it to Marketplace :-)