not getting the values saved in global variable string its printing though in console
Even with updating direct varible, also getting same value [C@24eb65e3 in url
default setting
TC 1 println GlobalVariable.sop = sob
guri_last
4637-b28f-dc0ca1e4d376
2021-02-25 14:44:12.689 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/API_Testing/CreateiTeam
2021-02-25 14:44:12.696 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2021-02-25 14:44:12.696 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/API_Testing/GetiTem
TC 2
2021-02-25 14:44:17.721 ERROR c.k.k.core.keyword.internal.KeywordMain - ❌ Unable to send request (Root cause: java.lang.IllegalArgumentException: Illegal character in path at index 101: https://myrurl/Services/part/list/9c76265f-5406-4637-b28f-dc0ca1e4d376/[C@24eb65e3/check
def slurper = new JsonSlurper()
def result = slurper.parseText(response.getResponseBodyContent())
old = result.newFields[0].value
def sep = old.split("\\|")
def st1 = result.value[0]
def sob = result.value[2] // value stored in sob
println GlobalVariable.sop = sob //then assigning value of sob to sop here as a Global Variable.
println GlobalVariable.sop1 = st1
setting values into Global Variables and printing the same in one statement.
reason i choose, in Test suite, global variable is assigned to sop and sop1 resp and printing in same statement. which seems like wrong choice ?
Did separate them but same “_” underscore is in testsuite side giving an issue
def result = slurper.parseText(response.getResponseBodyContent())
def guid = result.itemId
def old = result.newFields.find { it.fieldName == "Tx.SessionTest"}?.stringValue
println old
def sep = old.split("\\|")
def sob = sep.value[1]
def sop = sep.value[2]
println sob
println sop
'store encid in variable guid'
GlobalVariable.guid = guid
GlobalVariable.sob = sob
GlobalVariable.sop = sop
at line 18 in Console error value with underscore
> taxtan_varnme
should be assigned to GL
attaching the console logs where printing of the extracted value is shown, but not called back in url. Replaced in OR added a GL variable in default and in actual Request in Repository. Pls search for ERROR ConsoleErr_.txt (18.9 KB)
The ConsoleErr_.txt file you shared previously contains a lot of errors which indicate that your WS.sendRequest() call failed. For example,
2021-03-02 11:56:59.624 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2021-03-02 11:57:00.359 ERROR c.k.k.core.keyword.internal.KeywordMain - ❌ Unable to send request (Root cause: java.lang.IllegalArgumentException: Illegal character in path at index 101: https://myurl:443/myservice/id/list/-4d7c-9854-f66bb9d7ddb4/[C@a22c4d8/check
at com.kms.katalon.core.webservice.common.DefaultHttpEntityEnclosingRequest.<init>(DefaultHttpEntityEnclosingRequest.java:20)
at com.kms.katalon.core.webservice.common.RestfulClient.buildHttpRequestWithBody(RestfulClient.java:41)
at com.kms.katalon.core.webservice.common.RestfulClient.buildHttpRequest(RestfulClient.java:27)
at com.kms.katalon.core.webservice.common.RestfulClient.buildHttpRequest(RestfulClient.java:1)
at com.kms.katalon.core.webservice.common.BasicRequestor.send(BasicRequestor.java:55)
at com.kms.katalon.core.webservice.helper.WebServiceCommonHelper.sendRequest(WebServiceCommonHelper.java:28)
at com.kms.katalon.core.webservice.keyword.builtin.SendRequestKeyword$_sendRequest_closure1.doCall(SendRequestKeyword.groovy:42)
at com.kms.katalon.core.webservice.keyword.builtin.SendRequestKeyword$_sendRequest_closure1.call(SendRequestKeyword.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:68)
at com.kms.katalon.core.webservice.keyword.builtin.SendRequestKeyword.sendRequest(SendRequestKeyword.groovy:38)
at com.kms.katalon.core.webservice.keyword.builtin.SendRequestKeyword.execute(SendRequestKeyword.groovy:33)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:73)
at com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords.sendRequest(WSBuiltInKeywords.groovy:40)
at com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords$sendRequest.call(Unknown Source)
at itemLock.run(itemLock:47)
....
I am confused. Is that ConsoleErr_.txt a right one? It seems to be something irrelevant to your discussion.
@kazurayam Sir it is the right one. Katalon can’t do recording for API, would have added too.
Not Irrelevant sir, our discussion is based on value with underscore not getting assigned in GL in testsuite.
ConsoleErr_ have the prints of each line used for creating item, in which value is assigned to GL. but showing some value as [C@a22c4d8 instead of taxtan_varnme that is why i attached it and posted my code
Previous error was same with WS.sendRequest() call failed due to as shared Illegal character[C@a22c4d8 instead of taxtan_varnme and WS.sendRequest() call failed.
2021-03-02 11:56:59.624 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2021-03-02 11:57:00.359 ERROR c.k.k.core.keyword.internal.KeywordMain - ❌ Unable to send request (Root cause: java.lang.IllegalArgumentException: `Illegal character` in path at index 101: https://myurl:443/myservice/id/list/-4d7c-9854-f66bb9d7ddb4/[C@a22c4d8/check
at com.kms.katalon.core.webservice.common.DefaultHttpEntityEnclosingRequest.<in
@gsp
I hope you realize you are just posting various fragments of code, with the hope that somebody have a cristal globe and by magik will solve your issue.
With such approch kindly wait until Dumbledore will have some time to install Katalon!
@Russ_Thomas
Yeah, i know, i am mean and lazy to post again and again the link to ‘how to ask for help’
Feel free to ban me!
LE: yeah, i love harry potter