Explain diff between TestNG Object[][] data provider VS. Iterable data provider? -


Can any object [] [] [] explain the difference between a datapriver versus an intrauterine dataprovider?

The testng documentation is called the following, but it is not clear enough for me. I have always used the object [] [] method because explanation of the ether method is secret and difficult to understand that in fact the paragraph What does it mean?

  The data provider method can return one to one of the following two types: - array of objects (object [] []) where the size of the first dimension is applied multiple times And the second dimension is an array of objects in the shape that should be compatible with the parameter types of the test method, this is an artist shown from the example below - an Iterator & lt; Object [] & gt; The only difference with the object [] [] is that an iterator will allow you to make your test data indelibly, invites TestNG intersections and then the test method with the parameters returned one by one by this Iterator. This is especially useful if you have many parameters set to pass the method and you do not want to make them all upfront.   

I asked this question here, but I'm sure if I get the answer:

The iterator will be used basically if your data setup step is time- Consumer is

Assume that you are reading data from Excel, on which you can create data New are some processing - possibly starting a Web service or other IO operations. If the processing takes 2 seconds per data and you have 200 data,

  1. with the object [] [], your first test will run after 400 seconds After all the data is generated
  2. With the iferator, if you move your processing logic to the next () method, your first test starts after 2 seconds, the test is executed and then the next data is set up. .

    , this option basically depends on whether you have structured your tests if your datesetup is long.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -