TL;DR
In this post, we point out the most common software bugs that are related to strings. The post is aligned with the Black Box Software Testing Foundations course (BBST) designed by Rebecca Fiedler, Cem Kaner, and James Bach.
The string is a sequence of characters where each character is from the same alphabet. Lastly, added famous alphabet that causes great trouble for software testers are emoticons.
Commonplace operations on strings are:
- search for substring
- replace one substring with another
- Concatenate (add one string to another), for example, Karlo ++ Šmid = KarloŠmid.
- calculate length
- truncate
- match one string in another (regular expressions)
Common errors are:
- Overflow is when the input string does not fit in the variable, and the program accepts this silently, causing bugs in the later processing of that variable.
- match or mismatch when we compare two strings that are visually same but were encoded into variables using different encodings
My heuristic to get testing ideas with strings is to investigate documentation of application programming language for string operations. Here is the Elixir language example.