Создает ли Salesforce ant html отчет для testLevel = "RunLocalTests"? - PullRequest
0 голосов
/ 05 марта 2020

Есть ли какой-нибудь способ, которым мы можем сгенерировать отчеты о продажах для сотрудников отдела продаж html, используя инструмент миграции ANT?

Ссылка: https://github.com/beamso/force-deploy-with-xml-report-task

Я попытался добавить junitreportdir в testLevel = "RunLocalTests", но появляется неподдерживаемая ошибка, как показано ниже:

** [root@ip-10-1-1-15 unit_test] # ant ValidateRunAllTestsReport

Файл сборки: /opt/salesforce/ANT_Migration_Tool/unit_test/build.xml ValidateRunAllTestsReport: BUILD FAILED /opt/salesforce/ANT_Migration_Tool/unit_test/build.xml:33: sf: deploy не поддерживает атрибут «junitreportdir» Общее время: 2 секунды **

ниже моя полная сборка. xml

<project name="Sample usage of Salesforce Ant tasks" default="test" basedir="." xmlns:sf="antlib:com.salesforce">

<property file="build.properties"/>
<property environment="env"/>

<!-- Setting default value for username, password and session id properties to empty string 
     so unset values are treated as empty. Without this, ant expressions such as ${sf.username}
     will be treated literally.
-->
<condition property="sf.username" value=""> <not> <isset property="sf.username"/> </not> </condition>
<condition property="sf.password" value=""> <not> <isset property="sf.password"/> </not> </condition>
<condition property="sf.sessionId" value=""> <not> <isset property="sf.sessionId"/> </not> </condition>

<taskdef resource="com/salesforce/antlib.xml" uri="antlib:com.salesforce">
    <classpath>
        <pathelement location="../ant-salesforce.jar" />            
    </classpath>
</taskdef>
<!-- Shows check only; never actually saves to the server -->
<target name="ValidateRunAllTests">
    <sf:deploy username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" deployRoot="${sf.srcFolder}" checkOnly="true" testLevel="RunLocalTests"/>
</target>
<path id="ant.additions.classpath">
    <fileset dir="/opt/salesforce/ANT/apache-ant-1.10.7"/>
</path>
<target name="ValidateRunAllTestsReport">
    <taskdef
                name="sfdeploy"
                classname="com.salesforce.ant.DeployWithXmlReportTask"
                classpathref="ant.additions.classpath"
                />
    <delete dir="test-report-xml" quiet="true"/>
    <sf:deploy username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" deployRoot="${sf.srcFolder}" checkOnly="true" testLevel="RunLocalTests" junitreportdir="test-report-xml"/>
</target>   

...