-
Notifications
You must be signed in to change notification settings - Fork 15
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
Exception in thread "main" java.lang.NumberFormatException: For input string: "" #6
Comments
Stacktrace is the same as webdriverio-boneyard/wdio-allure-reporter#26 |
Hi, yes, Cucumber is used. So short-term fix is for us to maybe hack the allure-results' json files or medium-term solution is to wait for next release containing that stale PR? |
For now we're using work-around on string-replace json files status="" to status="broken" |
This is not a solution because then your report will become not true. The current version of Allure 1.5.x requires test times as required values, so report can't be built without them. Maybe we could make a more user-friendly error message, but instead, we are working on Allure v2, that will not have this problem. |
In case it helps anyone else, here’s my implementation of @simonwilbert’s workaround: # If the Allure test results folder has files, generate a report from those files
if [ "$(ls -A ./allure-report)" ]; then
# Monkey-patch workaround for https://github.com/allure-framework/allure-npm/issues/6#issuecomment-283311586
# Replacement code via http://stackoverflow.com/a/19457213/223225
LC_ALL=C # http://stackoverflow.com/a/23584470/223225
find ./allure-report -type f -print0 | xargs -0 sed -i '' -e 's/status=""/status="broken"/g'
find ./allure-report -type f -print0 | xargs -0 sed -i '' -e "s/stop=\"\"/stop=\"$(date +%s)000\"/g"
allure generate ./allure-report
fi |
@just-boris If you aren't going to fix this problem in v1, how soon can we get access to v2? I am able to get results when I run single specs, but not when I run my entire suite, even though the suite passes and has no timeouts. Also, is it possible for allure to show a history of test results, or does it only present the most recent set of results? |
Redirecting the last question to @baev |
history is only available when using Jenkins plugin (v2.13+) and latest Allure commandline (2.0-BETA5). It is fully backward compatible with old adapters |
Thanks for the quick responses @just-boris and @baev. But what about v2 and the errors |
Allure 2.0 is already released and published. Please, check |
i ran "allure generate allure-results", generating the following error after 30 seconds of processing.
c:\Source\e2etests>allure generate allure-results
Exception in thread "main" java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at java.lang.Long.valueOf(Unknown Source)
at com.sun.xml.internal.bind.DatatypeConverterImpl._parseLong(Unknown Source)
at ru.yandex.qatools.allure.model.TestCaseResult_JaxbXducedAccessor_stop.parse(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StructureLoader.startElement(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unknown Source)
at javax.xml.bind.JAXB.unmarshal(Unknown Source)
at ru.yandex.qatools.allure.commons.AllureFileUtils.unmarshal(AllureFileUtils.java:59)
at ru.yandex.qatools.allure.commons.AllureFileUtils.unmarshal(AllureFileUtils.java:50)
at ru.yandex.qatools.allure.commons.AllureFileUtils.unmarshal(AllureFileUtils.java:40)
at ru.yandex.qatools.allure.data.io.TestSuiteReader$TestSuiteResultIterator.next(TestSuiteReader.java:48)
at ru.yandex.qatools.allure.data.io.TestSuiteReader$TestSuiteResultIterator.next(TestSuiteReader.java:1)
at ru.yandex.qatools.allure.data.io.TestCaseReader$TestCaseResultIterator.nextSuite(TestCaseReader.java:46)
at ru.yandex.qatools.allure.data.io.TestCaseReader$TestCaseResultIterator.hasNext(TestCaseReader.java:56)
at ru.yandex.qatools.allure.data.AllureReportGenerator.generate(AllureReportGenerator.java:63)
at ru.yandex.qatools.allure.data.AllureReportGenerator.generate(AllureReportGenerator.java:53)
at ru.yandex.qatools.allure.AllureMain.main(AllureMain.java:48)
Command aborted due to exception {}.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:153)
at ru.yandex.qatools.allure.command.ReportGenerate.runUnsafe(ReportGenerate.java:48)
at ru.yandex.qatools.allure.command.AbstractCommand.run(AbstractCommand.java:52)
at ru.yandex.qatools.allure.CommandLine.main(CommandLine.java:46)
the allure-results folder zips to 47mb so not sure how to send to you?
Do I need to raise this on an allure specific project instead of allure npm wrapper?
The text was updated successfully, but these errors were encountered: