---
title: Test operation
description: Connectors continue to be released outside the IDM release. For the latest documentation, refer to the OpenICF documentation.
component: pingidm
version: 7.2
page_id: pingidm:connector-dev-guide:operations/operation-test
canonical_url: https://docs.pingidentity.com/pingidm/7.2/connector-dev-guide/operations/operation-test.html
section_ids:
  TestApiOp-api-level-rules: Use the OpenICF test operation
  TestOp-spi-level-rules: Implement the test operation
---

# Test operation

|   |                                                                                                                                                                                   |
| - | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | Connectors continue to be released outside the IDM release. For the latest documentation, refer to the [OpenICF documentation](https://docs.pingidentity.com/openicf/index.html). |

The test operation tests the connector configuration. Unlike validation, testing a configuration verifies that every part of the environment that is referred to by the configuration is available. The operation therefore validates that the connection details that are provided in the configuration are accurate, and that the backend is accessible when using them.

For example, the connector might make a physical connection to the host that is specified in the configuration, to check that it exists and that the credentials supplied in the configuration are valid.

The test operation can be invoked before the configuration has been validated, or can validate the configuration before testing it.

## Use the OpenICF test operation

At the API level, the test operation throws a `RuntimeException` if the configuration is not valid, or if the test fails. Your connector implementation should throw the most specific exception available. When no specific exception is available, your connector implementation should throw a `ConnectorException`.

Consumption of the Test Operation at the API Level

```java
@Test
public void testTest() {
    logger.info("Running Test Test");
    final ConnectorFacade facade = createConnectorFacade(BasicConnector.class, null);
    facade.test();
}
```

## Implement the test operation

Implementation of the Test Operation at the SPI Level

```java
public void test() {
    logger.ok("Test works well");
}
```
