Unit testing

Unit testing is another popular domain for annotations. In the Java world, JUnit has long made use of annotations. Many XQuery vendors provide a feature whereby tests can be run by invoking a command that scans a directory for modules containing functions marked with a custom annotation, such as !unit:test. An example of this is XRAY for MarkLogic [6].