Make tests string type save.
(cherry picked from commit f20c54cc9f6b96ccba9c95cf82128df1aa987d77)