Here is a guide I found of how this can be achieved with SQL Server: https://www.sqlshack.com/sql-unit-testing-reference-guide-for-beginners/
Hej Edward
Thanks for taking this up. I actually was not thinking of a unit test framework, much less automated regression testing. There are dedicated tools, for the former in the case of PostgreSQL pgunit or pgtap, though I never used them and do not know what it does. I just hat a quick glance into pgtap and it seems it is good for testing the DB objects, but not supporting content of a tables. Something a bit more sophisticated than a mere screenshot in the sense, that it is not just about documentation but also about easy of reproduction, is what I would fancy. Sure, I can type the test query to an editor from the screenshot, given that it is visible in its entirety, but useless if the connection details are not known.
With respect to faking. It all boils down to trust, maybe. I was not thinking of any transportation issue. Just, if the trust was complete, one would not need any protocols. Your superviser would just trust you to have done your work properly. But this does not happen too often. And it is not because the superviser are bad people by definition. We all are flawed people. I as a developer don't enjoy unit testing. I also forget sometimes some aspects I should test. For the time being, I take screenshots. They lack certain information, like the actual connection details. I like screenshots because I deem the hassle to fake it is bigger than to test properly. Why not plain text. Too easy to fake. I know, it would be malicious but the temptation is there. If I have write a test sql like the sample one in my initial comment, it is easy to write it returns 1. To me, it makes sense totally to have something that cannot be faked with little effort to cut the temptation and to have something that lends a hand if the need for reproduction should arise. Having said that, I feel it would take an effort to create something like that.
Varma hälsningar
Thiemo
I think I understand this a bit better now. It is less about testing that existing SQL scripts perform a certain task correctly, and more about providing proof that scripts have been run on a particular host and that they have met certain criteria when doing so. In other words: verification, except the customer is not involved in the actual verification process (they just witness some type of proof instead).
If we exclude the part about "No special tools needed to read the document", this could be a digital verification, like a certificate bundled with the script with the result and any other meta. The recipient could perhaps open the bundle inside their copy of DbVisualizer and check it there.
Like you say, I do think this requires some effort if it were to be implemented, and I don't see its priority being justified over other things currently being considered. But I could be wrong. I'll let you know if the situation changes.
And please let me know if I have misunderstood something about the feature criteria.
Thanks for helping with the formulation. Right on point.
In all my works where I had to give proof, it was to document in tools like JIRA or TFS. So, I'd rather would turn it around. Some document one can paste or attach to tools like the mentioned.
Maybe SVG or PDF can be signed digitally by DbVis? Sort of a button to generatet the document containing the details. Thinking of it again, a visual representation would be nice but not actually necessary which would reduce the implementation effort, I suppose.
With respect to implementation of the feature. I do not expect it to happen. Having that said, I am a bit unhappy with the title of the forum. I see my posts here not as requests, but as suggestions. As a single person, I am fully aware that I am in no position at all to request anything.
Thiemo Kellner
Hej
I have come more and more into the need to document (unit) tests. For the time being, I take screenshots, however, this has some shortcomings.
If I were to design such a test documentation feature, I would propose the following requirements.
Must have: