Hi,
i`ve been using soapui for long time and i know how to create utility class with their library.
I would like to do the same with katalon.
Say for example:
Util.groovy:
public class Util {
//i don`t know what librairies i should use here…
}
public static void test_person(){
def myFile = new File(“C:/temp/myfile.json”);
JsonSlurper jsonSlurper = new JsonSlurper();
def parseJson = jsonSlurpe.parse(myFile )
String json = JsonOutput.toJson(parseJson)
def prettyJson = JsonOutput.prettyPrint(json)
assert test_person = ("person_expected: "+parseJson.person[0]) == “Clopin”
assert test_lname = ("lname_expected: "+parseJson.person[0]) == “Clopan”
assert test_adr = ("adr_expected: "+parseJson.person[0]) == “Clopin street”
assert test_city = ("city_expected: "+parseJson.person[0]) == “Clampin ville”
}
test.groovy
in this class i want to call only
assert test_person = ("person_expected: "+parseJson.person[0]) == “Clopin”
assert test_adr = ("adr_expected: "+parseJson.person[0]) == “Clopin street”
is it correct to use like:
Util.test_person().assert test_person = ("person_expected: "+parseJson.person[0]) == “Clopin”
Thank you for any help and suggestions.