I like to write my tests before I code and write them inline when developing a package, and when loading a package those VerificationTests should run and the load should fail and print a report if any of the tests fail.
I don't want a separate testing notebook. I don't know how to achieve this functionality, the difficulty is that when the package is run all the tests are as well and I don't know how to accumulate the failures and stop the load and present a report.
So here's a simplified example:
BeginPackage["MusicTools`"]; note::usage = "a note"; noteQ::usage = "test for a note"; Begin["`Private`"]; noteQ[note[x_] /; NumericQ[x]] := True noteQ[_] := False VerificationTest[noteQ["test"],False] End[ ] EndPackage
The code to generate an alert might look like this: