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
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
add a comment |
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
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
add a comment |
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
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
intellij-idea testng testng-dataprovider
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
add a comment |
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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