Skip to content

Got java.lang.NullPointerException: No BaseStepListener has been registered when running this demo 'junit-webtests' #33

@bai-yingzhao

Description

@bai-yingzhao

@wakaleo
When I tried to run this demo 'junit-webtests', I got the following exceptions:

Test mechanism  Time elapsed: 0.01 sec  <<< ERROR!
java.lang.NullPointerException: No BaseStepListener has been registered
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:228)
        at net.thucydides.core.steps.StepEventBus.getBaseStepListener(StepEventBus.java:109)
        at net.thucydides.core.steps.StepEventBus.ensureThatTheTestSuiteStartedWith(StepEventBus.java:141)
        at net.thucydides.core.steps.StepEventBus.testStarted(StepEventBus.java:134)
        at net.thucydides.junit.listeners.JUnitStepListener.testStarted(JUnitStepListener.java:75)
        at org.junit.runner.notification.SynchronizedRunListener.testStarted(SynchronizedRunListener.java:49)
        at org.junit.runner.notification.RunNotifier$3.notifyListener(RunNotifier.java:121)
        at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:72)
        at org.junit.runner.notification.RunNotifier.fireTestStarted(RunNotifier.java:118)
        at org.junit.internal.runners.model.EachTestNotifier.fireTestStarted(EachTestNotifier.java:42)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:323)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at net.serenitybdd.junit.runners.SerenityRunner.runChild(SerenityRunner.java:427)
        at net.serenitybdd.junit.runners.SerenityRunner.runChild(SerenityRunner.java:52)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:387)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

Test mechanism  Time elapsed: 0.005 sec  <<< ERROR!
java.lang.NullPointerException: No BaseStepListener has been registered
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:228)
        at net.thucydides.core.steps.StepEventBus.getBaseStepListener(StepEventBus.java:109)
        at net.thucydides.core.steps.StepEventBus.ensureThatTheTestSuiteStartedWith(StepEventBus.java:141)
        at net.thucydides.core.steps.StepEventBus.testStarted(StepEventBus.java:134)
        at net.thucydides.junit.listeners.JUnitStepListener.testStarted(JUnitStepListener.java:75)
        at org.junit.runner.notification.SynchronizedRunListener.testStarted(SynchronizedRunListener.java:49)
        at org.junit.runner.notification.RunNotifier$3.notifyListener(RunNotifier.java:121)
        at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:72)
        at org.junit.runner.notification.RunNotifier.fireTestStarted(RunNotifier.java:118)
        at org.junit.internal.runners.model.EachTestNotifier.fireTestStarted(EachTestNotifier.java:42)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:323)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at net.serenitybdd.junit.runners.SerenityRunner.runChild(SerenityRunner.java:427)
        at net.serenitybdd.junit.runners.SerenityRunner.runChild(SerenityRunner.java:52)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:387)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

Test mechanism  Time elapsed: 0 sec  <<< ERROR!
java.lang.NullPointerException: No BaseStepListener has been registered
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:228)
        at net.thucydides.core.steps.StepEventBus.getBaseStepListener(StepEventBus.java:109)
        at net.thucydides.core.steps.StepEventBus.ensureThatTheTestSuiteStartedWith(StepEventBus.java:141)
        at net.thucydides.core.steps.StepEventBus.testStarted(StepEventBus.java:134)
        at net.thucydides.junit.listeners.JUnitStepListener.testStarted(JUnitStepListener.java:75)
        at org.junit.runner.notification.SynchronizedRunListener.testStarted(SynchronizedRunListener.java:49)
        at org.junit.runner.notification.RunNotifier$3.notifyListener(RunNotifier.java:121)
        at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:72)
        at org.junit.runner.notification.RunNotifier.fireTestStarted(RunNotifier.java:118)
        at org.junit.internal.runners.model.EachTestNotifier.fireTestStarted(EachTestNotifier.java:42)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:323)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at net.serenitybdd.junit.runners.SerenityRunner.runChild(SerenityRunner.java:427)
        at net.serenitybdd.junit.runners.SerenityRunner.runChild(SerenityRunner.java:52)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:387)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

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