> For the complete documentation index, see [llms.txt](https://help.iviva.com/lucy-training/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.iviva.com/lucy-training/creating-on-premise-connectors/testing-the-connector.md).

# Testing the connector

Now that the agent is running - lets test the connector by executing the integration in the model designer.

If you execute the workflow you should get a 'ok' as a reply.&#x20;

<figure><img src="https://1851812739-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr90o9gxIl0sBRbdhjFUQ%2Fuploads%2FOhZ7MvObo62dsV2ejT6D%2FScreenshot%202024-07-16%20at%209.44.39%E2%80%AFPM.png?alt=media&amp;token=0cf61a5b-244c-4be0-9488-e8202c9e3110" alt=""><figcaption></figcaption></figure>

This is because in your agent code, you setup the result to have the value `ok`

````
```javascript
return {result:'ok',count:0};
```
````

So if you see that result, it means the connectivity works!

The next step is receiving inputs.

Lets go back to our agent code inside the processRequest function:

````
```javascript
async function processRequest(payload) {
    return {result:'ok',count:12};
}
```
````

Lets change this to receive our payload and parse it and extract the query.

Recall in the step where you defined your connector function, you created a JSON payload like

```
{"query":"select * from foo;","function":"sqlquery"}
```

So this is the payload we will be receiving inside the `processRequest()` function.

Lets parse it and extract the query.

````
```javascript
async function processRequest(payload) {
    let obj = JSON.parse(payload);
    if (obj.function == 'sqlquery') {
        //TODO: do something
    }
    return {result:'ok',count:12};
}
```
````

So we can now extract the sql query.&#x20;

Now we need to actually integrate sqlite and run the query. Lets do that next.
