doppiomacchiatto / force-deploy-with-xml-report-task

Automatically exported from code.google.com/p/force-deploy-with-xml-report-task
0 stars 0 forks source link

No XML report from DeployWithXmlReportTask #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
>What steps will reproduce the problem?

Run ant task with DeployWithXmlReportTask

Eg:

<path id="antlib">
    <fileset dir="${ant.library.dir}"/>
</path>

<target name="deployAndTestAndReport">
    <taskdef
        name="sfdeploy"
        classname="com.claimvantage.force.ant.DeployWithXmlReportTask"
        classpathref="antlib"
        />

    <delete dir="test-report-xml" quiet="true"/>
    <sfdeploy
        username="${sf.username}"
        password="${sf.password}"
        serverurl="${sf.server}"
        deployRoot="src"
        runalltests="true"
        junitreportdir="test-report-xml"
        />
</target>

Tests are run with results shown in console output as with standard <sf:deploy>.

>What is the expected output? What do you see instead?

Expect to see junit report in the directory indicated by the 'junitreportdir' 
parameter.

Instead no reports are produced.

I'd also expect to see some additional 

>What version of the product are you using? On what operating system?

ant-deploy-with-xml-report-task-1.4.jar

>Please provide any additional information below.

Using Winter '14 Org. (with ant_salesforce_32.0.zip)
Ant version 1.9.4
OS: Windows 7

Original issue reported on code.google.com by paul.bac...@arcusglobal.com on 31 Dec 2014 at 3:17

GoogleCodeExporter commented 9 years ago
Taking a look now.

Original comment by keith.cl...@gmail.com on 5 Jan 2015 at 11:41

GoogleCodeExporter commented 9 years ago
I'm confused. I don't see any file changes.

Original comment by paul.bac...@arcusglobal.com on 5 Jan 2015 at 12:03

GoogleCodeExporter commented 9 years ago
A solution is to use the ant-salesforce.jar that's under this projects /lib/ 
directory.

As documented it looks like the API has changed so if you use the latest from 
(salesforce_ant_32.zip) salesforce it just silently fails.

Original comment by paul.bac...@arcusglobal.com on 5 Jan 2015 at 12:18

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yeah the ant-deploy-with-xml-report-task-1.4.jar code outputs the test results 
by replacing and then calling a method with this signature:

    public void handleResponse(MetadataConnection metadataConnection, AsyncResult response) throws ConnectionException

but the API 32 ant-salesforce.jar has changed the signature used in the call to 
this (so the above method is never called):

    public void handleResponse(MetadataConnection metadataConnection, SFDCMDAPIAntTask.StatusResult response) throws ConnectionException

Using an earlier version of ant-salesforce.jar is the easiest workaround.

Original comment by keith.cl...@gmail.com on 5 Jan 2015 at 12:45

GoogleCodeExporter commented 9 years ago

Original comment by keith.clarke.claimvantage@gmail.com on 5 Jan 2015 at 1:04

GoogleCodeExporter commented 9 years ago
That older version of the ant-salesforce.jar doesn't appear to support resuming 
a job by re-calling with the sf.asyncRequestId property populated. It just 
gives me a "Invalid id specified for sf.asyncRequestId".

Any ideas how to work around that? I do nightly runs of all our bulk-test 
cases, and I need to be able to retry if they time-out.

Original comment by dexter.d...@gmail.com on 8 Jan 2015 at 6:14

GoogleCodeExporter commented 9 years ago
The code change to work with the latest ant-salesforce.jar looks simple enough. 
I'll hopefully find the time to try it over the next few days.

Original comment by keith.clarke.claimvantage@gmail.com on 8 Jan 2015 at 6:38

GoogleCodeExporter commented 9 years ago
@keith, could you please provide idea which code change should be applied to 
recompile this jar for latest ant-salesforce.jar. Thanks in advance.

Original comment by natallia...@gmail.com on 2 Feb 2015 at 1:35

GoogleCodeExporter commented 9 years ago
Took a more careful look this morning and the code change is more awkward than 
I thought because SFDCMDAPIAntTask.StatusResult has package visibility set. 
That means that the task must be located in the same package so instead of the 
task being com.claimvantage.force.ant.DeployWithXmlReportTask it will have to 
be instead something like 
com.salesforce.ant.ClaimVantageDeployWithXmlReportTask and so a change will be 
needed to your build.xml files. (There is nothing in Java that stops you adding 
classes to packages that use someone else's name but it is relatively unusual.) 
I've tried it out and it works OK. Thoughts anyone?

Original comment by keith.clarke.claimvantage@gmail.com on 2 Feb 2015 at 1:41

GoogleCodeExporter commented 9 years ago
My build.xml is 95% handwritten anyways, so that sounds just fine to me.

Original comment by dexter.d...@gmail.com on 3 Feb 2015 at 3:02

GoogleCodeExporter commented 9 years ago
Any update on this issue? Would love to have a fix. Regressing my 
ant-salesforce to the older version (in this project's lib directory) gives me 
the error

"Failed to login: Unexpected element. Parser was expecting element 
urn:partner.soap.sforce.com:orgAttachmentFileSizeLimit' but found 
'urn:partner.soap.sforce.com:orgDefaultCurrencyIsoCode'"

Original comment by jer...@dashcord.com on 13 May 2015 at 6:47