There is an old thread about missing Testing documentation in Jmix (it was available in CUBA).
From there, @krivopustov :
We are constantly working on the documentation and updating it as soon as new sections are ready, usually each week.
Until there is something about testing in the docs, I will explain how to write integration tests for business logic and UI with examples.
The situation around testing does not seem to have improved much. And maybe gotten worse:
For all but UI it seems that there is one way to do it. The one explained in the thread above, also shown in @mario 's rent-your-stuff.
There’s still no documentation about this that I could find, but this is pretty much standard Java / Spring so not that bad.
UI testing is a whole other story. And you must test your UI!! A quick glance will show you:
-
@mario 's rent-your-stuff is using
io.jmix.ui:jmix-ui-test-assist
. - Jmix jmix-ui-tests uses Masquerade but not
jmix-ui-test-assist
- There’s also Sneferu from @mario
It would appear there are atleast three different options for UI testing in Jmix. Which ones are maintained and their pros/cons are left to imagination due to the lack of documentation on two of them.
Maybe Masquerade is the right one because it’s used by the official test repository? But that’s an addon, jmix-ui-test-assist
is builtin! but who uses that? except for mario’s demo I could not find more examples.
As you go digging you also find that:
-
Release notes talk about
ui-test-assist
. But there is no documentation there, except for API docs. - Masquerade on the Marketplace is not up-to-date. Unless you go to Github you would think it is abandoned
So … I would kindly as that some sort of Testing documentation is introduced in the next release. Even if its just some sample code and pointers. But atleast there would be a place telling you the recommended future proof approach to take on testing.