Skip to main content

I've noticed there are updates regarding the unit testing part, especially for triggers bound to tables. But I've noticed that I can select views in the data sets > Data rows, so I tried 🙂.

Unfortunately that doesn't work, and maybe that is OK.

Question: Should views be selectable over here? If yes, then how to fix the following error:

The unit test was aborted while this was not expected.

Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1. ERROR [42000] Microsoft[SQL Server]Cannot alter 'dummy_view' because it is not a table. ERROR [42000] Microsoft[SQL Server]Statement(s) could not be prepared.

Hint: Debugger shows this:

alter table [dummy_view] disable trigger all;

Dummy_view isn't a table.

If not, then they should be removed from the drop down. I’d almost assume that the data set should be created using tables only, but when it's also possible to do this by views (we have a lot in stead of insert/update/deletes for views), it could be nice (not saying it is the proper way to do this).

Hi René,

First of all, it's great that you're using unit tests!

You're correct to point out that views shouldn't belong in data sets. The data used by the views should be stored in the underlying tables. Therefore, the views should be excluded from the table selection for data sets.

Thanks for reporting this bug, we will fix this as soon as possible!

 

With kind regards,

Serhat Sahin


Views are now excluded from table selection for data sets in the 2020.2 version of the Software Factory.


Reply