function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Zoe HartZoe Hart 

Is it possible to upload a package without any unit tests?

I am doing some development in my company's Sandbox environment. My work is not yet complete. The IT team plans to refresh the Sandbox today and I don't want to lose my work. I thought I might create a package, allow the refresh, and then install the package back into the Sandbox. But this is my first custom Salesforce development and I have not yet put any unit tests into my custom class and so I cannot upload my package. 

Is there a way around the unit test coverage requirement? Is there a better way to back up and restore my work around the Sandbox refresh? 
Best Answer chosen by Zoe Hart
harsha__charsha__c
  1. Setup >> outbound changesets >> Create a new changeset and add all your components to it
  2. Navigate to workbench.developerforce.com (https://workbench.developerforce.com" target="_blank) >> Login with your sandbox credentials
  3. Choose Retrieve option under Migration tab
  4. provide the changeset name that you created in salesforce and click retrieve.
  5. Wait for the retrieve process to complete and download the zip file that it provides after the completion.
Have this zip file as a backup. once the sandbox refresh is complete. Use the workbench again(login with the same sandbox credentials) and choose "Deploy" option this under "Migration". Upload the zip file that you have and hit "deploy" .

Hope this helps. Mark this as an answer, if it answers your question. So, others can refer. 

-Harsha
 

All Answers

harsha__charsha__c
Prepare a package.xml/changeset >> Export the package from workbench >> Save the zip file that workbench provides as a result of retrieve operation.

This way you can save your work. Once the sandbox is refreshed deploy all your components into the same sandbox using workbench again. This would be a simple option to the package.

Hope this helps.

-Harsha
Zoe HartZoe Hart
Thanks. That sounds helpful but, probably because I am so new to Salesforce, I'm missing some context. Is "prepare a package.xml/changeset" something I can do through the Salesforce UI? If so, where in the Salesforce UI would I find that capability? Somewhere in Setup? If it's not in the Salesforce UI, then what tool do I need? 

Thanks for your patience! 
harsha__charsha__c
  1. Setup >> outbound changesets >> Create a new changeset and add all your components to it
  2. Navigate to workbench.developerforce.com (https://workbench.developerforce.com" target="_blank) >> Login with your sandbox credentials
  3. Choose Retrieve option under Migration tab
  4. provide the changeset name that you created in salesforce and click retrieve.
  5. Wait for the retrieve process to complete and download the zip file that it provides after the completion.
Have this zip file as a backup. once the sandbox refresh is complete. Use the workbench again(login with the same sandbox credentials) and choose "Deploy" option this under "Migration". Upload the zip file that you have and hit "deploy" .

Hope this helps. Mark this as an answer, if it answers your question. So, others can refer. 

-Harsha
 
This was selected as the best answer