Blockchain technology is employed in mission-critical systems with high reliability requirements. Therefore, rigorous testing is essential for the adoption of this technology. Many techniques have been utilized in testing the trustworthiness and security of blockchain-based systems. These include fuzz testing, model-based testing, search-based testing and concolic testing. Additionally, blockchain technology can be utilized for improving the software and systems testing processes in general. We present a survey on this interplay between blockchain and testing. We categorize studies that apply testing techniques on blockchain-based systems and those studies that benefit from the blockchain technology for improving the testing process. We also propose a reference architecture for utilizing blockchain technology in the context of certification testing. This work has been submitted to the ACM for possible publication. Copyright may be transferred without notice, after which this version may no longer be accessible.