Skip to content

Commit fd89bab

Browse files
authoredJan 28, 2025··
Update README for smoke tests with usages and examples (#5244)
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
1 parent fc605b7 commit fd89bab

File tree

1 file changed

+44
-11
lines changed

1 file changed

+44
-11
lines changed
 

‎src/test_workflow/README.md

+44-11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
- [Test.sh Options](#testsh-options)
33
- [Integration Tests](#integration-tests)
44
- [Backwards Compatibility Tests](#backwards-compatibility-tests)
5+
- [Smoke Tests](#smoke-tests)
56
- [Performance Tests](#performance-tests)
67
- [Identifying Regressions in Performance Tests](#identifying-regressions-in-performance-tests)
78
- [Identifying Regressions in Nightly Performance Tests](#identifying-regressions-in-nightly-performance-tests)
@@ -15,6 +16,7 @@
1516
- [integTest job](#integtest-job)
1617
- [bwcTest job](#bwctest-job)
1718
- [perfTest job](#perftest-job)
19+
- [smokeTest job](#smoketest-job)
1820
- [Manifest Files](#manifest-files)
1921
- [Dependency Management](#dependency-management)
2022
- [S3 Permission Model](#s3-permission-model)
@@ -28,15 +30,15 @@ Testing is run via `./test.sh`.
2830

2931
The following options are available.
3032

31-
| name | description |
32-
|------------------------|-----------------------------------------------------------------------------------------------------------------------|
33-
| test-type | Run tests of a test suite. [integ-test, bwc-test, perf-test, benchmark-test execute-test, benchmark-test compare] |
34-
| test-manifest-path | Specify a test manifest path. |
35-
| --paths | Location of manifest(s). |
36-
| --test-run-id | Unique identifier for a test run. |
37-
| --component [name ...] | Test a subset of specific components. |
38-
| --keep | Do not delete the temporary working directory on both success or error. |
39-
| -v, --verbose | Show more verbose output. |
33+
| name | description |
34+
|------------------------|-------------------------------------------------------------------------------------------------------------------------------|
35+
| test-type | Run tests of a test suite. [integ-test, bwc-test, smoke-test, perf-test, benchmark-test execute-test, benchmark-test compare] |
36+
| test-manifest-path | Specify a test manifest path. |
37+
| --paths | Location of manifest(s). |
38+
| --test-run-id | Unique identifier for a test run. |
39+
| --component [name ...] | Test a subset of specific components. |
40+
| --keep | Do not delete the temporary working directory on both success or error. |
41+
| -v, --verbose | Show more verbose output. |
4042

4143
### Integration Tests
4244

@@ -122,6 +124,29 @@ On CI level for plugins, security certificates need to be manually imported when
122124

123125
See [anomaly-detection#766](https://github.com/opensearch-project/anomaly-detection/pull/766) or [observability#1366](https://github.com/opensearch-project/observability/pull/1366) for more information.
124126

127+
### Smoke Tests
128+
Run Smoke tests invoking `run_smoke_test.py` in each component from a distribution manifest.
129+
130+
The smoke tests are designed to verify basic functionality of a distribution bundle with all plugins installed.
131+
Each plugin being tested has its own test specification YAML file, located in the [OpenSearch Build repository](https://github.com/opensearch-project/opensearch-build/tree/main/src/test_workflow/smoke_test/smoke_tests_spec), organized by major version. These test specification files list all testing API cases. The smoke test workflow executes each API case and compares the results with the API specifications from the [OpenSearch API Specification repository](https://github.com/opensearch-project/opensearch-api-specification) to perform basic validation and testing.
132+
133+
Usage:
134+
To execute the smoke tests, use the following command:
135+
```bash
136+
./test.sh smoke-test <test-manifest-path> <target>
137+
```
138+
139+
Examples
140+
Running smoke tests locally with artifacts built and assembled:
141+
```bash
142+
./test.sh smoke-test manifests/2.19.0/opensearch-2.19.0-test.yml --paths opensearch=/workspace/opensearch-build/tar
143+
```
144+
145+
Running smoke tests against an existing build from CI:
146+
```bash
147+
./test.sh smoke-test manifests/2.19.0/opensearch-2.19.0-test.yml --paths opensearch=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.19.0/10545/linux/x64/tar/
148+
```
149+
125150
### Performance Tests
126151

127152
TODO: Add instructions for running performance tests with `test.sh`
@@ -249,7 +274,7 @@ The development of `test-orchestration-pipeline` is tracked by meta issue [#123]
249274

250275
It is a Jenkins job that runs integration tests on a build artifact. It reads the build artifact composition from the associated manifest files and spins up parallel, independent integrationTest runs for each component built inside the artifact. For instance, if the artifact is a full distribution, which has all OpenSearch plugins, the job will kick off integration test suite for each individual plugin. Each plugin integration tests would run against a dedicated single node cluster, which is created from the built artifact. Once all integration tests complete, this job publishes the test results to an S3 bucket.
251276

252-
See the integration test [configuration file](jenkins/opensearch/integ-test.jenkinsfile) and related [jenkins job](https://build.ci.opensearch.org/job/integ-test/)
277+
See the integration test [configuration file](../../jenkins/opensearch/integ-test.jenkinsfile) and related [jenkins job](https://build.ci.opensearch.org/job/integ-test/)
253278

254279
The development of `integTest` job is tracked by meta issue [#818](https://github.com/opensearch-project/opensearch-build/issues/818)
255280

@@ -259,7 +284,7 @@ It is a Jenkins job that runs bwc tests on the current version and compatible bw
259284

260285
When the bwc test is triggered for a particular component, the tests set up their own cluster and test the required functionalities in the upgrade paths, for the example above, a multi-node cluster starts with bwc versions of OpenSearch and AD installed on it, one or more nodes are upgraded to the current version of OpenSearch and AD installed on it and backwards compatibility is tested. The plugins would add tests for all bwc versions (similar to OpenSearch core) and they can be triggered from the bwcTest job.
261286

262-
See the bwc test [configuration file](jenkins/opensearch/bwc-test.jenkinsfile) and related [jenkins job](https://build.ci.opensearch.org/job/bwc-test/)
287+
See the bwc test [configuration file](../../jenkins/opensearch/bwc-test.jenkinsfile) and related [jenkins job](https://build.ci.opensearch.org/job/bwc-test/)
263288

264289
The development of the bwc test automation is tracked by meta issue [#90](https://github.com/opensearch-project/opensearch-build/issues/90).
265290

@@ -290,6 +315,14 @@ After the performance test completes, it will report back the test results as we
290315

291316
The development is tracked by meta issue [#126](https://github.com/opensearch-project/opensearch-build/issues/126)
292317

318+
#### smokeTest job
319+
320+
It is a Jenkins job designed to run smoke tests on distribution artifacts. It retrieves the distribution artifacts using the provided manifest URL parameter and spins up a cluster with all plugins installed. The cluster is deployed using the default configuration without any customization. Smoke tests for all components are executed sequentially, and the results are returned at the end.
321+
322+
See the smoke test [configuration file](../../jenkins/opensearch/smoke-test.jenkinsfile) and related [jenkins job](https://build.ci.opensearch.org/job/smoke-test/)
323+
324+
The development is tracked by meta issue [#5223](https://github.com/opensearch-project/opensearch-build/issues/5223)
325+
293326
## Manifest Files
294327

295328
Manifest files are configurations for a particular bundle. `test-workflow` uses three types of manifest files to run test suites.

0 commit comments

Comments
 (0)
Please sign in to comment.