Object instance = com.getConstructor().newInstance(parameters);
result.add(instance);
public class FBTest extends DataSetup{
@Factory(dataProviderClass = DataProviders.class, dataProvider = "FBTestDriver")
public FBTest(String selectionextid, String classid, String typeid, float decimalprice) throws Throwable{
this.SelectionExtId = selectionextid;
this.ClassId = classid;
this.TypeId = typeid;
this.DecimalPrice = decimalprice;
//Selenium code;
}
@Test
public void CheckWinPrice() {
try {
//Selenium code using the above parameters
} catch (Throwable e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@Test
public void CheckWinPercent() {
try {
//Selenium code using the above parameters
} catch (Throwable e) {
//TODO Auto-generated catch block
e.printStackTrace();
}
}
}
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/VNfBevuKtEwJ.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
@DataProvider(name = "FBTestDriver")
public static Object[][] DataStorage() throws FileNotFoundException {
String [][] Values = null;
String Datadir = System.getProperty("user.dir") + InitApp.config.getValue("DATA_PATH");
String ClassName = "FBTest";
ReadCSV obj = new ReadCSV(Datadir + ClassName + ".csv").skipHeader();
try {
Values = obj.ReadIncludedTestData();
} catch (IOException e) {
System.out.println("File " + ClassName + ".csv Not Found!!! " + e);
}
System.out.println("No of Rows passed: " + Values.length);//Debug line
return (Object[][]) Values;
}
org.testng.TestNGException:
The factory method class tests.FBTest.tests.FBTest() threw an exception
at org.testng.internal.FactoryMethod.invoke(FactoryMethod.java:93)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:140)
at org.testng.TestRunner.initMethods(TestRunner.java:409)
at org.testng.TestRunner.init(TestRunner.java:235)
at org.testng.TestRunner.init(TestRunner.java:205)
at org.testng.TestRunner.<init>(TestRunner.java:160)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:139)
at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:269)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:561)
at org.testng.SuiteRunner.init(SuiteRunner.java:157)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
at org.testng.TestNG.run(TestNG.java:1022)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:109)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:202)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:173)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.testng.internal.FactoryMethod.invoke(FactoryMethod.java:86)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Tests">
<test name="FF Test" parallel="false" preserve-order="true">
<classes>
<class name="tests.FBTest"/>
</classes>
</test>
</suite>
--Cédric
To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/He06MmTTHK0J.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/sUNLcPOPAm8J.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
Hi all, some coleagues while running sone GUI automation tests from Eclipse they keep getting the following exception during execution although the final resuts
are passed. Here is a screenshot of their classpath. They have the latest TestNG plugin for Eclipse

I saw in the community that this is a known issue if you use IDEA.
Have you any idea what maybe be the cause of this exception in my case?
Also a second question just for info
I saw that the selenium-server-standalone.jar includes the testNG libraries.
So in the case that the testng-6.5.1.jar is also in the classpath which testNG libraries are used
during the test execution?
Than you in advance
Panagiotis
Panagiotis Tsiakos
Siemens Enterprise Communications S.A.
Enterprise
Product Development
15 Andrea Metaxa str., Room 1.14
GR 145 64,
Nea
Kifisia
Athens,
Greece
Tel: +30 210 8189609
Fax: +30 210 8189761
mailto:
panagiotis.tsiakos@siemens-enterprise.com
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/oEaAlfc5dHcJ.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.