Created
March 5, 2020 13:56
-
-
Save testautomation/6ffdf48c928ea30c8d9882e05a23ddef to your computer and use it in GitHub Desktop.
Revisions
-
testautomation created this gist
Mar 5, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ *** Settings *** Library REST *** Test Cases *** Use JSON Schema keyword pattern to test JSON string for substrings [Setup] GET https://jsonplaceholder.typicode.com/users/1 # matches "Leanne Graham" as a substring: String response body name pattern="anne Grah" # quotes are not necessary, it is still read as a string by the library: String response body name pattern=anne Grah # pattern supports regular expressions: String response body name pattern=(sqilz|Leanne Graham) # checking that 'name' does not contain the word: String response body name pattern=^((?!asyrjasalo).)*$