Добрый день.
А планируется ещё поддержка прокси в cli? Судя по Add proxy support · Issue #3 · baev/allure-report-builder · GitHub, работы в этом направлении не ведутся.
Насколько я понимаю, allure доступ до внешней сети нужен для удовлетворения зависимостей (вывод сделан из попытки сгенерировать отчёт на машине, изначально имеющий прямой доступ, но после первого удачного отчёта, доступ был закрыт, и все следующие попытки были успешными). Есть ли возможность в ручную удовлетворить зависимости, необходимые allure-cli? allure-cli необходим для генерации отчёта в интеграции с pytest’ом.
Release Allure CLI 2.3 · baev/allure-cli-depricated · GitHub вот эта версия CLI должна поддерживать прокси.
На 2.3 воспроизвелось:
сгенерировал отчёт с помощью
py.test --alluredir=..\allure_xmls -s -q
Полученные xml попробовал скормить allure.bat
C:\allure-cli\bin>allure.bat version
2.3
C:\allure-cli\bin>allure.bat report generate --debug C:\Automation\allure_xmls
java.lang.NullPointerException
После этого дал машине прямой доступ и отчёт сгенерировался
C:\allure-cli\bin>allure.bat report generate --debug C:\Automation\allure_xmls
Successfully generated report to [C:\allure-cli\bin\allure_report].
Настройки прокси указаны в Internet Options машины. Возможно, я должен явно указать указать адрес в каком-нибудь конфиге или в консоли (HTTP_PROXY?), но я не понимаю, как это сделать.
Нужно положить файл settings.xml, как в примере Maven – Guide to using proxies в папку ~/.m2/, где ~ - домашний каталог пользователя.
Спасибо большое. Всё получилось.
Добрый день. А для TeamCity плагина поддержка прокси тоже реализуется с помощью settings.xml? Положив settings.xml на билдагенты, при генерации отчётов получил такую же ошибку, как у ТС:
[Allure report generation] ru.yandex.qatools.allure.report.AllureReportBuilderException:
org.eclipse.aether.collection.DependencyCollectionException: Failed to
read artifact descriptor for
ru.yandex.qatools.allure:allure-report-data:jar:1.3.9
at ru.yandex.qatools.allure.report.AllureReportBuilder.processResults(AllureReportBuilder.java:135)
at ru.yandex.qatools.allure.teamcity.AgentBuildEventsProvider.runnerFinished(AgentBuildEventsProvider.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:117)
at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:67)
at com.sun.proxy.$Proxy6.runnerFinished(Unknown Source)
at
jetbrains.buildServer.agent.impl.buildStages.runnerStages.finish.FireRunnerFinishedFStage.doFinishStage(FireRunnerFinishedFStage.java:29)
at jetbrains.buildServer.agent.impl.buildStages.RunnerFinishStagesExecutor.runFinishStage(RunnerFinishStagesExecutor.java:32)
at
jetbrains.buildServer.agent.impl.buildStages.RunnerFinishStagesExecutor.doBuildFinishStages(RunnerFinishStagesExecutor.java:23)
at
jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.safeCallFinishStages(RunnerContextExecutor.java:65)
at
jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.callRunnerStages(RunnerContextExecutor.java:56)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.StepExecutor.processNextStep(StepExecutor.java:25)
at
jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeRunnerStep(ForEachBuildRunnerStage.java:138)
at
jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.runStep(ForEachBuildRunnerStage.java:123)
at
jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeBuildRunners(ForEachBuildRunnerStage.java:83)
at
jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.doBuildStage(ForEachBuildRunnerStage.java:44)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)
at jetbrains.buildServer.agent.impl.BuildRunActionImpl.doStages(BuildRunActionImpl.java:70)
at jetbrains.buildServer.agent.impl.BuildRunActionImpl.runBuild(BuildRunActionImpl.java:50)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:266)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:51)
at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:231)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.eclipse.aether.collection.DependencyCollectionException:
Failed to read artifact descriptor for
ru.yandex.qatools.allure:allure-report-data:jar:1.3.9
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:208)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:316)
at ru.yandex.qatools.allure.report.utils.DependencyResolver.resolve(DependencyResolver.java:40)
at ru.yandex.qatools.allure.report.AllureReportBuilder.processResults(AllureReportBuilder.java:128)
... 29 more
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException:
Failed to read artifact descriptor for
ru.yandex.qatools.allure:allure-report-data:jar:1.3.9
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:329)
at
org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:202)
... 32 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException:
Could not transfer artifact
ru.yandex.qatools.allure:allure-report-data:pom:1.3.9 from/to
(http://repo1.maven.org/maven2/): Connect to repo1.maven.org:80 timed
out
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:314)
... 34 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could
not transfer artifact
ru.yandex.qatools.allure:allure-report-data:pom:1.3.9 from/to
(http://repo1.maven.org/maven2/): Connect to repo1.maven.org:80 timed
out
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 37 more
Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to repo1.maven.org:80 timed out
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:129)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:137)
at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:279)
at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:235)
at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:59)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
... 42 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127)
... 53 more
Судя по исключению он не смог достучаться до Maven Central. Проверьте, что порт не закрыт фаерволом.
Пытаюсь сгенерировать отчет локально (из командной строки) по xml файлам которые генерируют тесты из проекта AllureCSharpCommons.Tests (к примеру MultipleStepsTest или любой другой) получаю ошибку
c:_TFS Projects\allure-cli\bin>allure.bat report generate AllureResults
Error on line 196
XTDE0410: An attribute node (version) cannot be created after the children of
the containing element
at xsl:call-template name=“copy-all-without-namespace” (#192)
at xsl:apply-templates (#27)
processing /alr:allure-test-run/test-suites[1]/test-suite[1]/@version
at xsl:apply-templates (#197)
processing /alr:allure-test-run/test-suites[1]/test-suite[1]
at xsl:call-template name=“copy-all-without-namespace” (#192)
at xsl:apply-templates (#14)
processing /alr:allure-test-run/test-suites[1]
in built-in template rule
java.lang.reflect.InvocationTargetException
С чем это связано?
Второй вопрос, я правильно понимаю, что в C# адаптере не имплементированы обработки атрибутов (Description, Feature, Severity etc.) судя по коду адаптера он только ивенты NUnit-а ловит?
Третий вопрос: как помечать Steps для C#? Такого атрибута в AllureCSharpCommons я не нашел. Перед методом бросать Эвент что-ли?
Спасибо
Здравствуйте! Может кто нибудь сталкивался с этой ошибкой:
[Allure report generation] ru.yandex.qatools.allure.report.AllureReportBuilderException: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact ru.yandex.qatools.allure:allure-report-data:jar:2.0 in (Central Repository:)
at ru.yandex.qatools.allure.report.AllureReportBuilder.processResults(AllureReportBuilder.java:135)
at ru.yandex.qatools.allure.teamcity.AgentBuildEventsProvider.runnerFinished(AgentBuildEventsProvider.java:79)
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:117)
at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:67)
at com.sun.proxy.$Proxy6.runnerFinished(Unknown Source)
at jetbrains.buildServer.agent.impl.buildStages.runnerStages.finish.FireRunnerFinishedFStage.doFinishStage(FireRunnerFinishedFStage.java:29)
at jetbrains.buildServer.agent.impl.buildStages.RunnerFinishStagesExecutor.runFinishStage(RunnerFinishStagesExecutor.java:32)
at jetbrains.buildServer.agent.impl.buildStages.RunnerFinishStagesExecutor.doBuildFinishStages(RunnerFinishStagesExecutor.java:23)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.safeCallFinishStages(RunnerContextExecutor.java:65)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.callRunnerStages(RunnerContextExecutor.java:56)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.StepExecutor.processNextStep(StepExecutor.java:25)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeRunnerStep(ForEachBuildRunnerStage.java:138)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.runStep(ForEachBuildRunnerStage.java:123)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeBuildRunners(ForEachBuildRunnerStage.java:83)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.doBuildStage(ForEachBuildRunnerStage.java:44)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)
at jetbrains.buildServer.agent.impl.BuildRunActionImpl.doStages(BuildRunActionImpl.java:70)
at jetbrains.buildServer.agent.impl.BuildRunActionImpl.runBuild(BuildRunActionImpl.java:50)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:266)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:51)
at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:231)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact ru.yandex.qatools.allure:allure-report-data:jar:2.0 in (Central Repository:)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
at ru.yandex.qatools.allure.report.utils.DependencyResolver.resolve(DependencyResolver.java:42)
at ru.yandex.qatools.allure.report.AllureReportBuilder.processResults(AllureReportBuilder.java:128)
… 28 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact ru.yandex.qatools.allure:allure-report-data:jar:2.0 in (Central Repository:)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
… 30 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact ru.yandex.qatools.allure:allure-report-data:jar:2.0 in (Central Repository:)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
… 32 more