I have just been moved to a team, where we manually test system-generated messages (SMS and e-mail) - a bank sending notifications such as

"On 11.5.2018, transaction +1.94 from 111/7777 was made on account 987."

We check them against templates (in this case, it is missing currency).

Please, what are the options of automating these tests? There are a few dozen of those templates, and one incoming e-mail could contain several of such notifications.

Or, to word it differently:

We know how some text is supposed to look. How do we automate testing checking whenever it really looks that way?


1 Answer 1


The normal way to automate checking if the text looks like you expect is using regular expressions. You define the expression and apply it to your text using one of the numerous regular expression processors. So you have a static part and the part that might change according to certain rules. This is probably what you call templates.

Harder way (however I do not believe this is your case) is to implement your own semantic analyzer that would extract the particular sense from the messages. This is usually the case of complex language processors like programming language compilers or automated language translators (when you translate say from English to German). You can use either general purpose languages to code such analyzers or use the solutions like xText instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.