Skip to content

Tests are not starting with Allure-testng 2.9.0 and TestNG 6.11 #314

Closed

Description

@Kanaduchi

I'm submitting a ...

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

I'm using TestNG 6.11. If I'm changing Allure-testng version from 2.8.1 to 2.9.0 I'm getting an error on tests execution start. StackTrace is attached.

TestNG version 6.14.3 works with Allure 2.9.0 as expected. But TestNG version 6.14.3 doesn't suite us because of multiple bugs.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

  1. Use Allure-testng 2.9.0 and Testng 6.11
  2. Use any test and run as xml suite

Error appears:
java.lang.NoSuchMethodError: org.testng.internal.TestResult.<init>(Ljava/lang/Object;Lorg/testng/ITestNGMethod;Ljava/lang/Throwable;Lorg/testng/ITestContext;)V at io.qameta.allure.testng.AllureTestNg.createFakeResult(AllureTestNg.java:171) at io.qameta.allure.testng.AllureTestNg.lambda$onStart$1(AllureTestNg.java:167) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1548) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at io.qameta.allure.testng.AllureTestNg.onStart(AllureTestNg.java:167) at org.testng.TestRunner.fireEvent(TestRunner.java:1184) at org.testng.TestRunner.beforeRun(TestRunner.java:621) at org.testng.TestRunner.run(TestRunner.java:594) at org.testng.SuiteRunner.runTest(SuiteRunner.java:380) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340) at org.testng.SuiteRunner.run(SuiteRunner.java:289) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301) at org.testng.TestNG.runSuitesLocally(TestNG.java:1226) at org.testng.TestNG.runSuites(TestNG.java:1144) at org.testng.TestNG.run(TestNG.java:1115) at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72) at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)

What is the expected behavior?

Tests are starting and passing. I expect to have the same behavior in 2.8.1 version and 2.9.0

What is the motivation / use case for changing the behavior?

Fixing the crash

Please tell us about your environment:

Allure version 2.9.0
Test framework testng@6.11

Activity

  1. added a commit that references this issue on Feb 12, 2019
    e3161ac
  2. cristianvasiliu commented on Apr 6, 2020

    @cristianvasiliu

    When trying to run Maven specific lifecycle project commands, like Test and Plugins-Surefire-Test:

    If I'm using following dependencies: allure-testng v2.9.0 and testng v7.0.0 then I'm getting same error.

    Allure version 2.9.0
    Test framework testng@7.0.0

    When I use testng v.7.1.0 then I'm gettingfollowing error: org/testng/IInvokedMethodListener2

    Allure version 2.9.0
    Test framework testng@7.1.0

    When I use below configuration, then tests are loaded successfully, but I can see only passed ones and with this mention: [AppClassLoader@18b4aac2] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified

    Allure version 2.9.0
    Test framework testng@6.14.3

    If I'm using below config then tests can run successfully

    Allure version 2.13.2
    Test framework testng@7.0.0
  3. baev commented on Apr 6, 2020

    @baev
    Member

    @cristianvasiliu FYI please do not comment on closed issues

    The support of testng 7+ was introduced in 2.13.2

    [AppClassLoader@18b4aac2] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified

    this is aspecj warning, you can configure aspectj weaver to disable processing of javax.* types in order to get rid of it. BTW this warning should not affect your tests run and allure

  4. cristianvasiliu commented on Apr 6, 2020

    @cristianvasiliu

    @baev ok, thanks for the FYI and for the hint

  5. cristianvasiliu commented on Apr 7, 2020

    @cristianvasiliu

    @cristianvasiliu FYI please do not comment on closed issues

    The support of testng 7+ was introduced in 2.13.2

    [AppClassLoader@18b4aac2] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified

    this is aspecj warning, you can configure aspectj weaver to disable processing of javax.* types in order to get rid of it. BTW this warning should not affect your tests run and allure

    Do you know @baev how to configure aspectj weaver to disable processing of javax.* type ? :) I couldn't find anywhere else to ask you this :D

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions