mendix / UnitTesting

Module to run Mendix and JUnit unit test inside a project
Apache License 2.0
7 stars 12 forks source link

Rollback microflow tests after execution only works with a Setup microflow #19

Closed CP-Fabian closed 4 years ago

CP-Fabian commented 4 years ago

I have just completed the learning path 'Quality Control and Testing' and I noticed the behavior,that the entities I create within my microflow unittest doesn't rollback. According to the step description, the rollback should prevent all changes on my entities, but new entries are added and others are deleted after the tests run.

Apparently a transaction is only started if a Setup microflow is available in the module. I don't think this behavior is wanted.

I used Mendix Studio Pro 8.5.1, UnitTest 8.0.0 and ObjectHandling 3.0.0.

WardBrink commented 4 years ago

We are experiencing the same problems. Rollback does not seem to work at all.

You can workaround this bug by using the 'Start transaction' activity at the begin of every Test microflow or to add the Setup microflow to every module (as said above).

reinouts commented 4 years ago

Hi @WardBrink and @CP-Fabian . I wish I could be of more help right now but I suggest you file a ticket with Mendix Support.

WardBrink commented 4 years ago

Hi @WardBrink and @CP-Fabian . I wish I could be of more help right now but I suggest you file a ticket with Mendix Support.

Thanks for your reply! I created a Mendix support ticket.

WernerGrobler commented 4 years ago

We are experiencing the same issue. Also raised a support ticket, hopefully, they will get it fixed in the next release.

@WardBrink, I have tried adding the "Setup" microflow to the module in question, but it still seems not to roll back what was created in the UT. Am I missing something?