Problem using DataProvider.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem using DataProvider.

Jaya Nagdev

Hi,

There is a test case which uses data provider & that data provider
returns object array of length 30 x 7, it works fine. the objects
returned are not so heavy from memory wise. But when the test method
which uses data provider returning object array of 5 x 5 and the
objects are bit heavy from memory aspect, ecllipse gets hanged. There
is no appropriate error thrown and there is scope ahead..


I would like to know what mechanism is being used to run test method
with data provider?

Also, i would like that if the data provider returns Vector of Vector
instead of Obejct array of array.

Thx.
Jaya


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Problem using DataProvider.

Cédric Beust ♔
Hi Jaya,

If you are running out of memory, consider returning an Iterator<Object[]> instead of Object[][], this should solve your problem.

Documentation here:  http://testng.org/doc/documentation-main.html#parameters-dataproviders

As for returning a Vector instead of Object[][], it's pretty easy to write a function that will make the conversion for you.  Let us know if you need help with that.

--
Cedric


On 1/8/07, JayaN <[hidden email]> wrote:

Hi,

There is a test case which uses data provider & that data provider
returns object array of length 30 x 7, it works fine. the objects
returned are not so heavy from memory wise. But when the test method
which uses data provider returning object array of 5 x 5 and the
objects are bit heavy from memory aspect, ecllipse gets hanged. There
is no appropriate error thrown and there is scope ahead..


I would like to know what mechanism is being used to run test method
with data provider?

Also, i would like that if the data provider returns Vector of Vector
instead of Obejct array of array.

Thx.
Jaya

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en
-~----------~----~----~----~------~----~------~--~---