[ftr] create config file for each tested plugin with firefox tests (#150873)

## Summary

Splitting firefox test config by plugin to speedup pipeline execution
time.

<img width="1581" alt="image"
src="https://user-images.githubusercontent.com/10977896/218100374-4b19339a-c3fb-4344-9e27-9791206ef189.png">

test/functional/firefox/console.config.ts 6m 2s
test/functional/firefox/dashboard.config.ts 7m 39s
test/functional/firefox/discover.config.ts 4m 18s
test/functional/firefox/home.config.ts 1m 32s
test/functional/firefox/visualize.config.ts 22m 9s
This commit is contained in:
Dzmitry Lemechko 2023-02-11 00:51:57 +01:00 committed by GitHub
parent 43fa5174f8
commit 8be882b58d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 168 additions and 42 deletions

View file

@ -4,6 +4,7 @@ disabled:
# Base config files, only necessary to inform config finding script
- test/functional/config.base.js
- test/functional/firefox/config.base.ts
- x-pack/test/functional/config.base.js
- x-pack/test/detection_engine_api_integration/security_and_spaces/config.base.ts
- x-pack/test/functional_enterprise_search/base_config.ts
@ -99,7 +100,11 @@ enabled:
- test/functional/apps/visualize/group6/config.ts
- test/functional/apps/visualize/replaced_vislib_chart_types/config.ts
- test/functional/config.ccs.ts
- test/functional/config.firefox.js
- test/functional/firefox/console.config.ts
- test/functional/firefox/dashboard.config.ts
- test/functional/firefox/discover.config.ts
- test/functional/firefox/home.config.ts
- test/functional/firefox/visualize.config.ts
- test/health_gateway/config.ts
- test/interactive_setup_api_integration/enrollment_flow.config.ts
- test/interactive_setup_api_integration/manual_configuration_flow_without_tls.config.ts

View file

@ -11,7 +11,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const browser = getService('browser');
describe('discover app', function () {
describe('discover/group2', function () {
before(async function () {
await browser.setWindowSize(1300, 800);
});

View file

@ -7,7 +7,7 @@
*/
export default async function ({ readConfigFile }) {
const firefoxConfig = await readConfigFile(require.resolve('./config.firefox.js'));
const firefoxConfig = await readConfigFile(require.resolve('./firefox/config.base.ts'));
return {
...firefoxConfig.getAll(),

View file

@ -1,39 +0,0 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export default async function ({ readConfigFile }) {
const baseConfig = await readConfigFile(require.resolve('./config.base.js'));
return {
...baseConfig.getAll(),
testFiles: [
require.resolve('./apps/console'),
require.resolve('./apps/dashboard/group4/dashboard_save'),
require.resolve('./apps/dashboard_elements'),
require.resolve('./apps/discover/classic'),
require.resolve('./apps/discover/group1'),
require.resolve('./apps/discover/group2'),
require.resolve('./apps/home'),
require.resolve('./apps/visualize/group5'),
],
browser: {
type: 'firefox',
},
suiteTags: {
include: ['includeFirefox'],
exclude: ['skipFirefox'],
},
junit: {
reportName: 'Firefox UI Functional Tests',
},
};
}

View file

@ -0,0 +1,28 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/* eslint-disable import/no-default-export */
import { FtrConfigProviderContext } from '@kbn/test';
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const baseConfig = await readConfigFile(require.resolve('../config.base.js'));
return {
...baseConfig.getAll(),
browser: {
type: 'firefox',
},
suiteTags: {
include: ['includeFirefox'],
exclude: ['skipFirefox'],
},
};
}

View file

@ -0,0 +1,25 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/* eslint-disable import/no-default-export */
import { FtrConfigProviderContext } from '@kbn/test';
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const baseConfig = await readConfigFile(require.resolve('./config.base.ts'));
return {
...baseConfig.getAll(),
testFiles: [require.resolve('../apps/console')],
junit: {
reportName: 'Firefox UI Functional Tests - Console',
},
};
}

View file

@ -0,0 +1,28 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/* eslint-disable import/no-default-export */
import { FtrConfigProviderContext } from '@kbn/test';
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const baseConfig = await readConfigFile(require.resolve('./config.base.ts'));
return {
...baseConfig.getAll(),
testFiles: [
require.resolve('../apps/dashboard/group4/dashboard_save'),
require.resolve('../apps/dashboard_elements'),
],
junit: {
reportName: 'Firefox UI Functional Tests - Dashboard',
},
};
}

View file

@ -0,0 +1,29 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/* eslint-disable import/no-default-export */
import { FtrConfigProviderContext } from '@kbn/test';
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const baseConfig = await readConfigFile(require.resolve('./config.base.ts'));
return {
...baseConfig.getAll(),
testFiles: [
require.resolve('../apps/discover/classic'),
require.resolve('../apps/discover/group1'),
require.resolve('../apps/discover/group2'),
],
junit: {
reportName: 'Firefox UI Functional Tests - Discover',
},
};
}

View file

@ -0,0 +1,25 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/* eslint-disable import/no-default-export */
import { FtrConfigProviderContext } from '@kbn/test';
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const baseConfig = await readConfigFile(require.resolve('./config.base.ts'));
return {
...baseConfig.getAll(),
testFiles: [require.resolve('../apps/home')],
junit: {
reportName: 'Firefox UI Functional Tests - Home',
},
};
}

View file

@ -0,0 +1,25 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
/* eslint-disable import/no-default-export */
import { FtrConfigProviderContext } from '@kbn/test';
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const baseConfig = await readConfigFile(require.resolve('./config.base.ts'));
return {
...baseConfig.getAll(),
testFiles: [require.resolve('../apps/visualize/group5')],
junit: {
reportName: 'Firefox UI Functional Tests - Visualize',
},
};
}