It's honestly difficult to test and also not really desirable. Changing MAXIMUM_CATS from 100 to 200 shouldn't cause a test failure should it? In these cases you can logically say, "what if the test assertion is wrong?"
At this level, what you really care about is whether your app is working in production.
For this use:
Monitoring with threshold alerts. So for a web app if you get over N non 200s over a period then someone should know about it automatically.
Smoke tests running on production
Browser tests for key scenarios running on the live site (assuming it's a website)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It's honestly difficult to test and also not really desirable. Changing
MAXIMUM_CATS
from 100 to 200 shouldn't cause a test failure should it? In these cases you can logically say, "what if the test assertion is wrong?"At this level, what you really care about is whether your app is working in production.
For this use: