But when update the value in globalvariable it worked. (but test case also show the result for gived value not the updated variable saved in previous script by GlobalVariable.guid
How to overwrite value in global variable in Testcase ? Does it work at Testsuite level overwriting of Global variable. ?
That global variable changes its state during the test execution?
Iām thinking about possible solutions but I need more info about what youāre trying to do first.
Yes, thatās the problem.
It happens because GV values donāt keep the value after the test case ends
You can find the solution here: Update GV permanently
Are you working with Jira/xray by any chance?
Iāve experienced the same exact problems than you but a week before and it drove me crazy, so Iām really trying to help because I know what it is hahahaha.
nope not jira !! but soon that will come. btw problem solved it was my code⦠silly me
captured the wrong value from GV ā¦aarh!! overwriting was working ā¦but not using the right value hahaha didnāt review my own code lol
Just curious, are you overwriting the GV during a single test and using it in another part of that same test, or are you changing that value during a test and then using the value in the next one? I mean, the value is persisting after a TC execution?
Because I thought you couldnāt change the value permanently if you simply do something like this:
I mean, the value is persisting after a TC execution? - Exactly If you gave the value like you did. And if you keep that value empty
GlobalVariable.myGlobalVariable = āā And use it your tests. And it will be overwritten for that TestSuit (until you provide or overwrite that value in GV)