Winter '14 では、リンク名を [組織のコードカバー率を計算する] から [組織のコードカバー率を見積る] に変更しました。名前が示すように、それは推定値であり、実際の数値ではありません。
理由: デプロイ時にユーザーが Salesforce で様々なコンポーネントを取得している場合、テストコードのカバー率の計算はリアルタイムで行われることになり、あらかじめ実行することはできません。
例: 組織内に 100 個のクラスがあり、テストコードのカバー率は 80% です。50 個のクラスをデプロイし、テストクラスはありません。
実際にデプロイを開始するまで、テストコードのカバー率がどのくらい低下するかは予測できません。新しい計算は、デプロイ中に (100 + 50) クラスに基づいて行われます。
100 クラスのテストコードカバー率は 80% でしたが、150 クラスでは 80% ではありませんでした。
デプロイ中に [組織のコードカバー率を計算する] リンクに頼ってはいけません。デプロイ中は、デプロイするコンポーネントに基づいて計算が異なります。わずかな変更でさえ、テストコードのカバー率に影響を与えます。デプロイ中に表示される数値は正確で、組織の現在のコンポーネントとデプロイする新しいコンポーネントに基づいています。
デプロイ中に「run all tests」をトリガし、テストコードのカバー率に影響を及ぼすコンポーネントのリストを次に示します。
リリースでのテストの実行
How Code Coverage works (英語)
ベストプラクティスのテスト
デプロイ中のテストコードカバー率の問題を解決する方法 -
a) コードカバー率が 75% 未満のテストクラスを特定する。
テストコードのカバー率を 75% 以上にする作業をします。
b) テストクラスを持たないクラスを特定する。
テストクラスを取得するための作業をします。
c) テストコードのカバー率が組織に対して 75% を超えるまでテストクラスを押し上げる必要があります。
000385908

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.