Clean, plentiful, and easy-to-harvest solar energy is the ultimate renewable energy. It is becoming more important as the world begins to take notice of the burgeoning carbon emission problems that come with burning fossil fuels. Thin-film solar cells have been increasingly used for energy harvesting. This paper studies the effect of mechanical deformation on the performances of amorphous silicon (a-Si) and perovskite solar cells. Compression and tension tests were conducted on a-Si solar cells bonded to Fiber-Reinforced Polymer (FRP) plates. Tension tests were also carried out on perovskite solar cells deposited on glass substrate. A projector was used to illuminate the cells during the mechanical tests to simulate 100% sun. J-V characteristic curves were measured at different strain levels until failure of the samples. The experimental results suggest the presence of strain thresholds for a-Si solar cells under both compression and tension loading conditions, below which the a-Si solar cells work properly while the performance degrades rapidly once the strain goes beyond the strain thresholds. Perovskite solar cells are more ductile with a maximum tensile strain of 3%, and they show negligible degradation of performance before the fracture of glass substrate.