diff --git a/docs/content/1.1.0/building_testing/_index.md b/docs/content/1.1.0/building_testing/_index.md index f5a25e2f..edae4ec5 100644 --- a/docs/content/1.1.0/building_testing/_index.md +++ b/docs/content/1.1.0/building_testing/_index.md @@ -183,11 +183,15 @@ cd jmx_exporter ./mvnw clean verify ``` -**Notes** +### Scripts + +Test scripts are available to build and run various integration test suite scenarios -- The `regression-test.sh` shell script can be used to build and run the integration test suite using all test containers. - - `./regression-test.sh` -- Output is captured and logged to `regression-test.log`. +- [run-quick-test.sh](https://github.com/prometheus/jmx_exporter/blob/main/run-quick-test.sh) +- [run-smoke-test.sh](https://github.com/prometheus/jmx_exporter/blob/main/run-smoke-test.sh) +- [run-regression-test.sh](https://github.com/prometheus/jmx_exporter/blob/main/run-regression-test.sh) +- [run-targeted-test.sh](https://github.com/prometheus/jmx_exporter/blob/main/run-targeted-test.sh) +- [run-stress-test.sh](https://github.com/prometheus/jmx_exporter/blob/main/run-stress-test.sh) ### Output diff --git a/quick-test.sh b/run-quick-test.sh similarity index 100% rename from quick-test.sh rename to run-quick-test.sh diff --git a/regression-test.sh b/run-regression-test.sh similarity index 100% rename from regression-test.sh rename to run-regression-test.sh diff --git a/smoke-test.sh b/run-smoke-test.sh similarity index 100% rename from smoke-test.sh rename to run-smoke-test.sh diff --git a/stress-test.sh b/run-stress-test.sh similarity index 100% rename from stress-test.sh rename to run-stress-test.sh diff --git a/run-targeted-test.sh b/run-targeted-test.sh new file mode 100755 index 00000000..76cf0451 --- /dev/null +++ b/run-targeted-test.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# +# Copyright (C) 2022-present The Prometheus jmx_exporter Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Bash script to build, package, and run the tests (single Docker container) +# + +if [[ "$#" -ne 2 ]]; then + echo "Usage: $0 " + exit 1 +fi + +( + export JAVA_DOCKER_IMAGES="$1" + export PROMETHEUS_DOCKER_IMAGES="$2" + docker pull "$JAVA_DOCKER_IMAGES" + docker pull "$PROMETHEUS_DOCKER_IMAGES" + ./mvnw clean verify +) 2>&1 | tee targeted-test.log