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

[Uptime] UI Monitor Management/Synthetics Service e2e tests - add environment variables for service #122552

Conversation

dominiqueclarke
Copy link
Contributor

@dominiqueclarke dominiqueclarke commented Jan 10, 2022

Summary

Adds Synthetics agent tests for Uptime Monitor Management.

Running these tests

  1. Add the following environment variables to your rc file: https://p.elstc.co/paste/BBzzLQ6V#hlBZ6W67Lubqbk0s5IkZemh1d4-z9A8h2aEmbjSNaPj
  2. In one terminal, navigate to the x-pack/plugins/uptime/scripts directory. Run node e2e.js --server. Wait for the instance to start up
  3. In a second terminal, navigate to the x-pack/plugins/uptime/e2e directory. Run node ../../../../scripts/functional_test_runner --config playwright_run.ts

'--xpack.uptime.unsafe.service.manifestUrl=https://manifest.synthetics.elastic.dev/v1/manifest.json',
`--xpack.uptime.unsafe.service.username=${process.env.SYNTHETICS_SERVICE_USERNAME}`,
`--xpack.uptime.unsafe.service.password=${process.env.SYNTHETICS_SERVICE_PASSWORD}`,
'--xpack.uptime.unsafe.service.hosts=["https://synthetics-service-es.es.us-west2.gcp.elastic-cloud.com:9243"]',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to figure out how to manage the es instance so that the service can communicate back with the tests running on CI.

@dominiqueclarke dominiqueclarke force-pushed the feature/uptime-synthetics-service-e2e-tests branch from 69157e2 to 4748518 Compare January 10, 2022 15:28
@dominiqueclarke dominiqueclarke force-pushed the feature/uptime-synthetics-service-e2e-tests branch from 4748518 to f4f8ca4 Compare January 10, 2022 15:34
@@ -10,7 +10,7 @@ import { playwrightRunTests } from './playwright_start';

const { argv } = yargs(process.argv.slice(2))
.option('headless', {
default: true,
default: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't intend to commit this. Will fix.

@dominiqueclarke dominiqueclarke added Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability enhancement New value added to drive a business result release_note:skip Skip the PR/issue when compiling release notes v8.1.0 labels Jan 18, 2022
@dominiqueclarke dominiqueclarke marked this pull request as ready for review January 18, 2022 14:40
@dominiqueclarke dominiqueclarke requested review from a team as code owners January 18, 2022 14:40
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@dominiqueclarke
Copy link
Contributor Author

@elasticmachine merge upstream

async waitForLoadingToFinish() {
while (true) {
if ((await page.$('[data-test-subj=kbnLoadingMessage]')) === null) break;
await page.waitForTimeout(5 * 1000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we should reduce this timeout , WDYT? 5 seconds seems too slow for some requests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think higher timeouts will reduce flakiness, and this isn't outrageously high that I feel it'll add an outrageous amount of time to run the tests.

Copy link
Contributor

@shahzad31 shahzad31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !!

WFG for Tests.

Great work and loved the utils and creation of page objects in e2e.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
uptime 688.4KB 688.5KB +104.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@dominiqueclarke dominiqueclarke merged commit 5789546 into elastic:main Jan 18, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jan 18, 2022
@dominiqueclarke dominiqueclarke deleted the feature/uptime-synthetics-service-e2e-tests branch January 18, 2022 20:53
ogupte pushed a commit to ogupte/kibana that referenced this pull request Jan 28, 2022
…ironment variables for service (elastic#122552)

* add environment variables for service

* add SYNTHETICS_SERVICE_MANIFEST and basic tests

* Update x-pack/plugins/uptime/e2e/playwright_run.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting enhancement New value added to drive a business result release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants