Search-based Test Generation for Automated Driving Systems: From Perception to Control Logic