2

I have the following ant task:

<target name="deployUnpackagedCheckOnly">
  <sf:deploy username="${sf.username.prod}" password="${sf.password.prod}" 
        sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="600" 
        deployRoot="unpackaged" logType="Detail" checkOnly="true" 
        rollbackOnError="true" allowMissingFiles="true" pollWaitMillis="30000"  
        testLevel="RunSpecifiedTests">
    <runTest>SBQQ.QuoteDocumentTriggerTests</runTest>
  </sf:deploy>
</target>

Here I am trying to specify a test class from steelbrick managed package.

When I run this task, I see that salesforce is ignoring the namespace and trying to find a test class with that name and thus not executing the managed package test class I wanted:

Here is the screenshot showing where salesforce ignoring the namespace:

enter image description here

Below quote is from Force Migration tool guide that we can specify test classes from managed package:

The test class name can include a namespace prefix. Add a namespace prefix if your organization has a namespace defined or if the test class belongs to a managed package. For example, if the namespace is MyNamespace, specify the test class as MyNamespace.TestClass1.

What am I missing here?

bumped to the homepage by Community 2 days ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • are you adding namespace of your package or your own org namespace? – Himanshu Jun 10 '16 at 19:59
  • I am adding namespace of the package in which test class is there. Our org doesn't have namespace. – javanoob Jun 10 '16 at 20:00
  • there will be namesspaces for managed package components like objects, apex class etc. Make you you append it to the test class name – Anurag Jun 10 '16 at 21:15
0

It was a false alarm. Salesforce was indeed executing the test case from Managed Package even though in the screenshot it was not showing the namespace prefix.

I reached out to Steelbrick support and they mentioned that I should be executing a different test class as this one does not cover the trigger that I was trying to deploy. So I gave the correct test class name from managed package and I was able to deploy the trigger that I wanted to deploy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.