Я пытаюсь использовать плагин освещения jmeter maven для автоматического анализа отчетов, однако получаю сбой сборки. Освещение позволяет интегрировать CI / CD с jmeter.
Мне удалось настроить демонстрационный проект освещения, однако, когда я сделаю это для своего проекта, это приведет к сбою сборки.Ниже приведена ошибка:
[ERROR] Failed to execute goal uk.co.automatictester:jmeter-
lightning-maven-plugin:1.2.0:lightning (default) on project
jmeter-lightning-maven-plugin-example: MojoExecutionException
-> [Help 1]
Однако проверка журнала консоли показывает, что правила были применены, и был сгенерирован вывод, однако он возвратил результат на основе критериев, указанных в файле конфигурации lighting.xml.
[DEBUG] (f) jmeterCsv =
C:\Projects\lightingMaven\target\jmeter\results\TestPerformance.csv
[DEBUG] (f) mode = verify
[DEBUG] (f) testSetXml =
C:\Projects\lightingMaven\src\test\resources\lightning.xml
[DEBUG] -- end configuration --
[DEBUG] Reading CSV file - start
[DEBUG] Reading CSV file - finish, read 1602 rows, took 63ms
[INFO] Test name: Test #1
[INFO] Test type: avgRespTimeTest
[INFO] Test description: Verify maximum response times
[INFO] Transaction name: getPursesRequest
[INFO] Expected result: Average response time <= 2000
[INFO] Actual result: Average response time = 1742
[INFO] Transaction count: 600
[INFO] Longest transactions: [24095, 23707, 22891, 18723, 16717]
[INFO] Test result: Pass
[INFO]
[INFO] Test name: Test #5
[INFO] Test type: passedTransactionsTest
[INFO] Test description: Verify number of passed tests
[INFO] Transaction name: getPursesRequest
[INFO] Expected result: Percent of failed transactions <= 50
[INFO] Actual result: Percent of failed transactions = 1
[INFO] Transaction count: 600
[INFO] Test result: Pass
[INFO]
[INFO] Test name: Test #4
[INFO] Test type: nthPercRespTimeTest
[INFO] Test description: Verify 90th percentile
[INFO] Transaction name: getPursesRequest
[INFO] Expected result: 90th percentile of transactions have
response time <= 8000
[INFO] Actual result: 90th percentile of transactions have
response time = 2218
[INFO] Transaction count: 600
[INFO] Longest transactions: [24095, 23707, 22891, 18723, 16717]
[INFO] Test result: Pass
[INFO]
[INFO] Test name: Test #3
[INFO] Test type: throughputTest
[INFO] Test description: Verify throughput
[INFO] Transaction name: getPursesRequest
[INFO] Expected result: Throughput >= 0.1 / second
[INFO] Actual result: Throughput = 2 / second
[INFO] Transaction count: 600
[ INFO] Test result: Pass
[INFO]
[INFO] Test name: Test #2
[INFO] Test type: maxRespTimeTest
[INFO] Test description: Verify maximum resp times
[INFO] Transaction name: getPursesRequest
[INFO] Expected result: Max response time <= 10000
[INFO] Actual result: Max response time = 24095
[INFO] Transaction count: 600
[INFO] Longest transactions: [24095, 23707, 22891, 18723, 16717]
[INFO] Test result: FAIL
[INFO]
[INFO] ============= EXECUTION SUMMARY =============
[INFO] Tests executed: 5
[INFO] Tests passed: 4
[INFO] Tests failed: 1
[INFO] Tests errors: 0
[INFO] Test set status: FAIL
[INFO] Execution time: 373ms
[INFO] ##teamcity[buildStatisticValue key='Test #1' value='1742']
[INFO] ##teamcity[buildStatisticValue key='Test #5' value='1']
[INFO] ##teamcity[buildStatisticValue key='Test #4' value='2218']
[INFO] ##teamcity[buildStatisticValue key='Test #3' value='2']
[INFO] ##teamcity[buildStatisticValue key='Test #2' value='24095']
[INFO] ------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] -------------------------------------------------------------------
[INFO] Total time: 05:21 min
[INFO] Finished at: 2018-06-03T16:27:18+01:00
[INFO] Final Memory: 18M/190M
[INFO] -------------------------------------------------------------------
Ниже приведен файл конфигурации xml освещения:
<testSet>
<avgRespTimeTest>
<testName>Test #1</testName>
<description>Verify maximum response times</description>
<transactionName>getPursesRequest</transactionName>
<maxAvgRespTime>2000</maxAvgRespTime>
</avgRespTimeTest>
<maxRespTimeTest>
<testName>Test #2</testName>
<description>Verify maximum resp times</description>
<transactionName>getPursesRequest</transactionName>
<regexp/>
<maxAllowedRespTime>10000</maxAllowedRespTime>
</maxRespTimeTest>
<throughputTest>
<testName>Test #3</testName>
<description>Verify throughput</description>
<transactionName>getPursesRequest</transactionName>
<regexp/>
<minThroughput>0.1</minThroughput>
</throughputTest>
<nthPercRespTimeTest>
<testName>Test #4</testName>
<description>Verify 90th percentile</description>
<transactionName>getPursesRequest</transactionName>
<regexp/>
<percentile>90</percentile>
<maxRespTime>8000</maxRespTime>
</nthPercRespTimeTest>
<passedTransactionsTest>
<testName>Test #5</testName>
<description>Verify number of passed tests</description>
<transactionName>getPursesRequest</transactionName>
<regexp/>
<allowedPercentOfFailedTransactions>50</allowedPercentOfFailedTransactions>
</passedTransactionsTest>
</testSet>