When I run the test, I'm getting an erros informing that no parameters were
received for the test method. But, when I change my test class for the
following, it works:
public class MeuTeste {
@Test( dataProviderClass=GenericDataProvider.class,
dataProvider="DataProvider" )
public void metodoTeste1(
@TestInput(name="parametro1") final Integer parametro1 ) {
// ...
}
}
thanks for reporting this issue. As I'm not familiar with the setup of your environment, may I kindly ask you as a first attempt to solve this issue to check whether you've registered the net.sf.testng.databinding.TestAnnotationTransformer with TestNG before running the tests? Registering this annotation transformer is needed to get the @DataBinding annotation working. Please see http://testngdatabind.sourceforge.net/apidocs/net/sf/testng/databinding/TestAnnotationTransformer.html for details. Please let me know if this didn't solve the issue. Thanks a lot!
Kind regards,
Matt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
I've created the following test Class:
@DataBinding
public class MeuTeste {
@Test
public void metodoTeste1(
@TestInput(name="parametro1") final Integer parametro1 ) {
// ...
}
}
With the following data.properties file
MeuTeste.data.properties
metodoTeste1.dataSource=csv
metodoTeste1.url=/com/matera/ban/sdopen/unit/procedures/metodoTeste1.csv
metodoTeste1.mapper=headerNameMapper
metodoTeste1.separator=;
metodoTeste1.inputColumnPrefix=
And with the following metodoTeste1.csv file:
parametro1
1
1
1
1
When I run the test, I'm getting an erros informing that no parameters were
received for the test method. But, when I change my test class for the
following, it works:
public class MeuTeste {
@Test( dataProviderClass=GenericDataProvider.class,
dataProvider="DataProvider" )
public void metodoTeste1(
@TestInput(name="parametro1") final Integer parametro1 ) {
// ...
}
}
Is it a bug?
Does anyone have this issue?
--
Daniel M. Ivasse
daniel_ivasse@hotmail.com
Hi Daniel,
thanks for reporting this issue. As I'm not familiar with the setup of your environment, may I kindly ask you as a first attempt to solve this issue to check whether you've registered the net.sf.testng.databinding.TestAnnotationTransformer with TestNG before running the tests? Registering this annotation transformer is needed to get the @DataBinding annotation working. Please see http://testngdatabind.sourceforge.net/apidocs/net/sf/testng/databinding/TestAnnotationTransformer.html for details. Please let me know if this didn't solve the issue. Thanks a lot!
Kind regards,
Matt