Happy Business Starts Here

Re: Remove Zuora error on Salesforce unit tests

Remove Zuora error on Salesforce unit tests

Is there anyway to avoid the Zuora error in Salesforce unit tests that states "Please upload Zuora WSDL at first" without having to use the @isTest(SeeAllData=true) attribute? Salesforce best practices are to not use SeeAllData=true. Using SeeAllData has the potential to create other issues when testing which I'm trying to avoid.

To generate the error I simply need to attempt to create a dummy Zuora object within the context of a test

Zuora.zObject zCharge = new Zuora.zObject('RatePlanCharge');


Is there anything else I can do to prevent this error? "Please upload Zuora WSDL at first"

How does one avoid this bug if it's not really a bug but what looks like bad design?

25 Comments
Zuora Alumni

Hi @MaggieL let me check with internal teams and I will post an update here

 

Thank you

Zuora Alumni

Hi @MaggieL For your refererence , the internal Jira ticket to track this request is PE-3488.

I am still checking on the time frame of this being addressed and will update this thread 

 

Thank you

Senior Tutor

We really need this feature, because our tests are slow. We cannot use testSetup when seeAllTest = true.

Any updates from Zuora team?

Guru

What is the status of PE-3488?

 

I have heard from developers around the word on this one. Zuora must make the managed package easier to work with and coexist in our Salesforce Orgs.  I know I have reported numerous issues developers have difficulties with in the last 5 years - this is the biggest one new developers encounter.  Once they get further into customizations the others surface.

Newly Enrolled

It's generally considered a bad practice to use the seeAllData annotation in test classes unless its absolutely necessary since it is difficult to create deterministic unit tests this way (not to mention the overhead of having all the data in the org taken into account when running tests), you always depend on the data currently in the org.

 

In my opinion, it seems unbelievable that in 5+ years this has not been addressed.