-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add performance test for many fields
- Loading branch information
1 parent
dd9267a
commit bc8a8e0
Showing
3 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
test/functional/fixtures/kbn_archiver/many_fields_data_view.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"attributes": { | ||
"fieldAttrs": "{}", | ||
"fields": "[]", | ||
"runtimeFieldMap": "{}", | ||
"title": "indices-stats*", | ||
"typeMeta": "{}" | ||
}, | ||
"coreMigrationVersion": "8.3.0", | ||
"id": "35796250-bb09-11ec-a8e4-a9868e049a39", | ||
"migrationVersion": { | ||
"index-pattern": "8.0.0" | ||
}, | ||
"references": [], | ||
"type": "index-pattern", | ||
"updated_at": "2022-04-13T09:07:56.793Z", | ||
"version": "WzQwLDFd" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
x-pack/test/performance/tests/playwright/many_fields_discover.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import { FtrProviderContext } from '../../ftr_provider_context'; | ||
import { StepCtx } from '../../services/performance'; | ||
|
||
export default function manyFieldsDiscover({ getService }: FtrProviderContext) { | ||
describe('many_fields_discover', () => { | ||
const performance = getService('performance'); | ||
const esArchiver = getService('esArchiver'); | ||
const kibanaServer = getService('kibanaServer'); | ||
|
||
before(async () => { | ||
await kibanaServer.importExport.load( | ||
'test/functional/fixtures/kbn_archiver/many_fields_data_view' | ||
); | ||
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/many_fields'); | ||
}); | ||
|
||
after(async () => { | ||
await kibanaServer.importExport.unload( | ||
'test/functional/fixtures/kbn_archiver/many_fields_data_view' | ||
); | ||
await esArchiver.unload('test/functional/fixtures/es_archiver/many_fields'); | ||
}); | ||
|
||
it('many_fields_discover', async () => { | ||
await performance.runUserJourney( | ||
'many_fields_discover', | ||
[ | ||
{ | ||
name: 'Go to Discover Page', | ||
handler: async ({ page, kibanaUrl }: StepCtx) => { | ||
await page.goto(`${kibanaUrl}/app/discover`); | ||
await page.waitForSelector('[data-test-subj="discoverDocTable"]'); | ||
}, | ||
}, | ||
{ | ||
name: 'Expand the first document', | ||
handler: async ({ page }) => { | ||
const expandButtons = page.locator( | ||
'[data-test-subj="docTableExpandToggleColumn"]' | ||
); | ||
await expandButtons.first().click(); | ||
await page.locator('text="Expanded document"'); | ||
} | ||
} | ||
], | ||
{ | ||
requireAuth: false, | ||
} | ||
); | ||
}); | ||
}); | ||
} |