Check also this awk simple solution. Will remove the string no matter where it is and should be portable:
$ echo "test.xyz|test3.abc|test5232.lop|filename.test|file.text|qwerty.bat" |awk -F"test5232.lop." '{printf("%s%s\n",$1,$2)}' test.xyz|test3.abc|filename.test|file.text|qwerty.bat