Harvesting energy from the environment makes it possible to deploy tiny sensors for long periods of time, with little or no required maintenance; however, this free energy makes testing and experimentation difficult. Environmental energy sources vary widely and are often difficult both to predict and to reproduce in the lab during testing. These variations are also behavior dependent—a factor that leaves application engineers unable to make even simple comparisons between algorithms or hardware configurations, using traditional testing approaches. In this paper, we describe the design and evaluation of Ekho, an emulator capable of recording energy harvesting conditions and accurately recreating those conditions in the lab. This makes it possible to conduct realistic and repeatable experiments involving energy harvesting devices. Ekho is a general-purpose tool that supports a wide range of harvesting technologies. We demonstrate, using a working prototype, that Ekho is capable of reproducing both solar and RF energy harvesting environments accurately and consistently. Our results show that Ekho can recreate harvesting-dependent program behaviors by emulating energy harvesting conditions accurately to within 77.4 μA for solar environments, and can emulate RF energy harvesting conditions significantly more consistently than a programmable RF harvesting environment.