How to update global variable during run time?

Scenario: I want to create an organisation ex ‘Org2345’(random generation) and then update my global variable ‘OrgName’. So that I can use this in different test like, to see org name is displayed in create user organisation list etc.

Please, can anyone help me with this.

There are two options for you.

  1. Set global variable in TC1 and use it in TC2 (within test suite run) - variable won’t be persisted after execution
  2. Store your variable externally (file, database, …) and read it - variable is persisted after execution

option 3
define a globalvariable with whatever value in profile and add your testcases to a suite (use the defined profile)
the value of the global will persist only in the testsuite scope

Thanks for the help…