Verification and compliance testing are required if agents are to be delegated responsibility for legally binding contracts, for example in electronic markets. This paper describes a general agent communication framework which allows several different notions of verification and compliance testing to be described. In particular we consider what type of verification or testing may be possible depending on the information which may be available (agent internals, observable behaviour, normative specifications) and the semantic definition of the communication language. We use this framework to identify the types of languages which will permit verification and testing in open systems where agents' internals are kept private. This analysis gives some ideas about how compliance might be enforced in an open system.