Wireless sensor networks have emerged as a key technology which is used in many safety critical applications. The sensors in wireless sensor network have to be deployed in hostile, harsh and unattended environments for long periods of time. This creates a great challenge in providing a good quality of service. This results in introductions of faults, sensor failures, communication failures and changes in topology. Hence, efficient fault detection techniques are required for good quality of service. In this article, we survey various fault detection techniques and provide a new taxonomy to integrate new fault detection techniques. We perform a qualitative comparison of the latest fault detection algorithms. From a qualitative analysis, we select a list of techniques that are analyzed quantitatively. We also discuss the shortcomings, advantages and future research directions for fault detection in wireless sensor networks.