首页 > 解决方案 > Salesforce 测试套件在 azure devops 发布管道中失败

问题描述

当我运行附加的个人 salesforce 测试套装图像 1时,我的 azure 发布管道运行良好。但是,当我将多个 Salesforce 测试套装组合到 azure 发布管道的“变量”部分下时,它会附加失败的图像 2

附上日志图像以供参考[注意-提到 XXX 是为了隐藏敏感项目)图像 3 附加。版本在 pom.xml 中明确提到,所以没有问题。对此高度赞赏的任何帮助。

根据 Dan 在评论部分的要求,在此处添加了日志。

2021-09-22T12:46:11.7887285Z Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
2021-09-22T12:46:11.7887560Z 
2021-09-22T12:46:11.8032623Z [INFO] ------------------------------------------------------------------------
2021-09-22T12:46:11.8033084Z [INFO] Reactor Summary:
2021-09-22T12:46:11.8033498Z [INFO] 
2021-09-22T12:46:11.8033912Z [INFO] xxxx.salesforce.regression 1.0 ..................... SUCCESS [  1.050 s]
2021-09-22T12:46:11.8041862Z [INFO] xxxx.regression.core 0.0.1-SNAPSHOT ................ SUCCESS [  1.425 s]
2021-09-22T12:46:11.8047350Z [INFO] xxxx.salesforce.regression.api 0.0.1-SNAPSHOT ...... SUCCESS [  6.110 s]
2021-09-22T12:46:11.8049728Z [INFO] xxxx.salesforce.regression.framework 0.0.1-SNAPSHOT  SUCCESS [ 17.345 s]
2021-09-22T12:46:11.8055798Z [INFO] xxxx.salesforce.regression.script 0.0.1-SNAPSHOT ... FAILURE [01:17 min]
2021-09-22T12:46:11.8060546Z [INFO] ------------------------------------------------------------------------
2021-09-22T12:46:11.8061249Z [INFO] BUILD FAILURE
2021-09-22T12:46:11.8068152Z [INFO] ------------------------------------------------------------------------
2021-09-22T12:46:11.8072043Z [INFO] Total time:  01:43 min
2021-09-22T12:46:11.8077042Z [INFO] Finished at: 2021-09-22T08:46:11-04:00
2021-09-22T12:46:11.8079514Z [INFO] ------------------------------------------------------------------------
2021-09-22T12:46:11.8121567Z [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project xxxx.salesforce.regression.script: 
                                    Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process
2021-09-22T12:46:11.8123247Z [ERROR] java.lang.RuntimeException: Unable to load category: RegressionBrokerCommunityCensusScripts
2021-09-22T12:46:11.8132417Z [ERROR]    at org.apache.maven.surefire.group.match.SingleGroupMatcher.loadGroupClasses(SingleGroupMatcher.java:139)
2021-09-22T12:46:11.8135200Z [ERROR]    at org.apache.maven.surefire.group.match.JoinGroupMatcher.loadGroupClasses(JoinGroupMatcher.java:49)
2021-09-22T12:46:11.8139427Z [ERROR]    at org.apache.maven.surefire.common.junit48.FilterFactory.createGroupFilter(FilterFactory.java:100)
2021-09-22T12:46:11.8144812Z [ERROR]    at org.apache.maven.surefire.junitcore.JUnitCoreProvider.createJUnit48Filter(JUnitCoreProvider.java:279)
2021-09-22T12:46:11.8169178Z [ERROR]    at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:130)
2021-09-22T12:46:11.8170407Z [ERROR]    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
2021-09-22T12:46:11.8171319Z [ERROR]    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
2021-09-22T12:46:11.8171999Z [ERROR]    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
2021-09-22T12:46:11.8176714Z [ERROR] Caused by: java.lang.ClassNotFoundException: RegressionBrokerCommunityCensusScripts
2021-09-22T12:46:11.8177403Z [ERROR]    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
2021-09-22T12:46:11.8191357Z [ERROR]    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
2021-09-22T12:46:11.8191846Z [ERROR]    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
2021-09-22T12:46:11.8210436Z [ERROR]    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
2021-09-22T12:46:11.8212191Z [ERROR]    at org.apache.maven.surefire.group.match.SingleGroupMatcher.loadGroupClasses(SingleGroupMatcher.java:135)
2021-09-22T12:46:11.8212992Z [ERROR]    ... 7 more
2021-09-22T12:46:11.8213257Z [ERROR] 
2021-09-22T12:46:11.8213629Z [ERROR] -> [Help 1]
2021-09-22T12:46:11.8214006Z [ERROR] 
2021-09-22T12:46:11.8214686Z [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
2021-09-22T12:46:11.8215594Z [ERROR] Re-run Maven using the -X switch to enable full debug logging.
2021-09-22T12:46:11.8216175Z [ERROR] 
2021-09-22T12:46:11.8218205Z [ERROR] For more information about the errors and possible solutions, please read the following articles:
2021-09-22T12:46:11.8219550Z [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
2021-09-22T12:46:11.8220244Z [ERROR] 
2021-09-22T12:46:11.8221416Z [ERROR] After correcting the problems, you can resume the build with the command
2021-09-22T12:46:11.8224889Z [ERROR]   mvn <args> -rf :xxxx.salesforce.regression.script
2021-09-22T12:46:12.1235561Z The process 'D:\Tools\apache-maven-3.6.3\bin\mvn.cmd' failed with exit code 1
2021-09-22T12:46:12.1239927Z Could not retrieve code analysis results - Maven run failed.
2021-09-22T12:46:13.8305598Z No test result files matching D:\agents\A5\_wk\r4\a\**\surefire-reports\TEST-*.xml were found, so publishing JUnit test results is being skipped.
2021-09-22T12:46:13.8351432Z ##[error]Build failed.

标签: azure-devopsautomated-testssalesforceazure-pipelinesazure-pipelines-release-pipeline

解决方案


推荐阅读