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

Logger report broken in the new version 1.0.5 #8

Open
lagori opened this issue Mar 6, 2020 · 0 comments
Open

Logger report broken in the new version 1.0.5 #8

lagori opened this issue Mar 6, 2020 · 0 comments

Comments

@lagori
Copy link

lagori commented Mar 6, 2020

Hi,
I am using a the adapter for generating HTML and Logger reports. Simple configuration of

#enable reports
extent.reporter.html.start=true
extent.reporter.logger.start=true

#report config
extent.reporter.html.config=src/test/resources/html-config.xml
extent.reporter.logger.config=src/test/resources/logger-config.xml

#report locations
extent.reporter.html.out=target/HtmlReport/ExtentHtml.html
extent.reporter.logger.out=target/LoggerReport/

with the Listener in the ExtentITestListenerAdapter.class in the base class. The Logger is generating fine when using version 1.0.3 but breaks when using the version 1.0.5

Error as follows:#

Mar 06, 2020 4:50:32 PM freemarker.log._JULLoggerFactory$JULLogger error
SEVERE: Error executing FreeMarker template
FreeMarker template error:
The following has evaluated to null or missing:
==> config.getConfig("js") [in template "commons/commons-inject-js.ftl" at line 2, column 3]


Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??


FTL stack trace ("~" means nesting-related):
- Failed at: ${config.getConfig("js")} [in template "commons/commons-inject-js.ftl" at line 2, column 1]
- Reached through: #include "../commons/commons-inject-j... [in template "logger/logger-test.ftl" at line 166, column 17]

Java stack trace (for programmers):

freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134)
at freemarker.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:479)
at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:401)
at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:370)
at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:100)
at freemarker.core.DollarVariable.accept(DollarVariable.java:63)
at freemarker.core.Environment.visit(Environment.java:331)
at freemarker.core.Environment.visit(Environment.java:337)
at freemarker.core.Environment.include(Environment.java:2694)
at freemarker.core.Include.accept(Include.java:171)
at freemarker.core.Environment.visit(Environment.java:331)
at freemarker.core.Environment.visit(Environment.java:337)
at freemarker.core.Environment.visit(Environment.java:337)
at freemarker.core.Environment.process(Environment.java:310)
at freemarker.template.Template.process(Template.java:383)
at com.aventstack.extentreports.templating.FreemarkerTemplate.processTemplate(FreemarkerTemplate.java:53)
at com.aventstack.extentreports.templating.FreemarkerTemplate.getSource(FreemarkerTemplate.java:40)
at com.aventstack.extentreports.templating.FreemarkerTemplate.writeTemplate(FreemarkerTemplate.java:46)
at com.aventstack.extentreports.reporter.BasicFileReporter.processTemplate(BasicFileReporter.java:152)
at com.aventstack.extentreports.reporter.ExtentLoggerReporter.flush(ExtentLoggerReporter.java:59)
at com.aventstack.extentreports.ReportObservable.lambda$23(ReportObservable.java:526)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at com.aventstack.extentreports.ReportObservable.notifyReporters(ReportObservable.java:526)
at com.aventstack.extentreports.ReportObservable.flush(ReportObservable.java:424)
at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:290)
at com.aventstack.extentreports.testng.listener.ExtentITestListenerAdapter.onFinish(ExtentITestListenerAdapter.java:20)
at org.testng.TestRunner.fireEvent(TestRunner.java:895)
at org.testng.TestRunner.afterRun(TestRunner.java:859)
at org.testng.TestRunner.run(TestRunner.java:590)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
at org.testng.SuiteRunner.run(SuiteRunner.java:286)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1109)
at org.testng.TestNG.runSuites(TestNG.java:1039)
at org.testng.TestNG.run(TestNG.java:1007)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:283)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:120)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)

Any help is appreciated.

Many Thanks,
Ark.

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

No branches or pull requests

1 participant