You need to sign in to do that
Don't have an account?
3 Creeks
Test methods fail only when installing package
I am creating a managed package and having trouble when installing the managed packaged into a newly-minted org. Here is what is happening...
As you would expect, the managed package I am creating contains test methods. A couple of these test methods have the OnInstall=true designation so that the package install will fail if these test methods do not pass. As part of the data set up for the test methods, they create a couple Users in the User Object. All of the test methods pass in the dev org that the package is created in.
When I try to install the package in a new test org, the package install fails due to the Oninstall=true methods not passing. The message indicates a DML error on the User field digestFrequency. The message goes on to indicate that the field cannot be updated because the feature has not been enabled.
The feature it is refering to I am assuming is Chatter, which indeed has not been enabled in the test org. The test methods that create the users, do not reference digestFrequency or any other Chatter attribute that I can tell.
The odd thing is that Chatter is not enabled in the dev org that the package was created in either, but yet the tests pass there.
When I enable Chatter in the test org, the package installs without any issue.
Any help would be appreciated.
Thanks
As you would expect, the managed package I am creating contains test methods. A couple of these test methods have the OnInstall=true designation so that the package install will fail if these test methods do not pass. As part of the data set up for the test methods, they create a couple Users in the User Object. All of the test methods pass in the dev org that the package is created in.
When I try to install the package in a new test org, the package install fails due to the Oninstall=true methods not passing. The message indicates a DML error on the User field digestFrequency. The message goes on to indicate that the field cannot be updated because the feature has not been enabled.
The feature it is refering to I am assuming is Chatter, which indeed has not been enabled in the test org. The test methods that create the users, do not reference digestFrequency or any other Chatter attribute that I can tell.
The odd thing is that Chatter is not enabled in the dev org that the package was created in either, but yet the tests pass there.
When I enable Chatter in the test org, the package installs without any issue.
Any help would be appreciated.
Thanks
This is a known issue. Here is the link:
https://success.salesforce.com/issues_view?id=a1p300000008YXGAA2
Has to do with doing an insert and update on the user object within the same transaction in my test method.
Thanks
All Answers
Check out this post for more info: http://salesforce.stackexchange.com/questions/34253/managed-package-with-chatter-feeditem-on-env-where-chatter-is-disabled
This is a known issue. Here is the link:
https://success.salesforce.com/issues_view?id=a1p300000008YXGAA2
Has to do with doing an insert and update on the user object within the same transaction in my test method.
Thanks