Principles for generalised testing of knowledge bases