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

[Discover] Split functional tests in more groups #180046

Merged
merged 11 commits into from
Apr 24, 2024
Merged
8 changes: 7 additions & 1 deletion .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,15 @@ enabled:
- test/functional/apps/discover/classic/config.ts
- test/functional/apps/discover/embeddable/config.ts
- test/functional/apps/discover/group1/config.ts
- test/functional/apps/discover/group2/config.ts
- test/functional/apps/discover/group2_data_grid1/config.ts
- test/functional/apps/discover/group2_data_grid2/config.ts
- test/functional/apps/discover/group2_data_grid3/config.ts
- test/functional/apps/discover/group3/config.ts
- test/functional/apps/discover/group4/config.ts
- test/functional/apps/discover/group5/config.ts
- test/functional/apps/discover/group6/config.ts
- test/functional/apps/discover/group7/config.ts
- test/functional/apps/discover/group8/config.ts
Copy link
Member

Choose a reason for hiding this comment

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

Just curious, how much quicker is it, generally speaking?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wayneseymour These are the times for the new groups:

Screenshot 2024-04-16 at 19 52 24

https://buildkite.com/elastic/kibana-pull-request/builds/201107#018ea964-5b6b-436c-9b49-b2daf1e30abd

And these tests were inside other groups previously. So it's somewhat around 40-50%.

Copy link
Member

Choose a reason for hiding this comment

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

awesome

- test/functional/apps/getting_started/config.ts
- test/functional/apps/home/config.ts
- test/functional/apps/kibana_overview/config.ts
Expand Down
10 changes: 0 additions & 10 deletions test/functional/apps/discover/group1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,13 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
});

loadTestFile(require.resolve('./_no_data'));
loadTestFile(require.resolve('./_discover'));
loadTestFile(require.resolve('./_discover_accessibility'));
loadTestFile(require.resolve('./_discover_histogram_breakdown'));
loadTestFile(require.resolve('./_discover_histogram'));
loadTestFile(require.resolve('./_doc_accessibility'));
loadTestFile(require.resolve('./_filter_editor'));
loadTestFile(require.resolve('./_errors'));
loadTestFile(require.resolve('./_field_data'));
loadTestFile(require.resolve('./_field_data_with_fields_api'));
loadTestFile(require.resolve('./_shared_links'));
loadTestFile(require.resolve('./_source_filters'));
loadTestFile(require.resolve('./_large_string'));
loadTestFile(require.resolve('./_greeting_screen'));
loadTestFile(require.resolve('./_inspector'));
loadTestFile(require.resolve('./_date_nanos'));
loadTestFile(require.resolve('./_date_nanos_mixed'));
loadTestFile(require.resolve('./_url_state'));
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const browser = getService('browser');

describe('discover/group2', function () {
describe('discover/group2/data_grid1', function () {
before(async function () {
await browser.setWindowSize(1600, 1200);
});
Expand All @@ -22,16 +22,8 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {

loadTestFile(require.resolve('./_data_grid'));
loadTestFile(require.resolve('./_data_grid_context'));
loadTestFile(require.resolve('./_data_grid_field_data'));
loadTestFile(require.resolve('./_data_grid_doc_navigation'));
loadTestFile(require.resolve('./_data_grid_row_navigation'));
loadTestFile(require.resolve('./_data_grid_doc_table'));
loadTestFile(require.resolve('./_data_grid_copy_to_clipboard'));
loadTestFile(require.resolve('./_data_grid_row_height'));
loadTestFile(require.resolve('./_data_grid_new_line'));
loadTestFile(require.resolve('./_data_grid_sample_size'));
loadTestFile(require.resolve('./_data_grid_pagination'));
loadTestFile(require.resolve('./_data_grid_footer'));
loadTestFile(require.resolve('./_data_grid_field_tokens'));
});
}
18 changes: 18 additions & 0 deletions test/functional/apps/discover/group2_data_grid2/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* 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.
*/

import { FtrConfigProviderContext } from '@kbn/test';

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js'));

return {
...functionalConfig.getAll(),
testFiles: [require.resolve('.')],
};
}
28 changes: 28 additions & 0 deletions test/functional/apps/discover/group2_data_grid2/index.ts
Original file line number Diff line number Diff line change
@@ -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.
*/
import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ getService, loadTestFile }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const browser = getService('browser');

describe('discover/group2/data_grid2', function () {
before(async function () {
await browser.setWindowSize(1600, 1200);
});

after(async function unloadMakelogs() {
await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
});

loadTestFile(require.resolve('./_data_grid_new_line'));
loadTestFile(require.resolve('./_data_grid_footer'));
loadTestFile(require.resolve('./_data_grid_field_data'));
loadTestFile(require.resolve('./_data_grid_field_tokens'));
});
}
18 changes: 18 additions & 0 deletions test/functional/apps/discover/group2_data_grid3/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* 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.
*/

import { FtrConfigProviderContext } from '@kbn/test';

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js'));

return {
...functionalConfig.getAll(),
testFiles: [require.resolve('.')],
};
}
28 changes: 28 additions & 0 deletions test/functional/apps/discover/group2_data_grid3/index.ts
Original file line number Diff line number Diff line change
@@ -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.
*/
import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ getService, loadTestFile }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const browser = getService('browser');

describe('discover/group2/data_grid3', function () {
before(async function () {
await browser.setWindowSize(1600, 1200);
});

after(async function unloadMakelogs() {
await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
});

loadTestFile(require.resolve('./_data_grid_row_navigation'));
loadTestFile(require.resolve('./_data_grid_row_height'));
loadTestFile(require.resolve('./_data_grid_sample_size'));
loadTestFile(require.resolve('./_data_grid_pagination'));
});
}
5 changes: 0 additions & 5 deletions test/functional/apps/discover/group3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,9 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
});

