Say, for example, you have a program that sends a message to a server and that server validates it.
Note: The server validation process can have additional test cases due to it being implemented in various countries (you would have to comply with their rules).
If you wanted to automate the testing on this, you could write various test cases in some programming language (e.g. Java). However, as more test cases arise, you would have to go back to the program and keep adding more code. You wouldn't be able to reuse it for different countries as some require certain tests to be ran and others don't. You would always be modifying the code.
What would a better strategy be to go about making the automation work in this scenario? (Sorry if this is too broad, not really sure where to ask this).
Scenario: (The server is doing all the testing)
A program sends data to a server and the server must validate if the data given is indeed correct or if the data follows some rule set on the server. There can be many rules from country to country. For example, lets say you send attachments, there must be a certain naming scheme or they must correspond with the data somehow. In another country, they might not care about the naming scheme.