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

Passing collections of objects from one test to another

1 Answer 12 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shashi
Top achievements
Rank 1
Shashi asked on 06 Nov 2013, 09:51 PM
Hello,

What would be the best way to pass a collection of objects (both native data such as strings, ints, etc and custom objects) from one test to another?

I was considering using GetExtractedValue()/SetExtractedValue().  Since both of these take an 'object' as a parameter, I was wondering if I it would be possible to pass it a collection object (such as Array, List, etc) cast to 'object' if necessary - the called test would then 'uncast' it back to the collection object for use.  Two issues with that approach:
a) Still researching how to cast and uncast
b) It is probably not type-safe

Please let me know if there is a better way to accomplish what I need.

Please note that I am on TS 2012.2.1420.0 and developing tests in VS 2010 (C#/.NET) with the Test Studio Addin.

Thanks,
Shashi

1 Answer, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 11 Nov 2013, 07:10 AM
Hello Shashi,

If you would like to create global variables or functions in Test Studio Standalone version that are accessible from all the tests within the test project, you can create a utility class. This class will contain the intended functions or variables.

Let me know if 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
Shashi
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Share this question
or