Your link has the answer, declarative testing. You need to think about why you wrote that code and declare some outputs for given inputs that give you confidence in your code.
The other tests from your link are just silly. You did not write code to terminate or to provide an answer for all inputs, you wrote code to provide the right answer.
To test some HTML for instance, think about what information you want the page to convey, load up a browser, and check that the info is displayed. Easy as that.
> You did not write code to terminate or provide an answer for all inputs...
Definitely not an expert. But to my eyes checking for non-termination seems very close to things that happen in SQL all the time.
For example, a parent query joins two subqueries that both map data, and then maps on that data. To test, I could just test one specific scenario with specific values in all columns. That would be more of a concrete test case.
But I might want something more robust checking the outer bounds of acceptable data (like a min and a max). That seems much closer to the non-termination test.
The other tests from your link are just silly. You did not write code to terminate or to provide an answer for all inputs, you wrote code to provide the right answer.
To test some HTML for instance, think about what information you want the page to convey, load up a browser, and check that the info is displayed. Easy as that.