Official advice is to check your smoke alarm at least once a month, whilst you’re busy on your spring clean take the time to do an additional check. It’s quick and easy to do, just remember to tell everyone at home that you are doing it before the alarm goes off.
Before you test, vacuum it gently using the soft brush attachment to remove dust from the sensors. Press the test button and the alarm should make an audible alarm for a brief period of time. If it doesn’t it’s worth replacing the batteries and retesting. If the alarm is over 10 years old, you should consider replacing the whole unit. Your local hardware shop should have a range of products for you to select from.