При запуске связки Python + Selene + pytest + allure получаю ошибку ( Segmentation fault: 11
). Тесты проходят, создается директория alluredir, но при создании HTML репорта получаю ошибку Exception in thread “main” javax.xml.bind.DataBindingException: javax.xml.bind.UnmarshalException _ - with linked exception:_ [org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.] _ at javax.xml.bind.JAXB.unmarshal(JAXB.java:245)_ _ 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)_
…
Python 2.7.10
vadim:~ user$ py.test --version
This is pytest version 2.9.0, imported from /Library/Python/2.7/site-packages/pytest.pyc
setuptools registered plugins: pytest-allure-adaptor-1.7.6 at /Library/Python/2.7/site-packages/allure/pytest_plugin.pyc pytest-xvfb-0.3.0 at /Library/Python/2.7/site-packages/pytest_xvfb.pyc Selene 0.0.8
Первая ошибка возникает при генерации xml ( командой --alluredir “директория”) - в консоле
vadim:selen_EW user$ python -m pytest EW.py --alluredir rep
============================= test session starts ==============================
platform darwin – Python 2.7.10, pytest-2.9.0, py-1.4.31, pluggy-0.3.1
rootdir: /Users/user/Desktop/selen_EW, inifile:
plugins: allure-adaptor-1.7.6, xvfb-0.3.0
collected 2 items
EW.py …Segmentation fault: 11
Но репорт создается
При генерации (allure generate report) ошибка консоли Exception in thread “main” javax.xml.bind.DataBindingException: javax.xml.bind.UnmarshalException
_ - with linked exception:_ [org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.]
_ at javax.xml.bind.JAXB.unmarshal(JAXB.java:245)_
_ 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:57)_
_ at ru.yandex.qatools.allure.data.AllureReportGenerator.generate(AllureReportGenerator.java:53)_
_ at ru.yandex.qatools.allure.AllureMain.main(AllureMain.java:48)_ Caused by: javax.xml.bind.UnmarshalException
_ - with linked exception:_ [org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.]
_ at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)_
_ at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:563)_
_ at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:249)_
_ at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:221)_
_ at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:276)_
_ at javax.xml.bind.JAXB.unmarshal(JAXB.java:242)_
_ … 10 more_ Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.
_ at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)_
_ at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)_
_ at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)_
_ at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)_
_ at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)_
_ at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1014)_
_ at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)_
_ at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)_
_ at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)_
_ at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)_
_ at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)_
_ at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)_
_ at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)_
_ at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)_
_ at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:243)_
_ … 13 more_ 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)_ vadim:selen_EW user$ allure generate /Users/user/Desktop/selen_EW/rep -o /Users/user/Desktop/Allure_report Exception in thread “main” javax.xml.bind.DataBindingException: javax.xml.bind.UnmarshalException
_ - with linked exception:_ [org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.]
_ at javax.xml.bind.JAXB.unmarshal(JAXB.java:245)_
_ 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:57)_
_ at ru.yandex.qatools.allure.data.AllureReportGenerator.generate(AllureReportGenerator.java:53)_
_ at ru.yandex.qatools.allure.AllureMain.main(AllureMain.java:48)_ Caused by: javax.xml.bind.UnmarshalException
_ - with linked exception:_ [org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.]
_ at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)_
_ at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:563)_
_ at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:249)_
_ at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:221)_
_ at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:276)_
_ at javax.xml.bind.JAXB.unmarshal(JAXB.java:242)_
_ … 10 more_ Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.
_ at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)_
_ at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)_
_ at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)_
_ at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)_
_ at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)_
_ at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1014)_
_ at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)_
_ at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)_
_ at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)_
_ at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)_
_ at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)_
_ at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)_
_ at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)_
_ at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)_
_ at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:243)_
_ … 13 more_ 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)_
Предполагаю что XML-файл не правильно сгенерировался и после этого не может построить HTML репорт
ну уж прям не знаю, уже второй человек жалуется, что у него не получается создать репорт.
Прям придется сделать мини проект и написать стаью на http://automation-remarks.com/
пытался повторить не получается. у меня даже получилось сделать так чтобы отчет автоматически генерировался. На выходных напишу блог пост сюда http://automation-remarks.com/ о том, как настроить рабочий процесс с учетом первого и второго аллюра