loadTestFile(require.resolve('./_default_columns'));
loadTestFile(require.resolve('./_time_field_column'));
loadTestFile(require.resolve('./_drag_drop'));
loadTestFile(require.resolve('./_sidebar'));
loadTestFile(require.resolve('./_sidebar_field_stats'));
loadTestFile(require.resolve('./_request_counts'));
loadTestFile(require.resolve('./_doc_viewer'));
loadTestFile(require.resolve('./_view_mode_toggle'));
loadTestFile(require.resolve('./_unsaved_changes_badge'));
loadTestFile(require.resolve('./_panels_toggle'));
loadTestFile(require.resolve('./_lens_vis'));
});
Expand Down
8 changes: 0 additions & 8 deletions test/functional/apps/discover/group4/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,14 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
});

loadTestFile(require.resolve('./_indexpattern_without_timefield'));
loadTestFile(require.resolve('./_discover_fields_api'));
loadTestFile(require.resolve('./_adhoc_data_views'));
loadTestFile(require.resolve('./_esql_view'));
loadTestFile(require.resolve('./_indexpattern_with_unmapped_fields'));
loadTestFile(require.resolve('./_runtime_fields_editor'));
loadTestFile(require.resolve('./_huge_fields'));
loadTestFile(require.resolve('./_date_nested'));
loadTestFile(require.resolve('./_search_on_page_load'));
loadTestFile(require.resolve('./_chart_hidden'));
loadTestFile(require.resolve('./_context_encoded_url_params'));
loadTestFile(require.resolve('./_hide_announcements'));
loadTestFile(require.resolve('./_data_view_edit'));
loadTestFile(require.resolve('./_field_list_new_fields'));
loadTestFile(require.resolve('./_request_cancellation'));
loadTestFile(require.resolve('./_new_search'));
loadTestFile(require.resolve('./_document_comparison'));
});
}
18 changes: 18 additions & 0 deletions test/functional/apps/discover/group5/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* 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.
*/

import { FtrConfigProviderContext } from '@kbn/test';

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js'));

return {
...functionalConfig.getAll(),
testFiles: [require.resolve('.')],
};
}
34 changes: 34 additions & 0 deletions test/functional/apps/discover/group5/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* 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.
*/
import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ getService, loadTestFile }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const browser = getService('browser');

describe('discover/group5', function () {
before(async function () {
await browser.setWindowSize(1300, 800);
});

after(async function unloadMakelogs() {
await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
});

loadTestFile(require.resolve('./_no_data'));
loadTestFile(require.resolve('./_filter_editor'));
loadTestFile(require.resolve('./_field_data'));
loadTestFile(require.resolve('./_field_data_with_fields_api'));
loadTestFile(require.resolve('./_shared_links'));
loadTestFile(require.resolve('./_source_filters'));
loadTestFile(require.resolve('./_large_string'));
loadTestFile(require.resolve('./_greeting_screen'));
loadTestFile(require.resolve('./_inspector'));
loadTestFile(require.resolve('./_url_state'));
});
}
18 changes: 18 additions & 0 deletions test/functional/apps/discover/group6/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* 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.
*/

import { FtrConfigProviderContext } from '@kbn/test';

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js'));

return {
...functionalConfig.getAll(),
testFiles: [require.resolve('.')],
};
}
29 changes: 29 additions & 0 deletions test/functional/apps/discover/group6/index.ts
Original file line number Diff line number Diff line change
@@ -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.
*/
import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ getService, loadTestFile }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const browser = getService('browser');

describe('discover/group6', function () {
before(async function () {
await browser.setWindowSize(1300, 800);
});

after(async function unloadMakelogs() {
await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
});

loadTestFile(require.resolve('./_sidebar'));
loadTestFile(require.resolve('./_sidebar_field_stats'));
loadTestFile(require.resolve('./_time_field_column'));
loadTestFile(require.resolve('./_unsaved_changes_badge'));
loadTestFile(require.resolve('./_view_mode_toggle'));
});
}
18 changes: 18 additions & 0 deletions test/functional/apps/discover/group7/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* 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.
*/

import { FtrConfigProviderContext } from '@kbn/test';

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js'));

return {
...functionalConfig.getAll(),
testFiles: [require.resolve('.')],
};
}
31 changes: 31 additions & 0 deletions test/functional/apps/discover/group7/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* 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.
*/
import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ getService, loadTestFile }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const browser = getService('browser');

describe('discover/group7', function () {
before(async function () {
await browser.setWindowSize(1600, 1200);
});

after(async function unloadMakelogs() {
await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
});

loadTestFile(require.resolve('./_indexpattern_without_timefield'));
loadTestFile(require.resolve('./_indexpattern_with_unmapped_fields'));
loadTestFile(require.resolve('./_runtime_fields_editor'));
loadTestFile(require.resolve('./_huge_fields'));
loadTestFile(require.resolve('./_search_on_page_load'));
loadTestFile(require.resolve('./_request_cancellation'));
loadTestFile(require.resolve('./_new_search'));
});
}
18 changes: 18 additions & 0 deletions test/functional/apps/discover/group8/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* 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.
*/

import { FtrConfigProviderContext } from '@kbn/test';

export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js'));

return {
...functionalConfig.getAll(),
testFiles: [require.resolve('.')],
};
}
25 changes: 25 additions & 0 deletions test/functional/apps/discover/group8/index.ts
Original file line number Diff line number Diff line change
@@ -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.
*/
import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ getService, loadTestFile }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const browser = getService('browser');

describe('discover/group8', function () {
before(async function () {
await browser.setWindowSize(1600, 1200);
});

after(async function unloadMakelogs() {
await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional');
});

loadTestFile(require.resolve('./_hide_announcements'));
});
}
Loading