In the US, most smoke alarms have a “test“ mode which is where you can check if the siren works. It’s typically a button on the device itself.
However, you cannot use that to test whether an automation that you have set up to trigger when the smoke alarm goes off is working, because the code which is sent to the hub from the test button is different.
So if what you are trying to do is test your automations based on the smoke alarm, then you have to actually trigger the smoke alarm. That includes notifications.
however, be aware that every time you do this you slightly reduce the useful life of the smoke alarm, just because that’s how the sensor works. So it’s not something you want to do a lot more often than you have to.
For the smoke alarm part, the easiest way is usually just use a blown out match close to the detector. (Do not use anything with an active flame.)
You can also buy “smoke in a can” type products which are specifically designed for testing sensors. You won’t typically need one for the smoke detector, as the blown out match should work fine. But if you do want to test the carbon monoxide sensor, get one of these can products. (Do not follow any of internet suggestions for capturing car exhaust or smoke or anything else in a plastic bag. That is not a safe procedure. Just use the can tester if you want to.)
By the way, the can testers are really expensive to ship, so it’s usually not a good idea to buy them from Amazon. Just go to your local Home Depot or Walmart, they should have some at a much less expensive price.