Im having the following problem, When i run a testng suite, I get the following error:
"Parameter 'paramName' is required by @ test on method testMethod, but has no been marked @OPtional o or defined". The problem that everything is correct here is part of the code im trying to execute:
<test name = "Test name">
<parameter name="model" value="bank"/>
<parameter name="module" value="buyer"/>
<parameter name="testName" value="testname" />
<classes>
<class name="com.company.test.cases.example">
<methods>
<include name = "testMethod">
<parameter name="testLinkName" value="NAme on testlink to report to."/>
</include>
</methods>
</class>
</classes>
</test>
@Parameters({"model", "module", "testName", "testLinkName"})
@Test
public void testMethod(String model, String module, String testName, String testLinkName) throws Exception {
homePage = new HomePage(getDriver());
homePage.navigateToBank();
securityPage = new BankSecurity(this);
securityPage.validateBankUI();
assertTest(securityPage);
}
Were this test is, extends from base Test which has the following method invoked before the test
@Parameters({"model", "module", "testName", "testLinkName"})
@BeforeMethod
public void beforeTest(String model, String module, String testName, String testLinkName)
{
this.subModel=model;
this.moduleName = module;
this.testName = testName;
this.testLinkName = testLinkName;
}
I'm not including were the driver is instantiated.
If any could have any idea of what could be happening.