You need to sign in to do that
Don't have an account?
GauravGathania
Urgent-Migrating Scontrols to Production
Hi,
I am trying to migrate a set of Scontrols and some custom fields from Qa/Dev/Sandbox to Production using salesforce Ant(Migration Tool).
I am able to retrieve the content from QA Environment successfully.But I am not able to deploy it to Production.
Deployment to Dev and Sandbox from QA is happening perfectly.
I am facing following run time error while I try the same steps for Production:
C:\salesforce_ant\sample>ant deployUnpackaged
Buildfile: build.xml
deployUnpackaged:
BUILD FAILED
C:\salesforce_ant\sample\build.xml:25: Failures:
Test failure, method: testClass.test -- System.DmlException: Update failed. Firs t exception on row 0 with id a0R400000005mpPEAQ; first error: ENTITY_IS_DELETED, entity is deleted stack Class.testClass.test: line 6, column 1
Code coverage issue, class: tocAgreementAfterUpdate -- Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required Code coverage issue, class: tocOportunityAfterUpdate -- Test coverage of selecte d Apex Trigger is 0%, at least 1% test coverage is required Code coverage issue, class: trmAccountBeforeUpdate -- Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required Code coverage issue -- Average test coverage across all Apex Classes and Trigger s is 0%, at least 75% test coverage is required
Message Edited by GauravGathania on 08-23-2008 12:51 AM
I am trying to migrate a set of Scontrols and some custom fields from Qa/Dev/Sandbox to Production using salesforce Ant(Migration Tool).
I am able to retrieve the content from QA Environment successfully.But I am not able to deploy it to Production.
Deployment to Dev and Sandbox from QA is happening perfectly.
I am facing following run time error while I try the same steps for Production:
C:\salesforce_ant\sample>ant deployUnpackaged
Buildfile: build.xml
deployUnpackaged:
BUILD FAILED
C:\salesforce_ant\sample\build.xml:25: Failures:
Test failure, method: testClass.test -- System.DmlException: Update failed. Firs t exception on row 0 with id a0R400000005mpPEAQ; first error: ENTITY_IS_DELETED, entity is deleted stack Class.testClass.test: line 6, column 1
Code coverage issue, class: tocAgreementAfterUpdate -- Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required Code coverage issue, class: tocOportunityAfterUpdate -- Test coverage of selecte d Apex Trigger is 0%, at least 1% test coverage is required Code coverage issue, class: trmAccountBeforeUpdate -- Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required Code coverage issue -- Average test coverage across all Apex Classes and Trigger s is 0%, at least 75% test coverage is required
Message Edited by GauravGathania on 08-23-2008 12:51 AM
Instead of using Salesforce IDs directly in your code, try to create the elements in memory for your test methods. This will allow you to use the same test methods across any version of your org (developer, sandbox, production) as long as the tested fields exist. Here are a few examples from the Apex docs:
I am not sure whether the user has created any such object previously.
This is so because we are using a common user with admin rights.
I just want to migrate my Scontrols and Formula-Fields and right now I don't have any classes or triggers to worry about.
Can using another user with Admin privileges will solve the issue?
I have not tried it as being a developer I want to avoid all R&D because its a Production Box.
Thanks for your prompt reply.
Then, I would suggest using the Force.com plugin for the Eclipse IDE if you are migrating SControls (or for any Force.com development). In my opinion, the ANT tool should be used only as a last resort when deploying Apex classes/triggers fails in the IDE.
Want to confirm something that is there any setting on Production that makes sure that Apex Test Classes are executed before any Scontrol or any other object upload ?
If you have fixed this problem can you please post the solution here?.I am facing a similar one.
Thanks
Rachna