Automated testing and debugging with AI