Measure the string to calculate the time of rail. It works best with the proper regarding light intensity, duration, and timing.
An affordable way to test the battery is by placing battery in a battery pack charger to hear if it will charge. https://www.trademama.com/outdoor-sensor-lights/suppliers.html