---
title: Charmhub | Deploy Opensearch K8S using Charmhub - The Open Operator Collection
description: Deploy the latest version of Opensearch K8S as a Kubernetes Operator
  on any cloud.
url: https://charmhub.io/opensearch-k8s/docs/r-software-testing
---

# Opensearch K8S

[Canonical](https://charmhub.io/publisher/data-platform "View all packages from Canonical")

* [Canonical](https://charmhub.io/publisher/data-platform "View all packages from Canonical")

Platform:

2/edge 22

```
juju deploy opensearch-k8s --channel 2/edge
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

---

Share your thoughts on this charm with the community on discourse.

[Join the discussion](https://discourse.charmhub.io/)

**Note**: All commands are written for `juju >= v.3.1`. Charmed OpenSearch no longer supports `juju v.2`.

# Software testing for charms

Most types of standard [software tests](https://en.wikipedia.org/wiki/Software_testing) are applicable to Charmed OpenSearch.

This reference addresses the following types:

* [Unit test](https://charmhub.io/opensearch-k8s/docs/r-software-testing#unit-test)
* [Integration test](https://charmhub.io/opensearch-k8s/docs/r-software-testing#integration-test)
* [Performance test](https://charmhub.io/opensearch-k8s/docs/r-software-testing#performance-test)

## [Unit test](https://charmhub.io/opensearch-k8s/docs/r-software-testing#p-31558-unit-test)

Check the [Contributing](https://github.com/canonical/opensearch-operator/blob/main/CONTRIBUTING.md#testing) guide and follow `tox run -e unit` examples there.

## [Integration test](https://charmhub.io/opensearch-k8s/docs/r-software-testing#p-31558-integration-test)

The integration tests coverage is rather rich in the OpenSearch charm. Check the [Contributing](https://github.com/canonical/opensearch-operator/blob/main/CONTRIBUTING.md#testing) guide and follow `tox run -e integration` examples there.

For high availability (HA) related tests, each test serves as an integration as well as a smoke test with continuous writes routine being perpetually ran in parallel of whatever operation the test is involved in.
These continuous writes ensure the availability of the service under different conditions.

HA tests make use of one of the 2 fixtures:

* `c_writes_runnner`: creates an index with a default replication factor and continuously “bulk” feeds data to it
* `c_balanced_writes_runner`: creates an index with 2 primary shards and as many replica shards as the number of nodes available in the cluster, and continuously “bulk” feeds data to it.

After each test completes, the index gets deleted.

## [Performance test](https://charmhub.io/opensearch-k8s/docs/r-software-testing#p-31558-performance-test)

Refer to the [OpenSearch VM benchmark](https://charmhub.io/opensearch-k8s/docs/h-load-testing) guide for charmed OpenSearch.

---
