フリー問題

Salesforce Certified Platform Developer II のフリー問題 13 / 20 問目

問題文

A veterinary supplies vendor's reviewer says a new test class only proves the happy path. Which set of additions covers the four directions the documentation recommends?

選択肢

  1. A test that catches every exception so the class never fails, a test with one record, a test with the annotation that lets it see the org's data, and a test that runs as an administrator, and the suite then passes under all conditions.
  2. Values at the edges of the accepted range, the expected exception type and its message for invalid input, a run with enough records to exercise the bulk path, and a run as a user whose permissions are restricted.
  3. Values at the edges of the accepted range, the expected exception type for invalid input, a run with enough records to exercise the bulk path, and a run with the annotation that lets the test see the org's data so that the class is proved against the permissions that real users actually hold.
  4. More assertions on the same happy path, a second test method with different data, a test that raises the coverage of the untested lines, and a comment describing the assumptions, and the four directions are met by sheer volume of assertions.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。