Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekMaggio committed Mar 7, 2024
1 parent e66a7f5 commit 5f0959b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
33 changes: 21 additions & 12 deletions app-testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,31 +86,38 @@ The analyses snapshot test runs protocol analysis using `TARGET` branch or tag t

#### Protocol Files Location

The set of protocols to analyze is defined inside of `app-testing/.env` file, under the `APP_ANALYSIS_TEST_PROTOCOLS` variable. These protocols must exist inside of `app-testing/files/protocols` folder.
The set of protocols to analyze is defined inside of `app-testing/.env` file, under the `APP_ANALYSIS_TEST_PROTOCOLS` variable. These protocols must exist inside of `app-testing/files/protocols` folder.

- Protocol Designer protocols go in the `json` folder
- Python protocols go in the `python` folder.

#### Analysis Snapshots Location

Analysis snapshots are located inside of `app-testing/tests/__snapshots__/analyses_snapshot_test` folder.
Analysis snapshots are located inside of `app-testing/tests/__snapshots__/analyses_snapshot_test` folder.

#### Running Analysis Snapshot Tests Locally

To run analysis snapshot tests locally, you run

```bash
TARGET="<target-branch-or-tag>" make snapshot-test
```
To run analysis snapshot tests locally, you must first build the Docker image by running the following command:

```bash
TARGET="<target-branch-or-tag>" make build-opentrons-analysis
```

Then to run the analysis snapshot test, you can run the following command:

```bash
TARGET="<target-branch-or-tag>" make snapshot-test
```

This will run the analyses snapshot test using the `TARGET` branch or tag, and compare the results against your local analysis snapshots located inside `app-testing/tests/__snapshots__/analyses_snapshot_test`.

#### Updating Analysis Snapshots

If you want to update the analysis snapshots, you can run the following command:

```bash
TARGET="<target-branch-or-tag>" make snapshot-test-update
```
```bash
TARGET="<target-branch-or-tag>" make snapshot-test-update
```

This will take the results of the analysis snapshot test using the `TARGET` branch or tag, and update the local analysis snapshots located inside `app-testing/tests/__snapshots__/analyses_snapshot_test`.

Expand All @@ -123,9 +130,11 @@ Given the scenario that you want to see if the latest version of `chore_release-
`TARGET` - is chore_release-v7.2.0. "I want to run analysis against `chore_release-v7.2.0`"

`TEST_SOURCE` - This one varies a bit on what it can be. The question to ask is, "Where are the snapshots that you want to compare against?"

- If you want to compare against the current analysis snapshots for this release, then TEST_SOURCE is chore_release-v7.2.0.
- If you want to compare against the previous release branch, then TEST_SOURCE is chore_release-v7.1.0.
- If you want to compare your in-progress release branch against the previous release branch, then TEST_SOURCE is `<your-branch-name>`.

run the Workflow Dispatch job
- `gh workflow run 'Analyses Snapshot Test' --ref chore_release-v7.2.0 -f TARGET=chore_release-v7.2.0 -f TEST_SOURCE=chore_release-v7.1.0`
run the Workflow Dispatch job

- `gh workflow run 'Analyses Snapshot Test' --ref chore_release-v7.2.0 -f TARGET=chore_release-v7.2.0 -f TEST_SOURCE=chore_release-v7.1.0`
1 change: 1 addition & 0 deletions app-testing/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ APP_ANALYSIS_TEST_PROTOCOLS="

# Not running this file because the error handling to catch that
# the flex is only supported on API versions 2.15 and above, does not exist
# Will be fixed with https://opentrons.atlassian.net/browse/RDEVOPS-71
# Flex_None_None_TC_2_14_verifyThermocyclerLoadedSlots

# run one
Expand Down

0 comments on commit 5f0959b

Please sign in to comment.