Some alarms come with test buttons, but others should be tested by trying to open the door or window in question to ensure they're working. In some cases, you can test sensors connected to an app by simply checking the diagnostic in the app.