You need to sign in to do that
Don't have an account?
David Matusow
soapSforceCom200608Apex.Apex.RunTestsRequest
I'm using this interface and want to specify a "class" to test. While the command is successful, nothing shows as having been tested. I am specifying the class, but do I also need to specify the unique test? How do I format this specification?
After this call is made, I would get something like this in return.
Assuming you are getting this data back, can you please expand on what you mean by "nothing shows as being tested" Where are you looking to see what is "being tested"
USER_DEBUG [45]|DEBUG|RunTestsResult:[apexLogId=null, apexLogId_type_info=(apexLogId, http://soap.sforce.com/2006/08/apex, null, 0, 1, false), apex_schema_type_info=(http://soap.sforce.com/2006/08/apex, true, false), codeCoverage=null, codeCoverageWarnings=null, codeCoverageWarnings_type_info=(codeCoverageWarnings, http://soap.sforce.com/2006/08/apex, null, 0, -1, false), codeCoverage_type_info=(codeCoverage, http://soap.sforce.com/2006/08/apex, null, 0, -1, false), failures=null, failures_type_info=(failures, http://soap.sforce.com/2006/08/apex, null, 0, -1, false), field_order_type_info=(apexLogId, codeCoverage, codeCoverageWarnings, failures, numFailures, numTestsRun, successes, totalTime), numFailures=0, numFailures_type_info=(numFailures, http://soap.sforce.com/2006/08/apex, null, 1, 1, false), numTestsRun=0, numTestsRun_type_info=(numTestsRun, http://soap.sforce.com/2006/08/apex, null, 1, 1, false), successes=null, successes_type_info=(successes, http://soap.sforce.com/2006/08/apex, null, 0, -1, false), totalTime=0.0, totalTime_type_info=(totalTime, http://soap.sforce.com/2006/08/apex, null, 1, 1, false)]
I pull this apart with a series of debug msgs as:
USER_DEBUG [46]|DEBUG|failures 0
USER_DEBUG [47]|DEBUG|runs 0
USER_DEBUG [49]|DEBUG|log null
USER_DEBUG [50]|DEBUG|codeCoverage null
USER_DEBUG [51]|DEBUG|successes null
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<SessionHeader xmlns="http://soap.sforce.com/2006/08/apex">
<sessionId>sessionID</sessionId>
</SessionHeader>
</env:Header>
<env:Body>
<runTests xmlns="http://soap.sforce.com/2006/08/apex">
<RunTestsRequest>
<allTests>false</allTests>
<classes>ConsoleController</classes>
<namespace/>
</RunTestsRequest>
</runTests>
</env:Body>
</env:Envelope>
You can see that the result is not in xml form and that it shows all had failed.
An interest is for the test class, there are four or five tests defined. I tried using the class and assumed it would trigger all the tests, but maybe there's something more needed to define which of the tests. I then tried specifying a single test but (as I expected) this got no better an answer.
Thoughts???