持续集成 jenkins+jmeter 接口测试时,删除原来的脚本上传新脚本后,已删除的脚本扔参与测试,哪位可以帮忙??

金圣勋 · 2018年08月15日 · 1370 次阅读

我用 jenkins+jmeter+maven 搭建接口测试环境,测试脚本在 maven 项目里,jmx 文件。
maven 项目路径:/usr/jsx/apitest
测试脚本上传路径:/usr/jsx/apitest/src/test/jmeter
旧脚本:查询书籍.jmx
新脚本:查询书籍 1.jmx , 查询书籍 2.jmx,即旧脚本重命名为查询书籍 1,再上传查询书籍 2
等 jenkins 构建后发现以上 3 个脚本都参与测试并生成测试报告,请哪位可以帮忙分析?

jenkins 控制台日志:

由用户 jsx 启动
构建中 在工作空间 /var/lib/jenkins/workspace/接口测试_maven 中
Updating http://svn.91sph.com/svn/sph/server-service at revision '2018-08-15T17:26:39.567 +0800' --quiet
Using sole credentials build/****** in realm ‘http://svn.91sph.com:80 VisualSVN Server’
At revision 21852

Using sole credentials build/****** in realm ‘http://svn.91sph.com:80 VisualSVN Server’
No emails were triggered.
[接口测试_maven] $ /bin/sh -xe /tmp/jenkins3620995785132239360.sh

  • convmv -f gbk -t utf-8 -r --notest /usr/jsx/apitest/src Skipping, already UTF-8: /usr/jsx/apitest/src/test/jmeter/查询书籍 2.jmx Skipping, already UTF-8: /usr/jsx/apitest/src/test/jmeter/查询书籍 1.jmx Ready! Parsing POMs Established TCP socket on 10124 [apitest] $ /usr/jsx/jdk1.8.0_181/bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.12-alpha-1.jar:/usr/jsx/apache-maven-3.5.4/boot/plexus-classworlds-2.5.2.jar:/usr/jsx/apache-maven-3.5.4/conf/logging jenkins.maven3.agent.Maven35Main /usr/jsx/apache-maven-3.5.4 /var/cache/jenkins/war/WEB-INF/lib/remoting-3.23.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.12-alpha-1.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.12-alpha-1.jar 10124 <===[JENKINS REMOTING CAPACITY]===>channel started Executing Maven: -B -f /usr/jsx/apitest/pom.xml install [INFO] Scanning for projects... [INFO] [INFO] ----------------------------< jsx:apitest >----------------------------- [INFO] Building apitest 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ apitest --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /usr/jsx/apitest/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ apitest --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ apitest --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ apitest --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ apitest --- [INFO] Surefire report directory: /usr/jsx/apitest/target/surefire-reports

T E S T S

Running jsx.apitest.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[JENKINS] Recording test results
[WARNING] Attempt to (de-) serialize anonymous class hudson.maven.reporters.SurefireArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-) serialize anonymous class hudson.maven.reporters.BuildInfoRecorder$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ apitest ---
[INFO]
[INFO] >>> jmeter-maven-plugin:2.1.0:jmeter (jmeter-tests) > :configure @ apitest >>>
[INFO]
[INFO] --- jmeter-maven-plugin:2.1.0:configure (configure) @ apitest ---
[INFO] -------------------------------------------------------
[INFO] Configuring JMeter...
[INFO] -------------------------------------------------------
[INFO]
[INFO] <<< jmeter-maven-plugin:2.1.0:jmeter (jmeter-tests) < :configure @ apitest <<<
[INFO]
[INFO]
[INFO] --- jmeter-maven-plugin:2.1.0:jmeter (jmeter-tests) @ apitest ---
[INFO]

[INFO] -------------------------------------------------------
[INFO] P E R F O R M A N C E T E S T S
[INFO] -------------------------------------------------------
[INFO] Invalid value detected for . Setting pause to 0...
[INFO]

[INFO]

[INFO] Executing test: 查询书籍.jmx
[INFO] Writing log file to: /usr/jsx/apitest/target/jmeter/logs/查询书籍.jmx.log
[INFO] Creating summariser


[INFO] Created the tree successfully using /usr/jsx/apitest/target/jmeter/testFiles/查询书籍.jmx
[INFO] Starting the test @ Wed Aug 15 17:28:18 CST 2018 (1534325298704)
[INFO] Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
[INFO] summary = 3 in 00:00:01 = 2.3/s Avg: 384 Min: 31 Max: 612 Err: 2 (66.67%)
[INFO] Tidying up ... @ Wed Aug 15 17:28:20 CST 2018 (1534325300077)
[INFO] ... end of run
[INFO] Completed Test: 查询书籍.jmx
[INFO]

[INFO] Executing test: 查询书籍 1.jmx
[INFO] Writing log file to: /usr/jsx/apitest/target/jmeter/logs/查询书籍 1.jmx.log
[INFO] Creating summariser
[INFO] Created the tree successfully using /usr/jsx/apitest/target/jmeter/testFiles/查询书籍 1.jmx
[INFO] Starting the test @ Wed Aug 15 17:28:20 CST 2018 (1534325300924)
[INFO] Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
[INFO] summary = 3 in 00:00:01 = 4.0/s Avg: 207 Min: 31 Max: 554 Err: 2 (66.67%)
[INFO] Tidying up ... @ Wed Aug 15 17:28:21 CST 2018 (1534325301757)
[INFO] ... end of run
[INFO] Completed Test: 查询书籍 1.jmx
[INFO]

[INFO] Executing test: 查询书籍 2.jmx
[INFO] Writing log file to: /usr/jsx/apitest/target/jmeter/logs/查询书籍 2.jmx.log
[INFO] Creating summariser
[INFO] Created the tree successfully using /usr/jsx/apitest/target/jmeter/testFiles/查询书籍 2.jmx
[INFO] Starting the test @ Wed Aug 15 17:28:22 CST 2018 (1534325302625)
[INFO] Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
[INFO] summary = 3 in 00:00:01 = 3.8/s Avg: 219 Min: 32 Max: 571 Err: 2 (66.67%)
[INFO] Tidying up ... @ Wed Aug 15 17:28:23 CST 2018 (1534325303513)
[INFO] ... end of run
[INFO] Completed Test: 查询书籍 2.jmx
[INFO]
[INFO] --- xml-maven-plugin:1.0-beta-3:transform (default) @ apitest ---
Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
[INFO] Transforming file: /usr/jsx/apitest/target/jmeter/results/20180815-查询书籍 2.jtl
[INFO] Transforming file: /usr/jsx/apitest/target/jmeter/results/20180815-查询书籍.jtl
[INFO] Transforming file: /usr/jsx/apitest/target/jmeter/results/20180815-查询书籍 1.jtl
[INFO] Transformed 3 file(s).
Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
[INFO] Transforming file: /usr/jsx/apitest/target/jmeter/results/20180815-查询书籍 2.jtl
[INFO] Transforming file: /usr/jsx/apitest/target/jmeter/results/20180815-查询书籍.jtl
[INFO] Transforming file: /usr/jsx/apitest/target/jmeter/results/20180815-查询书籍 1.jtl
[INFO] Transformed 3 file(s).
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ apitest ---
[INFO] Installing /usr/jsx/apitest/target/apitest-0.0.1-SNAPSHOT.jar to /var/lib/jenkins/.m2/repository/jsx/apitest/0.0.1-SNAPSHOT/apitest-0.0.1-SNAPSHOT.jar
[INFO] Installing /usr/jsx/apitest/pom.xml to /var/lib/jenkins/.m2/repository/jsx/apitest/0.0.1-SNAPSHOT/apitest-0.0.1-SNAPSHOT.pom
[WARNING] Attempt to (de-) serialize anonymous class hudson.maven.reporters.MavenArtifactArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-) serialize anonymous class hudson.maven.reporters.MavenFingerprinter$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.654 s
[INFO] Finished at: 2018-08-15T17:28:25+08:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /usr/jsx/apitest/pom.xml to jsx/apitest/0.0.1-SNAPSHOT/apitest-0.0.1-SNAPSHOT.pom
[JENKINS] Archiving /usr/jsx/apitest/target/apitest-0.0.1-SNAPSHOT.jar to jsx/apitest/0.0.1-SNAPSHOT/apitest-0.0.1-SNAPSHOT.jar
/usr/jsx/apitest/pom.xml is not inside /var/lib/jenkins/workspace/接口测试_maven/usr/jsx/apitest/; will archive in a separate pass
/usr/jsx/apitest/target/apitest-0.0.1-SNAPSHOT.jar is not inside /var/lib/jenkins/workspace/接口测试_maven/usr/jsx/apitest/; will archive in a separate pass
channel stopped
[INFO] Shutdown detected, destroying JMeter process...
[INFO] Shutdown detected, destroying JMeter process...
[INFO] Shutdown detected, destroying JMeter process...
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at PROJECT level /usr/jsx/apitest/target/jmeter/html to /var/lib/jenkins/jobs/接口测试_maven/htmlreports/_e7bb9f_e8aea1_e68aa5_e5918a1
[htmlpublisher] Archiving at PROJECT level /usr/jsx/apitest/target/jmeter/html1 to /var/lib/jenkins/jobs/接口测试_maven/htmlreports/_e8afa6_e7bb86_e68aa5_e5918a1
[htmlpublisher] Archiving at PROJECT level /usr/jsx/apitest/target/jmeter/html to /var/lib/jenkins/jobs/接口测试_maven/htmlreports/_e7bb9f_e8aea1_e68aa5_e5918a2
[htmlpublisher] Archiving at PROJECT level /usr/jsx/apitest/target/jmeter/html1 to /var/lib/jenkins/jobs/接口测试_maven/htmlreports/_e8afa6_e7bb86_e68aa5_e5918a2
Email was triggered for: Success
Sending email for trigger: Success
Sending email to: jinshengxun@91sph.com
Finished: SUCCESS

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册