serenity-bdd/serenity-core

Unclear Error as text "Unknown Source" shows in console #2930

ldt0589 posted onGitHub

I'm using Serenity-cucumber for my project. Every time i get an error during executing, see that Console shows log with "Unknown Source", so it's difficult to debug code. Could someone help to improve the console log for more detail ??

Step failed
java.lang.NullPointerException: No BaseStepListener has been registered - are you running your test using the Serenity runners?
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:907)
    at net.thucydides.core.steps.StepEventBus.getBaseStepListener(StepEventBus.java:153)
    at net.thucydides.core.steps.StepEventBus.wrapUpCurrentCucumberStep(StepEventBus.java:932)
    at net.thucydides.core.steps.StepInterceptor.finishAnyCucumberSteps(StepInterceptor.java:560)
    at net.thucydides.core.steps.StepInterceptor.notifyOfStepFailure(StepInterceptor.java:554)
    at net.thucydides.core.steps.StepInterceptor.reportMethodError(StepInterceptor.java:421)
    at net.thucydides.core.steps.NormalMethodRunner.invokeMethodAndNotifyFailures(NormalMethodRunner.java:20)
    at net.thucydides.core.steps.StepInterceptor.runNormalMethod(StepInterceptor.java:406)
    at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:191)
    at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:84)
    at net.thucydides.core.steps.ProxyConfiguration$InterceptorDispatcher.intercept(ProxyConfiguration.java:51)
    at starter.specifications.WarehouseSpecification$ByteBuddy$CIPLxkql.createMultiWarehouse(Unknown Source)
    at starter.stepDefinitions.WarehouseStepDefinition.createNewMultiSupplier(WarehouseStepDefinition.java:21)
    at ✽...

<img width="1339" alt="image" src="https://user-images.githubusercontent.com/35304573/191406866-fc46752f-d169-4769-8572-bedb4cde92f4.png">

Information: Serenity-core: 3.2.0 Serenity-cucumber: 3.2.0


No BaseStepListener has been registered
that's usually because you did start the test incorrectly. if you invoke the SerenityCucumberRunner it will register the listener. check https://github.com/serenity-bdd/serenity-cucumber-starter, compare with your project, run mvn verfify

posted by globalworming over 2 years ago

No BaseStepListener has been registered that's usually because you did start the test incorrectly. if you invoke the SerenityCucumberRunner it will register the listener. check https://github.com/serenity-bdd/serenity-cucumber-starter, compare with your project, run mvn verfify

Thanks for reply. I used template project you shared. In my case above, i execute program by clicking button Run of Intelij. I still find the another solution. Thanks again,

posted by ldt0589 over 2 years ago

Running Serenity scenarios in IntelliJ via the feature files is not supported.

posted by wakaleo about 2 years ago

Fund this Issue

$0.00
Funded

Pull requests