Тестирование соединителя Microsoft Graph
Для тестирования соединителя Microsoft Graph можно использовать служебную программу TestApp . Это консольное приложение, которое используется для тестирования соединителя перед развертыванием. Он не будет создавать подключения или принимать данные.
Чтобы протестировать соединитель, выполните следующие действия.
Обновите файл ConnectionInfo.json, указав идентификатор соединителя и путь к источнику данных, а затем задайте для AuthenticationKind значение
null
. Этот файл находится в следующей папке: C:\Program Files\Graph connector agent\TestApp\Config.А. Идентификатор поставщика создается для каждого проекта и находится в файле ConnectorInfoServiceImpl.cs.
Б. Путь к источнику данных — это путь, по которому вы скачали файл ApplianceParts.csv.
c. Вы можете задать authenticationKind значение ,
null
так как соединитель использует анонимную проверку подлинности.{ // All these configs are only required to test locally "id": "TestGrpcConnector", // ConnectionId. Must be unique for a tenant. Change this for each crawlTest "name": "TestGrpcConnector", // name of connection "description": "\<Connection description>", "configuration": { "providerId": "a1c127ed-29ce-47fb-ad4a-8836871922ea", //Enter your ConnectorUniqueId "scheduleSetting": { "fullSyncInterval": 30 // the value is in seconds. Decrease this to run consecutive tests on the same connectionId }, "CredentialData": { "Path": "D:\\ApplianceParts.csv", "AuthenticationKind": "Anonymous", // Authentication kind which connector supports eg: basic, windows, anonymous, oauth2.client_credentials "CredentialDetails": null // If AuthenticationKind is set to something different, use { "loginId": "", "loginSecret": "" } here }, "ProviderParameters": null // This parameter will have the data/configuration given during connection creation time. Will be present in JSON serialized format } }
Обновите файл CustomConnectorPortMap.json, указав сопоставление портов соединителя. Этот файл находится в следующей папке C:\Program Files\Graph connector agent. Обновите этот файл записью для идентификатора соединителя (который вы определили в файле ConnectorInfoServiceImpl.cs на предыдущем шаге) и порта, определенного в файле ConnectorServer.cs.
{
"a1c127ed-29ce-47fb-ad4a-8836871922ea": "30303" //Update your ConnectorUniqueId and Port information
}
- Обновите файл manifest.json, расположенный в следующей папке: C:\Program Files\Graph connector agent\TestApp\Config:
{
// This is your unique connector ID/provider ID.
"connectorId": "a1c127ed-29ce-47fb-ad4a-8836871922ea", //Update your ConnectorUniqueId here
// This is a list of all supported auth types. Remove the ones that the connector does not support.
"authTypes": [ "Anonymous" ]
}
Запустите GraphConnectorAgentTest.exe, который находится в папке C:\Program Files\Graph connector agent\TestApp.
Убедитесь, что соединитель работает.
Протестируйте соединитель, используя параметры всех параметров (1, 2, 3, 4, 5) в GraphConnectorAgentTest.exe.