@Charlieface Well, as you know, I regard that as something that should be disallowed in general. It was a bit too much of a detour to work into this article. I wanted it to be quite short and focussed. Perhaps I will revisit it at some stage.
Rummaging around in the mind-blowing internals of the MERGE implementation might well be deemed too risky, even for a bug that might do horrible things
@ErikReasonableRatesDarling I actually already replaced the part of the system that this set of unit tests relies on, so it will be able to take advantage of all the work I put in to deal with that in one place. All the XML fragments are in their own table. I have CHECKSUM and HASHBYTES columns for the various uses in the system and manage collisions centrally when a new XML fragment is added.
In addition to saving huge amounts of space through the deduplication, it also cuts down on having extra columns for all those things in any table that needs these fragments. Like there will be some tests that have 3-4 fragments, and all would need the actual XML and the appropriate hash/case sensitive mechanism.
Now they just have the contentID, and different contentID means it's different so, easy peasy.
I think it's about 200,000 "unit" tests that are used to make sure the various inputs and outputs to the Data Warehouse match expected.
It's really 5000 or so human-created tests, but they have to fan through different cardiovascular specialities and versions of the source system to be able to handle, so the run possibilities multiply up.
@HannahVernon It's a complex space - structured cardiovascular reports are based on these knowledgebases, and the things docs check off are coded and structured, but the data mart is like a flatter, more tabular version amenable to analytics, so it has a lot of rules to get there, and we have to test they are accurate.
But it's computers, right. Everything is just string re-writing anyway. Input is this, output is that. The devil is in between.
Apparently now if Visual Studio is updating (I don't hardly use it, but it has a security vulnerability, and yes, the updater still seems to hang randomly, maybe because I had SSMS open), you can't run SSMS because Visual Studio Shell is being updated.