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?

3
  • are you adding namespace of your package or your own org namespace?
    – Himanshu
    Commented Jun 10, 2016 at 19:59
  • I am adding namespace of the package in which test class is there. Our org doesn't have namespace.
    – javanoob
    Commented Jun 10, 2016 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
    Commented Jun 10, 2016 at 21:15

1 Answer 1

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.

1
  • 1
    Might want to circle back and accept this answer.
    – Adrian Larson
    Commented Aug 13, 2022 at 19:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .