Page 1 of 1

Write values of each iteration to file

Posted: Tue May 10, 2011 11:23 am
by riccardo
I do have an iteration running, which generates a specific ID at the end of the testcase. Now I would like to write these ID's to a file as they will be used for further testcases.

I thought that would be easy possible using a StreamWriter and write them to a file. Opening the File is not a big Deal... I thought I could do this by using a Setup in the Testsuite, opening the file and generating the StreamWriter. Now the question is, how do I pass the StreamWriter to my Recording? and how can I pass the StreaWriter then to the Teardown Script which should close it?

Re: Write values of each iteration to file

Posted: Tue May 10, 2011 5:41 pm
by Support Team
Hello,

in a recording you can put user code action between the other actions.
Make the StreamWriter a global object or create one that appends to the file in every user code action.

Regards,
Roland,
Ranorex Support Team

Re: Write values of each iteration to file

Posted: Fri May 13, 2011 4:35 pm
by riccardo
Thanks for your answer

I solved it by creating a document for each iteration...


Regards
Riccardo