How to save a local variable (test case variable) as a global variable so that it can be used in another test case?

Now, on the sharing data across testcases …
Everything depends on how large is the data to be passed from one testcase to another.
If the data is too complex, few solutions came into my mind rigtht now:

  • write the data into a file, like @mwarren04011990 suggested (plain text, csv, excel, whatever is more appropiate)
  • use a custom class (I think @Russ_Thomas have somewhere an example of this, I did’nt manage to find it right now). Anyway, this will not diverge too much from using GlobalVariables, which in the end are just properties of a class instance, instantiated by parsing the xml files corresponding to the curent exectution profile (top of the default one)
  • use sqlite - here @kazurayam made some research:
    Issue while writing on excel file with parallel execution - #6 by kazurayam
  • use a nosql db if it is more appropiate, if you have one available (someone brave have to write an example)

… or whatever else.

But please, avoid using ‘call test case’ unless the use case is very-very simple.