mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Lens] Performance journey (#140195)
* add Lens performance journey * cleanup * always wait * Update utils.ts * gzip mappings Co-authored-by: Liza Katz <liza.katz@elastic.co>
This commit is contained in:
parent
138f2cda0d
commit
b0e6a41220
7 changed files with 142 additions and 0 deletions
|
@ -273,3 +273,4 @@ enabled:
|
|||
- x-pack/test/performance/journeys/many_fields_discover/config.ts
|
||||
- x-pack/test/performance/journeys/promotion_tracking_dashboard/config.ts
|
||||
- x-pack/test/performance/journeys/web_logs_dashboard/config.ts
|
||||
- x-pack/test/performance/journeys/data_stress_test_lens/config.ts
|
||||
|
|
BIN
test/functional/fixtures/es_archiver/stress_test/data.json.gz
Normal file
BIN
test/functional/fixtures/es_archiver/stress_test/data.json.gz
Normal file
Binary file not shown.
Binary file not shown.
54
test/functional/fixtures/kbn_archiver/stress_test.json
Normal file
54
test/functional/fixtures/kbn_archiver/stress_test.json
Normal file
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"attributes": {
|
||||
"fieldAttrs": "{}",
|
||||
"fields": "[]",
|
||||
"runtimeFieldMap": "{}",
|
||||
"title": "stresstest",
|
||||
"typeMeta": "{}"
|
||||
},
|
||||
"coreMigrationVersion": "8.3.0",
|
||||
"id": "6244bd06-f711-44db-b756-bc25e4a32a60",
|
||||
"migrationVersion": {
|
||||
"index-pattern": "8.0.0"
|
||||
},
|
||||
"references": [],
|
||||
"type": "index-pattern",
|
||||
"updated_at": "2022-04-13T09:07:56.793Z",
|
||||
"version": "WzQwLDFd"
|
||||
}
|
||||
|
||||
{
|
||||
"attributes": {
|
||||
"title": "Stresstest",
|
||||
"hits": 0,
|
||||
"description": "",
|
||||
"panelsJSON": "[{\"version\":\"8.5.0\",\"type\":\"lens\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"2899b65a-9186-4573-942a-04036669b73c\"},\"panelIndex\":\"2899b65a-9186-4573-942a-04036669b73c\",\"embeddableConfig\":{\"attributes\":{\"title\":\"\",\"visualizationType\":\"lnsXY\",\"type\":\"lens\",\"references\":[{\"type\":\"index-pattern\",\"id\":\"6244bd06-f711-44db-b756-bc25e4a32a60\",\"name\":\"indexpattern-datasource-layer-591b8a11-31f9-41e5-87ba-f0b6f5face08\"}],\"state\":{\"visualization\":{\"legend\":{\"isVisible\":true,\"position\":\"right\"},\"valueLabels\":\"hide\",\"fittingFunction\":\"None\",\"axisTitlesVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"tickLabelsVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"labelsOrientation\":{\"x\":0,\"yLeft\":0,\"yRight\":0},\"gridlinesVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"preferredSeriesType\":\"bar_stacked\",\"layers\":[{\"layerId\":\"591b8a11-31f9-41e5-87ba-f0b6f5face08\",\"accessors\":[\"532742da-8bea-4357-a5e1-9319111a61e7\"],\"position\":\"top\",\"seriesType\":\"bar_stacked\",\"showGridlines\":false,\"layerType\":\"data\",\"xAccessor\":\"5bcdbfd2-c4c0-4b27-891e-d848ea468cbe\",\"splitAccessor\":\"fed7a521-30ac-4696-bf2d-85a26ba6db58\"}]},\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filters\":[],\"datasourceStates\":{\"indexpattern\":{\"layers\":{\"591b8a11-31f9-41e5-87ba-f0b6f5face08\":{\"columns\":{\"5bcdbfd2-c4c0-4b27-891e-d848ea468cbe\":{\"label\":\"@timestamp\",\"dataType\":\"date\",\"operationType\":\"date_histogram\",\"sourceField\":\"@timestamp\",\"isBucketed\":true,\"scale\":\"interval\",\"params\":{\"interval\":\"ms\",\"includeEmptyRows\":true,\"dropPartials\":false}},\"532742da-8bea-4357-a5e1-9319111a61e7\":{\"label\":\"Count of records\",\"dataType\":\"number\",\"operationType\":\"count\",\"isBucketed\":false,\"scale\":\"ratio\",\"sourceField\":\"___records___\",\"params\":{\"emptyAsNull\":true}},\"fed7a521-30ac-4696-bf2d-85a26ba6db58\":{\"label\":\"Top 1000 values of field0\",\"dataType\":\"string\",\"operationType\":\"terms\",\"scale\":\"ordinal\",\"sourceField\":\"field0\",\"isBucketed\":true,\"params\":{\"size\":1000,\"orderBy\":{\"type\":\"column\",\"columnId\":\"532742da-8bea-4357-a5e1-9319111a61e7\"},\"orderDirection\":\"desc\",\"otherBucket\":false,\"missingBucket\":false,\"parentFormat\":{\"id\":\"terms\"}}}},\"columnOrder\":[\"fed7a521-30ac-4696-bf2d-85a26ba6db58\",\"5bcdbfd2-c4c0-4b27-891e-d848ea468cbe\",\"532742da-8bea-4357-a5e1-9319111a61e7\"],\"incompleteColumns\":{}}}}},\"internalReferences\":[],\"adHocDataViews\":{}}},\"enhancements\":{}}}]",
|
||||
"optionsJSON": "{\"useMargins\":true,\"syncColors\":false,\"syncTooltips\":false,\"hidePanelTitles\":false}",
|
||||
"version": 1,
|
||||
"timeRestore": true,
|
||||
"timeTo": "2022-09-07T10:55:09.280Z",
|
||||
"timeFrom": "2022-09-07T10:53:30.262Z",
|
||||
"refreshInterval": {
|
||||
"pause": true,
|
||||
"value": 0
|
||||
},
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}"
|
||||
}
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"type": "index-pattern",
|
||||
"id": "6244bd06-f711-44db-b756-bc25e4a32a60",
|
||||
"name": "2899b65a-9186-4573-942a-04036669b73c:indexpattern-datasource-layer-591b8a11-31f9-41e5-87ba-f0b6f5face08"
|
||||
}
|
||||
],
|
||||
"type": "dashboard",
|
||||
"updated_at": "2022-04-13T09:07:56.793Z",
|
||||
"version": "WzQwLDFd",
|
||||
"coreMigrationVersion": "8.3.0",
|
||||
"id": "92b143a0-2e9c-11ed-b1b6-a504560b392c",
|
||||
"migrationVersion": {
|
||||
"dashboard": "7.17.3"
|
||||
}
|
||||
}
|
|
@ -190,6 +190,9 @@ Run all tests from the `x-pack` root directory
|
|||
- API Functional tests:
|
||||
- Run `node scripts/functional_tests_server`
|
||||
- Run `node ../scripts/functional_test_runner.js --config ./test/api_integration/config.ts --grep=Lens`
|
||||
- Performance journeys:
|
||||
- Run `node scripts/functional_tests_server.js --config x-pack/test/performance/journeys/data_stress_test_lens/config.ts`
|
||||
- Run `node scripts/functional_test_runner --config x-pack/test/performance/journeys/data_stress_test_lens/config.ts`
|
||||
|
||||
## Developing tips
|
||||
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* 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 { FtrConfigProviderContext } from '@kbn/test';
|
||||
import { serializeApmGlobalLabels } from '../../utils';
|
||||
|
||||
export const JOURNEY_DATA_STRESS_TEST_LENS = 'data_stress_test_lens';
|
||||
|
||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||
const performanceConfig = await readConfigFile(require.resolve('../base.config'));
|
||||
|
||||
const testFiles = [require.resolve(`./${JOURNEY_DATA_STRESS_TEST_LENS}`)];
|
||||
|
||||
const config = {
|
||||
...performanceConfig.getAll(),
|
||||
testFiles,
|
||||
testData: {
|
||||
kbnArchives: ['test/functional/fixtures/kbn_archiver/stress_test'],
|
||||
esArchives: ['test/functional/fixtures/es_archiver/stress_test'],
|
||||
},
|
||||
};
|
||||
|
||||
const apmGlobalLabels = {
|
||||
...performanceConfig.get('kbnTestServer').env.ELASTIC_APM_GLOBAL_LABELS,
|
||||
ftrConfig: `x-pack/test/performance/tests/journeys/${JOURNEY_DATA_STRESS_TEST_LENS}/config.ts`,
|
||||
performancePhase: process.env.TEST_PERFORMANCE_PHASE,
|
||||
journeyName: JOURNEY_DATA_STRESS_TEST_LENS,
|
||||
};
|
||||
|
||||
return {
|
||||
...config,
|
||||
kbnTestServer: {
|
||||
...config.kbnTestServer,
|
||||
serverArgs: [
|
||||
...performanceConfig.get('kbnTestServer.serverArgs'),
|
||||
`--telemetry.labels.journeyName=${JOURNEY_DATA_STRESS_TEST_LENS}`,
|
||||
],
|
||||
env: {
|
||||
...config.kbnTestServer.env,
|
||||
ELASTIC_APM_GLOBAL_LABELS: serializeApmGlobalLabels(apmGlobalLabels),
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* 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';
|
||||
import { waitForVisualizations } from '../../utils';
|
||||
import { JOURNEY_DATA_STRESS_TEST_LENS } from './config';
|
||||
|
||||
export default function ({ getService }: FtrProviderContext) {
|
||||
describe(JOURNEY_DATA_STRESS_TEST_LENS, () => {
|
||||
const performance = getService('performance');
|
||||
|
||||
it(JOURNEY_DATA_STRESS_TEST_LENS, async () => {
|
||||
await performance.runUserJourney(
|
||||
JOURNEY_DATA_STRESS_TEST_LENS,
|
||||
[
|
||||
{
|
||||
name: 'Go to dashboard',
|
||||
handler: async ({ page, kibanaUrl }: StepCtx) => {
|
||||
await page.goto(
|
||||
`${kibanaUrl}/app/dashboards#/view/92b143a0-2e9c-11ed-b1b6-a504560b392c`
|
||||
);
|
||||
|
||||
await waitForVisualizations(page, 1);
|
||||
},
|
||||
},
|
||||
],
|
||||
{
|
||||
requireAuth: false,
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue