-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Coverage Error deploying CampaignMember Trigger (in production) #74
Comments
So sorry for not getting back sooner, lead up to Dreamforce has been crazy! So i "think" this is related to 54 as you say, i need to add some code coverage reporting handling here. The reason it deploys in Sandbox is code coverage is not enforced in Sandbox during deployment. The test code must successfully insert a record to get coverage, as you can see it doesn't set any field values on CampaignMember so i'm thinking that might be the reason, i'll do some testing myself. In the meantime, you might want to try enabling the Debug Logs when you do the deploy to see if you can see if any error is being thrown by the test. |
I've done some testing and the DLRS trigger is being executed even when an empty CampaignMember is being inserted, i think what i will do is add the code coverage reporting code anyway, and include that in the next release, then you can try again. Let me know if you see anything from the debug logs in the meantime. |
Also can you check the number of Triggers you have on CampaignMember please? |
I've just uploaded v1.11 (not updated main page yet) and have to go to catch a flight, but wanted to pass it on here for you to try, see what additional information this might give us now that I've added some extra reporting in. |
We hit a similar problem with two other triggers : dlrs_pse_Timecard_HeaderTrigger and dlrs_pse_AssignmentTrigger. Running the Apex tests in our live environment showed that they were 100% covered, but when trying to deploy, we were told that both of these had 0% code coverage. We ended up just writing our own test code to make sure each trigger was covered, and this allowed us to deploy. We had to do this as a deployment was needed quite urgently, but now we've managed to deploy the code I'll be interested to see what the actual issue may have been. |
Thanks @csSimonMolloy, when you say "We ended up just writing our own test code to make sure each trigger was covered", how did this differ from the auto generated test code, can you elaborate? I'm also, thinking this is some kind of Winter'15 release issue, given the timing of other reports today and last week. |
Thanks for continuing to dig into this Andrew. I went ahead and installed v1.11, and did get the deploy page to show the coverage error, but no new information. See screenshot below. There is one existing trigger on the campaign member, which comes bundled with the non profit starter pack. Not sure if you're familiar with that code, but it is posted on github: If you think that's the conflict, there is a custom setting that allows me to toggle that trigger off. I could toggle it off, and try deploying the dlrs trigger. (I might need to check the documentation on the npsp trigger - I don't think toggling it on and off will be too much of a problem, but I'm not sure.) |
Hi Andrew, That's the strange thing. Even though the test classes for the two triggers that were reporting 0% coverage are there, we were still getting the 0% coverage problem on those two triggers. Simon |
Most odd indeed. I did get two others folks ask me during this week about this type of issue, but none since. Makes me wonder if it was a platform glitch? BTW, one thing i should probably promote more is the Developer API for the tool, if you have your own triggers, you can call a method on the RollupService and avoid the extract triggers. |
Hi Andrew,
I am attempting to create a rollup summary between the CampaignMember and Contact objects. When I use the Manage Child Button to create the trigger/test class, I do not receive an error, but the trigger/test class are not created.
If I go to deployment status I see that there is a code coverage error on deploying the trigger:
I have successfully been able to deploy triggers using the manage child button for other relationships (various child objects of contact), so it seems like this is something specific to the CampaignMember/contact relationship. However, I tested deploying the same trigger in my sandbox, and was successful. (This sandbox was just refreshed, so it has the same apex code/fields/validations as my production). All of my own namespace tests are passing without a problem in both production and sandbox. Any ideas about what is going wrong?
Some stuff I've tried:
I am puzzled by why this would only occur on this one object and only in production. The only thing that I can think of is that this was the first trigger that I attempted to deploy using the Manage Child Button in production. When I first did that, I did find that I had an apex test in production that needed to be updated. I fixed that (in both production and sandbox), and that test is now running without a problem.
Seems like this could be related to #54 or #7, but I wasn't sure.
Thank you for making a truly awesome tool!
The text was updated successfully, but these errors were encountered: