Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest TestNg Support issue #263

Closed
Rupak-66 opened this issue Apr 6, 2019 · 12 comments
Closed

Latest TestNg Support issue #263

Rupak-66 opened this issue Apr 6, 2019 · 12 comments

Comments

@Rupak-66
Copy link

Rupak-66 commented Apr 6, 2019

QAF Version

2.1.14

Issue

Hi while running cucumber with QAF from xml file using com.qmetry.qaf.automation.step.client.gherkin.GherkinScenarioFactory with latest Testng(6.14), it is throwing error. But with TestNg version 6.10.0 it is working fine.

Error log

[RemoteTestNG] detected TestNG version 6.14.3
log4j:WARN No appenders could be found for logger (com.qmetry.qaf.automation.testng.pro.QAFAnnotationTransformer2).
log4j:WARN Please initialize the log4j system properly.
java.lang.NoClassDefFoundError: org/testng/internal/Constants
at org.testng.TestRunner.(TestRunner.java:131)
at org.testng.remote.support.RemoteTestNG6_12$1.newTestRunner(RemoteTestNG6_12.java:33)
at org.testng.remote.support.RemoteTestNG6_12$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG6_12.java:66)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:713)
at org.testng.SuiteRunner.init(SuiteRunner.java:260)
at org.testng.SuiteRunner.(SuiteRunner.java:198)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1295)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1273)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1128)
at org.testng.TestNG.runSuites(TestNG.java:1049)
at org.testng.TestNG.run(TestNG.java:1017)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: java.lang.ClassNotFoundException: org.testng.internal.Constants
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 14 more

Environment

Eclipse
Maven

@cjayswal
Copy link
Member

cjayswal commented Apr 6, 2019

duplicate #174

@cjayswal
Copy link
Member

cjayswal commented Apr 6, 2019

Is there any specific reason you want to use TestNG latest version? There are many changes in TestNG newer version that may result in inconsistency for existing users and that's why most of the enterprise users want to stick with one proven version.

@Rupak-66
Copy link
Author

Rupak-66 commented Apr 7, 2019

I was just trying to use latest version of all jars. Is there any option of specifying which TestNg version I want to use with QAF framework or I need to stick to default TestNg version shipped with QAF framework?

@cjayswal
Copy link
Member

cjayswal commented Apr 7, 2019

For TestNG, don't specify TestNG version and let qaf decide which version of TestNG to use. For Selenium and appium you should be able to use what ever version required for execution environment.

If you found that other dependencies overrides TestNG version, you can exclude TestNG like this example from other dependencies. Example is using IVY and same you can do with maven or gradle.

@Rupak-66
Copy link
Author

Rupak-66 commented Apr 7, 2019

Ok got it.... Thanks for clarifying. Is QAF going to upgrade TestNg version with Time or option of specifying TestNg version ?

@cjayswal
Copy link
Member

cjayswal commented Apr 7, 2019

If you will not specify TestNG version it will automatically use what ever version provided in qaf dependency. So in future if qaf dependencies get updated with update of qaf version your project should be able to resolve required version of TestNG.

With #174 we are planning to allow user to choose one of the supported version of TestNG by introducing separate qaf-testNG extension dependency. In that case also instead of specifying TestNG version user may need to specify qaf-testng version which in turn will resolve appropriate testng version.

To be brief follow steps as above comment.

@Rupak-66
Copy link
Author

Rupak-66 commented Apr 7, 2019

Thanks

@vamshinookala555
Copy link

I am trying to work on gherkin.GherkinScenarioFactory to feed data for Examples in feature files from excel sheet, could you please provide me a working example.

This may be out of context here, but I couldn't get many examples on the same.

@cjayswal
Copy link
Member

@vamshinookala555 please refer documentation.

@vamshinookala555
Copy link

I have gone through it, but somehow I am unable to integrate QAF to my exisiting project, so asking your help with example project.

@cjayswal
Copy link
Member

cjayswal commented Apr 6, 2020

Closing duplicate issue.

@vamshinookala555 your comment in not related to original reported issue. Please post your queries and/or questions to users group.

@cjayswal cjayswal closed this as completed Apr 6, 2020
@nikhilkumarreddy1990
Copy link

i am using QAF 3.0 framework along with TestNG 7.4.0 version and seeing the above mentioned error. can you please be specific which version of TestNG is supported for QAF 3.0.0. Also can you share which dependency should come first in POM.XML file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants