How to write the self-test script?

PHP business interface, you need to write a detection script. Executing the script in the monitoring system can self-check, but the parameters of the interface are not fixed. How to deal with this generally? for example, the interface of an order, the ID, order status is in A state, the program can be finished, the order status is in B state, and the program is stopped in the middle of the program. How to deal with such an interface?

Mar.17,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e498ef-44d20.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e498ef-44d20.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?