Add new folder “TestActions” under Logic tab
740
Views
9
Comments
New
Backend

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.

2024-01-22 15-21-29
Pedro Cardoso

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:

2024-01-22 15-21-29
Pedro Cardoso

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.


2024-01-22 15-21-29
Pedro Cardoso

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?

2014-02-07 17-02-43
Vasco Pessanha
Changed the category to
Backend
Merged this idea with 'Simulator with stub data to quickly debug changes' (created on 07 Feb 2020 08:00:42 by Karthik Nataraj)

I know there is a preview option available to view the UI changes, but it would be good if we can test the actions locally by passing using test/stub data which goes through the action workflows and shows the result. This saves a lot of development time for publishing and testing for even a minor changes.



This comment was:
- originally posted on idea 'Simulator with stub data to quickly debug changes' (created on 07 Feb 2020 by Karthik Nataraj)
- merged to idea 'Add new folder “TestActions” under Logic tab' on 07 Oct 2020 05:07:00 by Daniël Kuhlmann