We just published this article on testing NetLogo code:
https://www.sciencedirect.com/science/article/pii/S0304380026001973
The article:
- Discusses how adequate code testing practices provide efficiency, credibility, and understanding of models;
- Presents a model implementation cycle that includes written model description, coding, code testing, and revisions;
- Lists types of errors common in NetLogo code;
- Provides methods for producing and analyzing test output, to identify unexpected results that could result from code errors (or from model design issues); and
- Provides methods for finding and fixing code errors.
The supplementary materials provide example code that is easily modified to produce several kinds of test output.