Resolve unit test failures for Genesys Cloud for Salesforce External Routing package

참고: 이 문서는 Salesforce용 Genesys Cloud에 적용됩니다.

The Genesys Cloud for Salesforce External Routing package contains unit tests that can fail in a sandbox org when certain test data is missing. The package includes the unit test only to satisfy the code coverage required for creating a package. You can change any aspect of the package, including which test data to use in the test code or the test code itself, at your own discretion.

When unit tests fail during deployment from a sandbox org, you can do the one of the following options:

  • Set up test data needed for the tests to pass
  • Modify tests to pass or delete them at your discretion

Set up test data for the tests

You can either create new test data in your sandbox org or reuse the existing data as test data. Unit tests in the package need the following resources to exist in the sandbox org:

  • Routing Configuration: Setup > Omni-Channel > Routing Configurations
  • Service Channel: Setup > Omni-Channel > Service Channel
  • 대기열: Setup > Users > Queues

Create new test data

To create a Routing Configuration in Salesforce:

  1. Create a Routing Configuration: Select Setup > Omni-Channel > Routing Configurations > New.
  2. Enter the following details for the configuration:
    • 이름: ER Config
    • Routing Priority: 1
    • Routing Model: External Routing
    • Units of Capacity: 1
  3. Create a Service Channels for Case object: Select Setup > Omni-Channel >Service Channels > New.
  4. Enter the following details for the service channel:
    • Service Channel Name: Case
    • Developer Name: Case
  5. Create a Queue: Select Setup > Queues > New.
  6. Enter the following details for the queue:
    • Label: ER Queue
    • 큐 이름: ER_Queue
    • Routing Configuration: ER Config
    • Supported Objects: Case

사용 중인 대기열 이름이 지정된 이름과 다른 경우getExternalRoutingQueue 방법GenesysCloudTestHelper.cls , 해당 파일의 대기열 이름을 업데이트하여 일치시킵니다.

Use existing data as test data

이미 설명된 구성과 일치하는 대기열이 있는 경우<link> , 단위 테스트에 사용할 대기열 이름을 지정할 수 있습니다.getExternalRoutingQueue 방법GenesysCloudTestHelper.cls 귀하의 대기열에 맞춰보세요. 

Modify or delete tests

You can check which unit tests are failing in your environment and modify those tests accordingly. The unit tests that can fail when test data is missing are as follows:

  • ExternalRoutingControllerTests.cls
  • ExternalRoutingDataServiceTests.cls
  • ExternalRoutingDeletionTests.cls
  • ExternalRoutingServiceTests,cls
  • OpenMessageServiceTests.cls

통합에 대한 자세한 내용은 다음을 참조하십시오. Salesforce용 Genesys Cloud 정보.