Life is just test-driven development, taken to an extreme.
Tests == adaptation to the environment
E.g. short 2 minute video showing how bacteria evolves with random mutations to produce resistance to antibiotics:
https://www.youtube.com/watch?v=plVk4NVIUh8
Likewise at a macro scale, if Earth's atmosphere becomes inhospitable because of global nuclear war or a big asteroid collision, then the new "test for life" is adapting to the radioactive dust cloud. Keep mutating across generations until survivors can thrive.