Add new folder “TestActions” under Logic tab


For automated testing we need often to make actions on our modules to setup/teardown our tests. We don't want to have this code on our production environment.

By separating the production code and the test code in different folders it should be able to not deploy and run the test code on the production environment.

Created on 26 Nov 2018
Comments (7)

Why not have those in a separate module and application so that that code lever goes live? 

I want to be able to use private actions from the module (for example inserting or deleting of a record in an entity) in my setup/teardown actions without making them public.

Same way like what is common in java:

I feel your pain.

For that, I would prefer to have some kind of protected level in the actions. I'm really not into having those kind of test actions in a module that goes live.

Maybe I am not explaining clear enough what I mean. 

The idea is that the actions in the test folder will not be build and deployed in production.

In the configuration in Lifetime you should be able to set on which environment the test folder should be build.

Oh, I see! That's a good one!

Great Idea, using UnitTestingFrameWork with separate Test Modules enforces you to make all your testable actions public, which is not what you want for actions that are not meant to be public.

With this Idea, one can define unit test for public actions from a test module, so truelly calling them as other consumer modules also do, and define unit test for private actions in the module of the private actions.

Why did I not come up with this Idea?

Changed the category to Backend