Skip to content

Commit

Permalink
NH-88139: update smoke-test readme
Browse files Browse the repository at this point in the history
  • Loading branch information
cleverchuk committed Aug 9, 2024
1 parent b6eba92 commit ac374a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions smoke-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ This directory contains the test machinery code and the machinery is held togeth
- `SWO_EMAIL`: The swo user email used to get temporary login credentials.
- `SWO_PWORD`: The swo user password.

## Test Architecture

The testing is done in two phases. In the first phase, we spin up service containers with the agent attached. The test downloads the latest snapshot agent built from the current commit. The `K6` container is used to generates HTTP requests to the other containers based on the specification in [basic.js](k6/basic.js) and helpers [names.js](k6/names.js). With the request generation, the specification in [basic.js](k6/basic.js) contains validation checks and `K6` records the result of these checks in a `json` file. This result is then used in the second phase by the JUnit test to verify that the `K6` checks succeeded. The JUnit checks the result to determine whether to pass or fail the build. The role of the second phase is to fail the build when any `K6` check fail. This is because `K6` checks cannot directly fail the build.

Some test don't depend on the result generated by `K6`, but on the log stream generated by the service containers. [LogStreamAnalyzer.java](src/test/java/com/solarwinds/util/LogStreamAnalyzer.java) is used to analyzer the logs generated by the service container and answers question about what it saw in the stream base on the configured regular expressions.

## Running the test
- build docker image for `spring-boot-webmvc` and tag it with `smt:webmvc`
- set environment variable `LAMBDA=false`
Expand Down

0 comments on commit ac374a9

Please sign in to comment.