> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scanoss.com/llms.txt
> Use this file to discover all available pages before exploring further.

# KB Test

> Step-by-step guide to validate the [SCANOSS Engine](https://github.com/scanoss/engine) and Knowledge Base ([LDB](https://github.com/scanoss/ldb)) in an on-premises installation.

The validation is divided into two parts:

* [Validating the Server and LDB](#validating-the-server-and-ldb)
* [Validating the API and Load Balancer from a Client](#validating-the-api-and-load-balancer-from-a-client)

## Validating the Server and LDB

These tests ensure that the scanning **Engine** is operational and that version metadata is correctly retrieved from the **Knowledge Base (LDB)**.

### Create a sample WFP file

```bash theme={null}
echo -e "file=aff32ef2847f81abc62da10769bff43f,421,test\n4=369450fc\n5=bf7226a9\n7=b04dd861\n8=9727e3cd\n10=2152ba16" > sample.wfp
```

### Scan the sample WFP file using the local Engine

```bash theme={null}
scanoss sample.wfp
```

### Validate the JSON result

```bash theme={null}
scanoss sample.wfp | jq
```

If the output contains one or more component matches, the **Knowledge Base (LDB)** is functioning correctly.

## Validating the API and Load Balancer from a Client

This section verifies that the **API**, **Load Balancer**, **Engine**, and **SCANOSS Python client** can communicate correctly.

### Install the SCANOSS Python client

```bash theme={null}
pip3 install scanoss
```

### Unpack the acceptance test package

> **Note:** The `scanoss-acceptance-test.zip` package is provided by SCANOSS as part of the on-premises installation materials. Contact [support@scanoss.com](mailto:support@scanoss.com) if you have not received it.

```bash theme={null}
unzip scanoss-acceptance-test.zip
```

### Run the acceptance test script

```bash theme={null}
bash runTest.sh -u http://<SCANOSS-IP>:4443/api/scan/direct
```

> Replace `<SCANOSS-IP>` with the hostname or IP address of your **API server** or **Load Balancer**.

### Package and submit the test results

```bash theme={null}
tar cvzf customer-test-results.tgz output
```

The test results are saved in the `output` directory. Send the resulting archive (`customer-test-results.tgz`) to SCANOSS support at [support@scanoss.com](mailto:support@scanoss.com).
