Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [TERR-313][TERR-325] Integration test harness #26

Merged
merged 21 commits into from
Mar 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
MAP-160
- updated dist copy of the README.md file to reflect that in the project root
  • Loading branch information
sanchezelton committed Mar 19, 2024
commit 32c22f874e633a5d2b3ffed2b06a976062bcbdc5
47 changes: 1 addition & 46 deletions dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ The plugin will plot traffic information on the network topology, showing bi-dir
## Table of Contents

[Dashboard JSON](#Dashboard-JSON)

[Introductory Tutorial](#Introductory-Tutorial)
[Testing Requirements](#Testing-Requirements)

## Dashboard JSON

Expand Down Expand Up @@ -342,48 +342,3 @@ You should now be looking at the main dashboard view. Let's add another panel:
### Save your Dashboard

You should now have a dashboard that visualizes a point-in-time snapshot of your network traffic, along with a line graph that shows the network traffic over the the selected Grafana time range.

## Testing Requirements

Jest and Playwright are used to implement unit and integration testing for the plugin, following as closely as needed to
the implementation utilized by Grafana's plugin-e2e package.

### Test configuration

You must specify a username and password as a JSON object under playwright/.auth/credentials.json. At the same time,
e2e/e2e.config.json should be configured to target a particular dashboard for running the tests upon. Use the included
e2e.confgi.json.sample as a basis for your own e2e.config.json.

Testids should not have to be changed, although you have the option of doing so. The only requirement is that all testids
therein be unique.

Sample playwright/.auth/credentials.json:

```json
{
"username": "myGrafanaUser",
"password": "myGrafanaPassword"
}
```

### Test Execution and Reporting

To run both component and integration tests:

```sh
$ make test
```

You also have the option of running component and integration tests seperately, either using make or Yarn (both pairs
of shell commands below do the same thing.)

```sh
$ make test:component
$ make test:e2e

$ yarn test
$ yarn e2e
```

Integration tests are written with the assumption that Google Chrome is installed. Reconfigure in the playwright.config.ts
file if a different browser is preferred. Test suite files (*.spec) are included in the e2e folder.