To me "property based testing" would come to mind, where you would define properties of the input and output of a method and the library runs random test cases for you.
The most prominent implementation would be QuickCheck[0], which is written in Haskell, but there are re-implementations of it in almost every language.