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

Initial E2E tests infrastructure #29

Merged
merged 27 commits into from
Feb 19, 2024
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e71b222
stage
Mpdreamz Jan 15, 2024
0fa2a71
stage
Mpdreamz Jan 18, 2024
ea4f577
E2E controlled startup and traffic simulators
Mpdreamz Jan 23, 2024
83fa33c
setup to bootstrap UI tests to services overview page with current se…
Mpdreamz Jan 23, 2024
dc7da56
minimal tests
Mpdreamz Jan 25, 2024
61fda6c
minimal documentation for running tests
Mpdreamz Jan 25, 2024
427fa60
Merge branch 'main' into feature/integration-tests
Mpdreamz Jan 25, 2024
feeaea4
update license headers
Mpdreamz Jan 25, 2024
3880882
fix license header in DotSettings
Mpdreamz Jan 25, 2024
2c35cf6
junit and github actions logger dont gel well together
Mpdreamz Jan 30, 2024
abe57da
Merge branch 'main' into feature/integration-tests
Mpdreamz Feb 6, 2024
20ce08f
allow unit/integration/e2e test to be split and called in isolation
Mpdreamz Feb 6, 2024
7f06162
Rename .IntegrationTests to EndToEndTests
Mpdreamz Feb 6, 2024
cf980f6
Move to Nullean.Xunit.Partitions and simplify test logging
Mpdreamz Feb 9, 2024
bcb0046
introduce --test-suite to better control what tests need to run
Mpdreamz Feb 12, 2024
f7d9592
allow equal assignment on flags
Mpdreamz Feb 12, 2024
132b691
pass env's more explicitly
Mpdreamz Feb 12, 2024
1b6e9db
ensure we can write to console out early if e2e is not configured pro…
Mpdreamz Feb 12, 2024
821cdc6
possible null handling in StartedConfirationHandler
Mpdreamz Feb 12, 2024
f4689bf
ensure validation only happens if we run e2e tests
Mpdreamz Feb 13, 2024
9e656b1
Update to latest partitions xunit that keeps track of the last test e…
Mpdreamz Feb 13, 2024
d70e7d7
Merge remote-tracking branch 'origin/main' into feature/integration-t…
Mpdreamz Feb 13, 2024
51cb911
fix vault lookup
Mpdreamz Feb 13, 2024
824782f
ci: use pro secret
v1v Feb 13, 2024
5c2ece2
temporarily disable e2e tests
Mpdreamz Feb 13, 2024
0b2dc2c
restore deleted development files
Mpdreamz Feb 19, 2024
544be61
rename GlobalSetup to EndToEndOptions
Mpdreamz Feb 19, 2024
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
Next Next commit
minimal documentation for running tests
  • Loading branch information
Mpdreamz committed Jan 25, 2024
commit 61fda6cb66241063b6b279987c94774323267dfe
45 changes: 45 additions & 0 deletions tests/Elastic.OpenTelemetry.IntegrationTests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# E2E Tests: Elastic's .NET OpenTelemetry Distribution


## Target Environment

Requires an already running serverless observability project on cloud.

The configuration can be provided either as asp.net secrets or environment variables.

```bash
dotnet user-secrets set "E2E:Endpoint" "<url>" --project tests/Elastic.OpenTelemetry.IntegrationTests
dotnet user-secrets set "E2E:Authorization" "<header>" --project tests/Elastic.OpenTelemetry.IntegrationTests
```

The equivalent environment variables are `E2E__ENDPOINT` and `E2E__AUTHORIZATION`. For local development setting
secrets is preferred.

This ensures the instrumented applications will send OTLP data.

## Browser authentication

The tests require a headless browser to login. This requires a non OAuth login to be setup on your serverless
observability project.

To do this is to invite an email address you own to your organization:

https://cloud.elastic.co/account/members

This user only needs instance access to the `Target Environment`.

**NOTE:** since you can only be part of a single organization on cloud be sure that the organization you are part of is
not used for any production usecases and you have clearance from the organization owner.

By default accounts on cloud are part of their own personal organization.

Once invited and accepted the invited email can be used to login during the automated tests.

These can be provided again as user secrets:

```bash
dotnet user-secrets set "E2E:BrowserEmail" "<email>" --project tests/Elastic.OpenTelemetry.IntegrationTests
dotnet user-secrets set "E2E:BrowserPassword" "<password>" --project tests/Elastic.OpenTelemetry.IntegrationTests
```

or environment variables (`E2E__BROWSEREMAIL` and `E2E__BROWSERPASSWORD`).