This is a migrated thread and some comments may be shown as answers.

Utility class variables and test lists

1 Answer 86 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Bruno
Top achievements
Rank 2
Bruno asked on 04 Jun 2014, 02:43 AM
Hi Telerik team,

When running test cases in a test list, do the variables stored in a utility class reset to default when a new test case is executed? For example, if the first test case (in the test list) increments a zero-based index to one (1), would the final test case read zero (0) or one (1)?

Regards

1 Answer, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 05 Jun 2014, 12:14 PM
Hello Bruno,

Thank you for contacting us.

It depends how you have implemented your logic.

If every test creates its own instance of the utility class every time the variables will be reset.

If you are changing the variables directly in the class they won't be reset.

Hope this helps.


Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Bruno
Top achievements
Rank 2
Answers by
Boyan Boev
Telerik team
Share this question
or