Debugging JUnit tests

0
I have tried both Mendix recommendations for unit testing where you write the following....and have some concerns about both paths and which is best for our organization.     The question I have is with JUnit is there a way to drop into a debug session to allow DEV to debug?  As of now you issue a POST and then I am not seeing a way to debug.  I am also not seeing any code coverage reports only tests that pass/fail - is there a way that I am just not seeing?   Microflow Unit Tests Pros DEVs would already be familiar with micro-flows and could be an easy transition Cons In using the 'unittesting' module I am not seeing code coverage reports only that tests (pass/fail) Increases our deployment binary as there seems to be no way to exclude `TEST_*` from the compiled binary Snippet from another forum post A Mendix application is one big bad blob, so when your application grows and the amount of unit tests grow in the same pace it becomes to large to handle in the Modeler. JUnit tests​​​​​​​ ​​​​​​​Cons This path seems to be more involved and according to another forum post they stated that it can also make things more brittle I am not seeing a way to locally debug which does NOT benefit developers as in traditional software development where a DEV could debug their code alongside the unit test code to refine methods/functions If someone changed the name of the Mendix micro-flow the impact is that the JUnit test would also have to reflect this new name change making the tests more brittle. You'd write the microflow tests as microflows and run them from the application. I guess you could write Java code to call a microflow and test the result there, but you're adding a lot of unnecessary complexity and fragility to your application. There are Java Actions in the Unit Testing module that call microflows and show the integration. Install the module and look in the javasource folder of your application to see the source code for these. Pros Could use real mocking library (Mockito) to mock out services to avoid hitting live services
asked
0 answers