Fill out Unit test attributes when adding from control procedure

Related products: Software Factory

When adding a new unit test in the detail tab page of a control procedure, it would be nice when the Unit test type, Object type, Control procedure and Subroutine/table/task etc is already filled out. That way, we only need to provide a name and description for the unit test, which speeds up the process of adding unit tests.

 

 

Tricky part here is that the task is unaware of it being started in the detail screen, thus leaving the control procedure field empty. I do agree we could find a way to make this work.

The Unit test type may not necessarily be the same as the Code group; especially with (Instead of) triggers. But for others such as Tasks and Subroutines it follows the same as above. The object is also difficult as a control procedure template can be assigned to multiple program objects or weaved dynamically to multiple program objects.

Lots of challanges to overcome here


Update, the control procedure selection does work; my bad 😅

 


Ah, i have missed that as well. So i understand that not all is as easy as it looks, but maybe we could at least try to fill out the information that is easy to fill out. Based on the control procedure, i think you should be able to retrieve the object type right? Maybe, if the templates of a control procedure are only linked to one object type, we could fill that out as well?


Could be looked into! I'll open the idea 😄


NewOpen

In version 2024.2, I've already implemented some code that searches for other unit tests based on the name of the unit test you are adding. It then determines the most commonly used unit test type among those similar unit tests to assign the appropriate type.