TestNG DataProvider marks as invalid return type Iterator, but it passes the params into a test methodIntelliJ inspection gives “Cannot resolve symbol” but still compiles codeTestNG - Dataprovider at Class level test annocationDriver behavior executing parallel TestNG selenium tests with dataprovidertestng dataprovider and iretrylistener data issueTestNG @DataProvider to Return Dynamic ClassDataProvider returning Object[][] does not match argument typeIssue returning a Hashmap from a TestNg DataProviderUsing TestNG @DataProvider, it returns “[Utils] [ERROR] [Error] java.lang.NullPointerException” when calling a method() that returns Object[][]TestNG - Is there a lightweight (not dataprovider, not XML) way to pass parameters among @Test and @BeforeMethods?Relationship between dataprovider in parallel mode and thread parallel “methods” setting

What is the evidence for the "tyranny of the majority problem" in a direct democracy context?

Can I still be respawned if I die by falling off the map?

Is there a way to get `mathscr' with lower case letters in pdfLaTeX?

What is the highest possible scrabble score for placing a single tile

How to cover method return statement in Apex Class?

Creepy dinosaur pc game identification

How do you make your own symbol when Detexify fails?

Can a stoichiometric mixture of oxygen and methane exist as a liquid at standard pressure and some (low) temperature?

Yosemite Fire Rings - What to Expect?

Why Shazam when there is already Superman?

Recommended PCB layout understanding - ADM2572 datasheet

How do apertures which seem too large to physically fit work?

Plot of a tornado-shaped surface

How can I write humor as character trait?

The IT department bottlenecks progress, how should I handle this?

Has any country ever had 2 former presidents in jail simultaneously?

It grows, but water kills it

Temporarily disable WLAN internet access for children, but allow it for adults

Can I say "fingers" when referring to toes?

System.QueryException unexpected token

Why does the Sun have different day lengths, but not the gas giants?

Why is the "ls" command showing permissions of files in a FAT32 partition?

What is Cash Advance APR?

Terse Method to Swap Lowest for Highest?



TestNG DataProvider marks as invalid return type Iterator, but it passes the params into a test method


IntelliJ inspection gives “Cannot resolve symbol” but still compiles codeTestNG - Dataprovider at Class level test annocationDriver behavior executing parallel TestNG selenium tests with dataprovidertestng dataprovider and iretrylistener data issueTestNG @DataProvider to Return Dynamic ClassDataProvider returning Object[][] does not match argument typeIssue returning a Hashmap from a TestNg DataProviderUsing TestNG @DataProvider, it returns “[Utils] [ERROR] [Error] java.lang.NullPointerException” when calling a method() that returns Object[][]TestNG - Is there a lightweight (not dataprovider, not XML) way to pass parameters among @Test and @BeforeMethods?Relationship between dataprovider in parallel mode and thread parallel “methods” setting













0















When creating a Dataprovider that returns Iterator I have it in my test method, but my intellij-idea marks this return type as invalid and shows the message:
"Data provider must return either Object[][] or Iterator[], or Iterator".



Here is my class/ method:



public class TradeTestDataProvider 

@DataProvider(name = "experimental")
public Iterator<TestCase> createCases() throws IOException
List<TestCase> test = DataReader.generateCasesFromJson("src/test/resources/json/experimental_test_case");
return test.iterator();





Please advise, if I am missing something or it is related to TestNG/IDE issue?



Update:
I created a post to discuss this issue with plugin:
topic










share|improve this question



















  • 1





    Please add your dataprovider class/method as well and please add the code in the form of text/code in the question and not as a screenshot

    – Sameer Arora
    yesterday






  • 1





    It looks intellij-idea plugin issue. Earlier version of TestNG was not supporting single argument and the ide-plugin may not get updated with TestNG updates.

    – user861594
    yesterday











  • @user861594, I think, you are absolutely right, cause when I turned off the plugin, the issue disappeared.

    – Paulus
    9 hours ago















0















When creating a Dataprovider that returns Iterator I have it in my test method, but my intellij-idea marks this return type as invalid and shows the message:
"Data provider must return either Object[][] or Iterator[], or Iterator".



Here is my class/ method:



public class TradeTestDataProvider 

@DataProvider(name = "experimental")
public Iterator<TestCase> createCases() throws IOException
List<TestCase> test = DataReader.generateCasesFromJson("src/test/resources/json/experimental_test_case");
return test.iterator();





Please advise, if I am missing something or it is related to TestNG/IDE issue?



Update:
I created a post to discuss this issue with plugin:
topic










share|improve this question



















  • 1





    Please add your dataprovider class/method as well and please add the code in the form of text/code in the question and not as a screenshot

    – Sameer Arora
    yesterday






  • 1





    It looks intellij-idea plugin issue. Earlier version of TestNG was not supporting single argument and the ide-plugin may not get updated with TestNG updates.

    – user861594
    yesterday











  • @user861594, I think, you are absolutely right, cause when I turned off the plugin, the issue disappeared.

    – Paulus
    9 hours ago













0












0








0


0






When creating a Dataprovider that returns Iterator I have it in my test method, but my intellij-idea marks this return type as invalid and shows the message:
"Data provider must return either Object[][] or Iterator[], or Iterator".



Here is my class/ method:



public class TradeTestDataProvider 

@DataProvider(name = "experimental")
public Iterator<TestCase> createCases() throws IOException
List<TestCase> test = DataReader.generateCasesFromJson("src/test/resources/json/experimental_test_case");
return test.iterator();





Please advise, if I am missing something or it is related to TestNG/IDE issue?



Update:
I created a post to discuss this issue with plugin:
topic










share|improve this question
















When creating a Dataprovider that returns Iterator I have it in my test method, but my intellij-idea marks this return type as invalid and shows the message:
"Data provider must return either Object[][] or Iterator[], or Iterator".



Here is my class/ method:



public class TradeTestDataProvider 

@DataProvider(name = "experimental")
public Iterator<TestCase> createCases() throws IOException
List<TestCase> test = DataReader.generateCasesFromJson("src/test/resources/json/experimental_test_case");
return test.iterator();





Please advise, if I am missing something or it is related to TestNG/IDE issue?



Update:
I created a post to discuss this issue with plugin:
topic







intellij-idea testng testng-dataprovider






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 9 hours ago







Paulus

















asked yesterday









PaulusPaulus

206




206







  • 1





    Please add your dataprovider class/method as well and please add the code in the form of text/code in the question and not as a screenshot

    – Sameer Arora
    yesterday






  • 1





    It looks intellij-idea plugin issue. Earlier version of TestNG was not supporting single argument and the ide-plugin may not get updated with TestNG updates.

    – user861594
    yesterday











  • @user861594, I think, you are absolutely right, cause when I turned off the plugin, the issue disappeared.

    – Paulus
    9 hours ago












  • 1





    Please add your dataprovider class/method as well and please add the code in the form of text/code in the question and not as a screenshot

    – Sameer Arora
    yesterday






  • 1





    It looks intellij-idea plugin issue. Earlier version of TestNG was not supporting single argument and the ide-plugin may not get updated with TestNG updates.

    – user861594
    yesterday











  • @user861594, I think, you are absolutely right, cause when I turned off the plugin, the issue disappeared.

    – Paulus
    9 hours ago







1




1





Please add your dataprovider class/method as well and please add the code in the form of text/code in the question and not as a screenshot

– Sameer Arora
yesterday





Please add your dataprovider class/method as well and please add the code in the form of text/code in the question and not as a screenshot

– Sameer Arora
yesterday




1




1





It looks intellij-idea plugin issue. Earlier version of TestNG was not supporting single argument and the ide-plugin may not get updated with TestNG updates.

– user861594
yesterday





It looks intellij-idea plugin issue. Earlier version of TestNG was not supporting single argument and the ide-plugin may not get updated with TestNG updates.

– user861594
yesterday













@user861594, I think, you are absolutely right, cause when I turned off the plugin, the issue disappeared.

– Paulus
9 hours ago





@user861594, I think, you are absolutely right, cause when I turned off the plugin, the issue disappeared.

– Paulus
9 hours ago












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55280550%2ftestng-dataprovider-marks-as-invalid-return-type-iteratorcustomobject-but-it%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55280550%2ftestng-dataprovider-marks-as-invalid-return-type-iteratorcustomobject-but-it%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript