Jenkins Cucumber 报告插件错误

Jenkins Cucumber 报告插件错误

我在 Ubuntu 20.04 上安装了 Jenkins 2.277。然后我安装了 Cucumber 报告插件 5.5。配置如图所示。当我运行测试时,控制台日志中出现错误:错误:构建步骤失败,出现异常 Java.lang.IllegalStateException

以下是整个控制台日志:

Started by user Vladi Camo
Running as SYSTEM
Building in workspace /home/vlado/selenium-tests/cucumber.tatrytec.eu
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Done
[cucumber.tatrytec.eu] $ mvn clean compile test surefire-report:report-only -B -PfastTestCategory -DBUILD_URL=https://selenide.tatrytec.eu/job/cucumber.tatrytec.eu/27/
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------< org.example:tatrytec.eu >-----------------------
[INFO] Building tatrytec.eu 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ tatrytec.eu ---
[INFO] Deleting /home/vlado/selenium-tests/cucumber.tatrytec.eu/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ tatrytec.eu ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/vlado/selenium-tests/cucumber.tatrytec.eu/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ tatrytec.eu ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ tatrytec.eu ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/vlado/selenium-tests/cucumber.tatrytec.eu/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ tatrytec.eu ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ tatrytec.eu ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ tatrytec.eu ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 20 source files to /home/vlado/selenium-tests/cucumber.tatrytec.eu/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ tatrytec.eu ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running runners.FastRunner

