qmetry / qaf

Quality Automation Framework for web, mobileweb, mobile native and rest web-service using Selenium, webdrier, TestNG and Java Jersey
https://qmetry.github.io/qaf
MIT License
252 stars 136 forks source link

NeedInfo: Upgrading from QAF 2.1.14-RC1 to 2.1.15 #324

Closed raviguptasmarsh closed 4 years ago

raviguptasmarsh commented 4 years ago

Description

When upgrading from 2.1.14-RC1 to 2.1.15, our framework broke due to 2 changes.

imports failed:

  1. import com.qmetry.qaf.automation.testng.pro.DataProviderUtil;
  2. import com.qmetry.qaf.automation.rest.WSCRepositoryConstants;

Can you please suggest the alternate for these 2 ? Could not find a proper solution in Release Notes.

amitbhoraniya commented 4 years ago

Try with below imports.

com.qmetry.qaf.automation.testng.dataprovider.DataProviderUtil com.qmetry.qaf.automation.ws.WSCRepositoryConstants

Refer qaf-support-ws/releases. qaf/releases and release notes

raviguptasmarsh commented 4 years ago

Thanks @amitbhoraniya

One more query: "dataProviderDesc" is not part of the DataDrivenScenario anymore. Does this mean that we do not need to exclusively do this anymore:

for (ITestNGMethod m : suite.getAllMethods()) { if (m.getInstance() instanceof DataDrivenScenario) { DataDrivenScenario d = (DataDrivenScenario) m.getInstance(); try { String v = (String) FieldUtils.readDeclaredField(d, "dataProviderDesc", true); ClassUtil.setField("dataProviderDesc", d, getBundle().getSubstitutor().replace(v)); } catch (Exception e) { e.printStackTrace(); } } }

cjayswal commented 4 years ago

Hi Ravi, What are you trying to achieve? will you please provide details?

It looks like you want to parameterize meta-data in BDD file. In that case, the meta-data for data provider has parameterization support. Try with latest version, parameter in meta-data for data provider should work. For example, 'datafile':'${my.env}/testdata.csv' should work. There are new features introduced with newer releases you can refer release notes.

raviguptasmarsh commented 4 years ago

@cjayswal Added another ticket for the issue being faced after upgrading: https://github.com/qmetry/qaf/issues/325