extent-framework / extentreports-cucumber4-adapter

Cucumber4 Adapter for Extent Framework
http://extentreports.com/docs/versions/4/java/cucumber2.html
Apache License 2.0
39 stars 22 forks source link

klov reporter throws java.util.NoSuchElementException: No value present #4

Closed NerdishShah closed 5 years ago

NerdishShah commented 5 years ago

Enabling klov reporter throws java.util.NoSuchElementException: No value present

Below are the configs used:

/ extent.properties /

extent.reporter.avent.start=false extent.reporter.bdd.start=false extent.reporter.cards.start=false extent.reporter.email.start=false extent.reporter.html.start=true extent.reporter.klov.start=true extent.reporter.logger.start=true extent.reporter.tabular.start=false

extent.reporter.avent.config= extent.reporter.bdd.config= extent.reporter.cards.config= extent.reporter.email.config= extent.reporter.html.config= extent.reporter.klov.config=src/test/resources/klov.properties extent.reporter.logger.config=

extent.reporter.tabular.config=src/test/resources/tabular-config.xml extent.reporter.avent.out=test-output/AventReport/ extent.reporter.bdd.out=test-output/BddReport/ extent.reporter.cards.out=test-output/CardsReport/ extent.reporter.email.out=test-output/EmailReport/ExtentEmail.html extent.reporter.html.out=test-output/HtmlReport/ExtentHtml.html extent.reporter.logger.out=test-output/LoggerReport/ extent.reporter.tabular.out=test-output/TabularReport/

/ klov.properties /

project.name=adaptor 4 report.name=Build mongodb.host=localhost mongodb.port=27017 klov.host=http://localhost klov.port=80

foursyth commented 5 years ago

Can you share the entire stack trace?

NerdishShah commented 5 years ago

Can you share the entire stack trace?

java.util.NoSuchElementException: No value present at java.base/java.util.Optional.get(Optional.java:148) at com.aventstack.extentreports.reporter.ExtentKlovReporter.getConfigValue(ExtentKlovReporter.java:351) at com.aventstack.extentreports.reporter.ExtentKlovReporter.loadInitializationParams(ExtentKlovReporter.java:314) at com.aventstack.extentreports.reporter.ExtentKlovReporter.loadInitializationParams(ExtentKlovReporter.java:303) at com.aventstack.extentreports.service.ExtentService$ExtentReportsLoader.initKlov(ExtentService.java:205) at com.aventstack.extentreports.service.ExtentService$ExtentReportsLoader.createViaProperties(ExtentService.java:119) at com.aventstack.extentreports.service.ExtentService$ExtentReportsLoader.(ExtentService.java:87) at com.aventstack.extentreports.service.ExtentService.getInstance(ExtentService.java:28) at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.createFeature(ExtentCucumberAdapter.java:230) at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.handleStartOfFeature(ExtentCucumberAdapter.java:220) at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.handleTestCaseStarted(ExtentCucumberAdapter.java:147) at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.access$100(ExtentCucumberAdapter.java:58) at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$3.receive(ExtentCucumberAdapter.java:95) at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$3.receive(ExtentCucumberAdapter.java:92) at cucumber.runner.AbstractEventPublisher.send(AbstractEventPublisher.java:45) at cucumber.runner.AbstractEventBus.send(AbstractEventBus.java:9) at cucumber.runner.TimeServiceEventBus.send(TimeServiceEventBus.java:3) at cucumber.runner.ThreadLocalRunnerSupplier$SynchronizedEventBus.send(ThreadLocalRunnerSupplier.java:90) at cucumber.runner.ThreadLocalRunnerSupplier$LocalEventBus.send(ThreadLocalRunnerSupplier.java:63) at cucumber.runner.TestCase.run(TestCase.java:36) at cucumber.runner.Runner.runPickle(Runner.java:40) at cucumber.runtime.junit.PickleRunners$WithStepDescriptions.run(PickleRunners.java:97) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:68) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:23) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:73) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:124) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:65) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at cucumber.api.junit.Cucumber$1.evaluate(Cucumber.java:133) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)

anshooarora commented 5 years ago

Can you add this to klov.properties and try again?

mongodb.uri=

Please do not delete any keys from this file.

NerdishShah commented 5 years ago

Can you add this to klov.properties and try again?

mongodb.uri=

Please do not delete any keys from this file.

Its resolved now. Thanks for the quick response.