Questions tagged [testng-dataprovider]

TestNG @DataProvider annotation

Refers to @DataProvider, a TestNG annotation that allows combinations of parameters (test data) to be automatically injected into your test methods. It's encountered often with Selenium.

Related tags :

Reference links :

449 questions
0
votes
1 answer

How to Fail a Test Case for 1 particular data and continue executing the same script in TestNG

I have a test script which is to be run for "n" number of data, I'm Doing that using @DataProvider, Now my problem is when i use "Assert" to fail the test case when test fails for 1 particular data, then execution of whole Test Script stops. I want…
0
votes
1 answer

Need help using DataProvider with Testng

Data Provider in Base Class @DataProvider(name = "AAA") public Iterator AAA() throws DataDrivenFrameworkException { String excelResource = System.getProperty("user.dir") + System.getProperty("file.separator") +…
0
votes
1 answer
0
votes
1 answer

How to verify dataprovider is null or not?

How we can verify whether the dataprovider (dataProvider="DataSet_Sheet1") we've got is null or not. Accordingly we'll skip that row and continue to next one. Because if we've written any program to fetch data from an excel sheet and it doesn't…
Raghav Arora
  • 390
  • 4
  • 9
0
votes
1 answer

Run Multiple methods for each value of DataProvider in TestNG

I have a bunch of TestNG tests that run using a DataProvider as a bunch of parameters. My Runner looks something like this: So lets say if i have two parameters…
0
votes
1 answer

Manual test cases mapping with Selenium test cases

I have manual test cases written in Excel file with an unique Id associated with each test case. I have test methods written for these test cases using Selenium Webdriver+TestNG. I need help on following: 1.How should I map the manual test case Id…
RAKY
  • 21
  • 2
  • 6
0
votes
0 answers

Why is my TestNG dataprovider website blocking?

I'm using TestNG, Selenium Grid and using the @dataprovider annotation to read my testcase values from an Excel sheet. I am testing two sites that offer the same products using the same field names etc., but just under different brand names. Site A…
-1
votes
1 answer

How can I run the same test cases for all the data in a list using testng?

I am using data provider and test ng to run the same test multiple times using different values from a list. However, I have several tests and I want them all to run one by one so Test 1 -> Test 2 -> Test 3, for each item in the list. Right now Test…
-1
votes
1 answer

ClassCastException - TestNGMethod to TestNGScenario

Eclipse/Maven/Java/Selenium/TestNG My very simple test: @DataProvider( name="suite") public Object[][] dpMethod_suite() { return new Object[][] {{"diamonds"},{"hearts"},{"clubs"},{"spades"}}; } @Test( dataProvider="suite") // <---- throws…
code_warrior
  • 77
  • 10
-1
votes
1 answer

How to run your Test with Byte Array values from 00 to FF ( Testng) Java

How to run your Test with Byte Array values from 00 to FF ( Testng) Java I want to run my Tests with byte array values from 00 to FF and verify my results based on Each values. I have used CSV and Excel sheet ( or testng DataProvider) to add byte…
-1
votes
1 answer

Selenium DataProvider - How to add all the values from Excel Sheet in HashMap

I have written some test scripts to which i need to send test data to execute the scripts. I have written a code to iterate excel and find the given string along with the row and column number in which the String is present. Here is my testData…
Kaustubh
  • 506
  • 4
  • 22
-1
votes
1 answer

How to use 2 DataProviders with 2 data types with 1 Factory in overrriding contructor

I have two DataProviders which should set the datas with two data types (long & double) with one factory, but when I run the code the tests take different data types like, double & int. public class FactoryTest { @Factory(dataProvider…
-1
votes
1 answer

Parallel execution with data provider

I am trying to run the test parallel using dataprovider. I have mentioned dataproviderthreadcount=3 in testng xml
Madhu
  • 3
  • 2
-1
votes
1 answer

Want to send a specific row of excel to dataprovider in selenium TestNG

I have created an excel of 10 rows×10 columns.I want dataprovider to return only those rows,which has a value "Y" in the respective column.This will be used when a Test suite will be executed and test cases to be executed will be flagged as…
-1
votes
1 answer

How can I return an Iterator over a List of Mappings

The method looks like this. I just want to return an Object[] or an Object[][] or an Iterator< Object[]> with each row containing one of the three mappings that are created in for loop. I need all fields (category, usage, country) to be sent…
gmitsios
  • 21
  • 1
  • 5
1 2 3
29
30