# Can the text result be used in another testcase?

Can result ‘get text’ be used in another testcase?

In testCaseA

String textResult = callTestCase(findTestCase("path\to\testCaseB"))

println textResult


It is not that, i solved Change a global variable value permanently

That’s the only straightforward way to retrieve a value from one test case and use it in another test case. If that’s not what you’re asking for, can you please rephrase your question so I can understand better?

yes, I want to ‘get text’ in testcase1 to be used in testcase2. so, i can verify the data in testcase2. I just got an answer by creating data.txt before and entering the value from the ‘get text’ result. so, I can verify it in another testcase by taking the data first in data.txt

That will work.

TC can return value last command of TC that should return value should be return:

calling TC:

console: