Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Perl, PHP, Python & Ruby Development
- :
- Ruby Apex WSDL runTests()
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Ruby Apex WSDL runTests()
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-25-2012 10:12 PM
Hi,
I've been writing some Ruby code that utilizes wsdl2ruby and the Apex WSDL to run unit tests from ruby.
rtr = RunTestsRequest.new(:allTests => false, :classes => 'MyClassName') @sfApex.runTests(:runTestsRequest => rtr)
Code above is pretty simple, just attempting to run a single test class with a one small unit test.
Problem is that this takes way longer to execute than it should. This class executes in about 10 seconds in the browser but takes about half an hour to run as shown above from irb.
Anyone try to do something similar before?
Solved! Go to Solution.
Re: Ruby Apex WSDL runTests()
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-05-2012 05:20 PM
I still haven't been able to figure this out. Even on a test class without any unit tests, the request times out and locks up my org for half an hour with the "Org Administration Locked" error.
Other calls, such as compileClasses work properly. Can someone provide an example of the soap envelope used for the runTests call?
Re: Ruby Apex WSDL runTests()
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-05-2012 06:55 PM
Well I got things working. The makeup of the soap envelope was not the issue. For anyone interested, its what you would expect.
<runTests xmlns="http://soap.sforce.com/2006/08/apex"> <apex xmlns:ns2="http://soap.sforce.com/2006/08/apex" xsi:type="ns2:RunTestsRequest"> <allTests>true|false</allTests> <classes>MyClassName</classes> </apex> </runTests>
I guess ultimately runTests does not work for some reason or another when you generate ruby from the apex wsdl using the wsdl2ruby utility bundled with soap4r.