@homepage @maximize
Scenario: Check main elements on homepage [90m# src/test/features/Homepage.feature:7[0m
[main] INFO com.codeborne.selenide.impl.WebDriverThreadLocalContainer - No webdriver is bound to current thread: 1 - let's create a new webdriver
Mar 18, 2021 11:15:12 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
[main] INFO com.codeborne.selenide.webdriver.WebDriverFactory - BrowserName=chrome Version=89.0.4389.90 Platform=LINUX
[main] INFO com.codeborne.selenide.webdriver.WebDriverFactory - Selenide v. 5.19.0
[main] INFO com.codeborne.selenide.webdriver.WebDriverFactory - Selenium WebDriver v. 3.141.59 build time: 2018-11-14T08:17:03
[main] INFO com.codeborne.selenide.drivercommands.CreateDriverCommand - Create webdriver in current thread 1: RemoteWebDriver -> RemoteWebDriver: chrome on LINUX (96696def75c74be37d6b55b8a69a17ed)
  [32mGiven [0m[32mOpen homepage to test elements[0m    [90m# steps.HomepageSteps.openHomepage()[0m
  [32mAnd [0m[32mCheck header[0m                        [90m# steps.HomepageSteps.checkHeader()[0m
  [32mAnd [0m[32mCheck side menu[0m                     [90m# steps.HomepageSteps.checkSideMenu()[0m
  [32mAnd [0m[32mCheck articles count[0m                [90m# steps.HomepageSteps.checkArticlesCount()[0m
  [32mAnd [0m[32mCheck paginator[0m                     [90m# steps.HomepageSteps.checkPaginator()[0m

@test
Scenario: Test cucumber [90m# src/test/features/Test.feature:7[0m
[main] INFO com.codeborne.selenide.impl.WebDriverThreadLocalContainer - Webdriver has been closed meanwhile. Let's re-create it.
[main] INFO com.codeborne.selenide.drivercommands.CloseDriverCommand - Close webdriver: 1 -> RemoteWebDriver: chrome on LINUX (null)...
[main] INFO com.codeborne.selenide.drivercommands.CloseDriverCommand - Closed webdriver 1 in 0 ms
Mar 18, 2021 11:15:19 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
[main] INFO com.codeborne.selenide.webdriver.BrowserResizer - Set browser size to 1366x768
[main] INFO com.codeborne.selenide.webdriver.WebDriverFactory - BrowserName=chrome Version=89.0.4389.90 Platform=LINUX
[main] INFO com.codeborne.selenide.webdriver.WebDriverFactory - Selenide v. 5.19.0
[main] INFO com.codeborne.selenide.webdriver.WebDriverFactory - Selenium WebDriver v. 3.141.59 build time: 2018-11-14T08:17:03
[main] INFO com.codeborne.selenide.drivercommands.CreateDriverCommand - Create webdriver in current thread 1: RemoteWebDriver -> RemoteWebDriver: chrome on LINUX (96570323d65d081e19a60bc0f0432b1b)
Test
  [32mWhen [0m[32mTest[0m             [90m# steps.test.TestSteps.test()[0m
Test
  [32mThen [0m[32mPrint test[0m       [90m# steps.test.TestSteps.printTest()[0m
[32m[1m┌───────────────────────────────────────────────────────────────────────────────────┐[0m
[32m[1m│[0m Share your Cucumber Report with your team at [36m[1m[4mhttps://reports.cucumber.io[0m          [32m[1m│[0m
[32m[1m│[0m Activate publishing with one of the following:                                    [32m[1m│[0m
[32m[1m│[0m                                                                                   [32m[1m│[0m
[32m[1m│[0m src/test/resources/cucumber.properties:          [36mcucumber.publish.enabled[0m=[36mtrue[0m    [32m[1m│[0m
[32m[1m│[0m src/test/resources/junit-platform.properties:    [36mcucumber.publish.enabled[0m=[36mtrue[0m    [32m[1m│[0m
[32m[1m│[0m Environment variable:                            [36mCUCUMBER_PUBLISH_ENABLED[0m=[36mtrue[0m    [32m[1m│[0m
[32m[1m│[0m JUnit:                                           [36m@CucumberOptions[0m(publish = [36mtrue[0m) [32m[1m│[0m
[32m[1m│[0m                                                                                   [32m[1m│[0m
[32m[1m│[0m More information at [36mhttps://reports.cucumber.io/docs/cucumber-jvm[0m                 [32m[1m│[0m
[32m[1m│[0m                                                                                   [32m[1m│[0m
[32m[1m│[0m Disable this message with one of the following:                                   [32m[1m│[0m
[32m[1m│[0m                                                                                   [32m[1m│[0m
[32m[1m│[0m src/test/resources/cucumber.properties:          [36mcucumber.publish.quiet[0m=[36mtrue[0m      [32m[1m│[0m
[32m[1m│[0m src/test/resources/junit-platform.properties:    [36mcucumber.publish.quiet[0m=[36mtrue[0m      [32m[1m│[0m
[32m[1m└───────────────────────────────────────────────────────────────────────────────────┘[0m
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.039 s - in runners.FastRunner
[Thread-3] INFO com.codeborne.selenide.drivercommands.CloseDriverCommand - Close webdriver: 23 -> RemoteWebDriver: chrome on LINUX (null)...
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- maven-surefire-report-plugin:3.0.0-M5:report-only (default-cli) @ tatrytec.eu ---
[WARNING] Unable to locate Test Source XRef to link to - DISABLED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  16.571 s
[INFO] Finished at: 2021-03-18T11:15:21+01:00
[INFO] ------------------------------------------------------------------------
[CucumberReport] Using Cucumber Reports version 5.5.0
ERROR: Build step failed with exception
java.lang.IllegalStateException
    at org.objectweb.asm.tree.analysis.BasicInterpreter.<init>(BasicInterpreter.java:66)
    at org.parboiled.transform.RuleMethodInterpreter.<init>(RuleMethodInterpreter.java:42)
    at org.parboiled.transform.InstructionGraphCreator.process(InstructionGraphCreator.java:41)
    at org.parboiled.transform.ParserTransformer.runMethodTransformers(ParserTransformer.java:62)
    at org.parboiled.transform.ParserTransformer.extendParserClass(ParserTransformer.java:45)
    at org.parboiled.transform.ParserTransformer.transformParser(ParserTransformer.java:39)
    at org.parboiled.Parboiled.createParser(Parboiled.java:54)
Caused: java.lang.RuntimeException: Error creating extended parser class: null
    at org.parboiled.Parboiled.createParser(Parboiled.java:58)
    at org.jenkinsci.plugins.tokenmacro.Parser.process(Parser.java:80)
    at org.jenkinsci.plugins.tokenmacro.Parser.process(Parser.java:74)
    at org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:199)
    at org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:237)
    at org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:207)
    at net.masterthought.jenkins.CucumberReportPublisher.evaluateMacro(CucumberReportPublisher.java:607)
    at net.masterthought.jenkins.CucumberReportPublisher.generateReport(CucumberReportPublisher.java:398)
    at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:369)
    at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:752)
    at hudson.model.Build$BuildExecution.post2(Build.java:177)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:697)
    at hudson.model.Run.execute(Run.java:1932)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
Build step 'Cucumber reports' marked build as failure
Performing Post build task...
Match found for :.* : True
Logical operation result is TRUE
Running script  : /home/vlado/selenium-tests/cucumber.tatrytec.eu/delete-test-data.sh
[cucumber.tatrytec.eu] $ /bin/sh -xe /tmp/jenkins5711216159575252653.sh
+ /home/vlado/selenium-tests/cucumber.tatrytec.eu/delete-test-data.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
POST BUILD TASK : SUCCESS
END OF POST BUILD TASK : 0
Recording test results
[Checks API] No suitable checks publisher found.
Sending e-mails to: [email protected]
Finished: FAILURE

以下是插件设置截图:

在此处输入图片描述

我不知道那里发生了什么,但我没有看到任何 Cucumber 报告,只有标准的 Jenkins 报告。我将感谢任何帮助。

相关内容