apex开发指导--创建沙盒环境

创建沙盒环境

学习目的:
1,salesforce有几个环境
2,为什么要这些环境
3,怎么制造环境

salesforce有几个环境

Production org—生产环境是真实用户直接访问和使用的环境,不能直接在里面修改代码
Developer org—开发环境用于开发人员的开发和简单的测试
Sandbox org—沙盒环境用于模拟生产环境去做上线前的测试,一般也叫UAT环境

为什么要这些环境

1,生产环境一般会由公司的IT部门或者管理员掌控,不会给服务方开放,这是因为上面的数据都是真实数据,有机密性。生产环境的使用对象是真实用户,所以上面部署的代码和做的config都是最严格,正确的
2,开发环境是为了给开发人员提供一个开发需要的简单基础数据。开发过程是一个试错过程,所以这个环境不会对外开放,都是IT或者系统管理人会使用
3,沙盒环境是为了上生产做的最后一道检验,上面的数据基本都是从生产赋值过来的,所以可以到达最逼真的模拟使用。而且在部署到生产的时候必须对代码的单元测试覆盖率达到75%+,不然不允许部署

一般使用过程是,现在开发环境开发,进入uat阶段就上沙盒环境,然后通过uat就部署生产。生产遇到问题,那么久先到开发环境去做修改,然后部署到uat,再上生产,这样做的好处能够不会让各环境版本不一致。无论是给开发还是业务人员,都带来对版本的管理和控制的好处。

怎么制造环境

在这里插入图片描述
To create a sandbox org:

1,From Setup, enter Sandboxes in the Quick Find box, then select Sandboxes.
Click New Sandbox.
2,Enter a name (10 characters or fewer) and description for the sandbox.
We recommend that you choose a name that:
Reflects the purpose of this sandbox, such as QA.
Has only a few characters, because Salesforce appends the sandbox name to usernames on user records in the sandbox environment. Names with fewer characters make sandbox logins easier to type.
3,Select the type of sandbox you want.
If you don’t see a sandbox option or need licenses for more, contact Salesforce to order sandboxes for your org.
4,If you reduce the number of sandboxes you purchase, you are required to match the number of your sandboxes to the number you purchased. For example, if you have two Full sandboxes but purchased only one, you can’t create a Full sandbox. Instead, convert a Full sandbox to a smaller one, such as a Developer Pro or Developer sandbox, depending on which types you have available.
5,Select the data to include in your Partial Copy or Full sandbox.
For a Partial Copy sandbox, click Next, and then select the template you created to specify the data for your sandbox. If you have not created a template for this Partial Copy sandbox, see Create or Edit Sandbox Templates.
For a Full sandbox click Next, and then decide how much data to include.
To include template-based data for a Full sandbox, select an existing sandbox template. For more information, see Create or Edit Sandbox Templates
To include all data in a Full sandbox, choose whether and how much field tracking history data to include, and whether to copy Chatter data. You can copy from 0 to 180 days of history, in 30-day increments. The default is 0 days. Chatter data includes feeds, messages, and discovery topics. Decreasing the amount of data you copy can significantly speed sandbox copy time.
To run scripts after each create and refresh for this sandbox, specify the Apex class you previously created from the SandboxPostCopy interface.
Click Create.

这个是官方文档里面的创建步骤。连接是apex开发文档

猜你喜欢

转载自blog.csdn.net/weixin_41126799/article/details/88918887