Contains-Assertions suddenly not matching any more?!
- 9 years ago
Nevermind! We found the reason!
A colleague of mine had reformatted ("pretty printed") the soapui-project.xml file (for whatever reason...).
Interestingly soapUI had survived the procedure (i.e. the file was still readable) but the formatting of the strings used in the assertions was gone (i.e. all line breaks of assertion strings were lost) and hence the assertions didn't match any more.
While trying to understand why things didn't match anymore, I saw that all comparisson strings were on a single line and hence thought, that one would need to take the raw-string for the comparisson. But one actually needs to take the formatted string instead! If one pastes the formatted string into the assertion's contains-field, then the assertion matches! Due to that I realized that someone must have "flattened" all assertion patterns.
After realizing this and tracing down the "culprit" we reverted to a version just prior before that reformatting and everything was back to normal.
Thanks and regards,
M.
BTW: an observation I did during my analysis: you do funny escaping of XML characters inside token strings!
Only '<' is escaped as < while '>' is not replaced by > as it should. Thus, e.g. "<foo>" as a pattern is stored in your soapUI project file as '...<token><foo></token>...'. This is actually invalid XML, but astonishingly your parser consumes that without problems...