Unit Testing

Hi. I use the Unit Testing module. I have two questions. 1) Is it possible to test the values entered by the client on the screen in a microflow? 2) Is it possible to test several widgets together under the same conditions? For example, I want to make sure that the values entered by the client in several screens match the conditions.   Thank you.
2 answers

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:

  1. Yes, if you record them and then designtime feed those values to your unittests. But if you want this runtime, so live client-actions and running the tests live with those values: no.
  2. Also yes for doing so designtime, no for runtime.

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 :-)