mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[ML] Functional tests - split anomaly detection test config (#140430)
This PR splits the ML functional anomaly detection test configuration into smaller parts.
This commit is contained in:
parent
30af54d0a0
commit
2068b2eead
29 changed files with 129 additions and 29 deletions
|
@ -184,7 +184,9 @@ enabled:
|
|||
- x-pack/test/functional/apps/maps/group2/config.ts
|
||||
- x-pack/test/functional/apps/maps/group3/config.ts
|
||||
- x-pack/test/functional/apps/maps/group4/config.ts
|
||||
- x-pack/test/functional/apps/ml/anomaly_detection/config.ts
|
||||
- x-pack/test/functional/apps/ml/anomaly_detection_jobs/config.ts
|
||||
- x-pack/test/functional/apps/ml/anomaly_detection_integrations/config.ts
|
||||
- x-pack/test/functional/apps/ml/anomaly_detection_result_views/config.ts
|
||||
- x-pack/test/functional/apps/ml/data_frame_analytics/config.ts
|
||||
- x-pack/test/functional/apps/ml/data_visualizer/config.ts
|
||||
- x-pack/test/functional/apps/ml/permissions/config.ts
|
||||
|
|
|
@ -117,7 +117,9 @@ With PATH_TO_CONFIG and other options as follows.
|
|||
|
||||
Group | PATH_TO_CONFIG
|
||||
----- | --------------
|
||||
anomaly detection | `test/functional/apps/ml/anomaly_detection/config.ts`
|
||||
anomaly detection jobs | `test/functional/apps/ml/anomaly_detection_jobs/config.ts`
|
||||
anomaly detection result views | `test/functional/apps/ml/anomaly_detection_result_views/config.ts`
|
||||
anomaly detection integrations | `test/functional/apps/ml/anomaly_detection_integrations/config.ts`
|
||||
data frame analytics | `test/functional/apps/ml/data_frame_analytics/config.ts`
|
||||
data visualizer | `test/functional/apps/ml/data_visualizer/config.ts`
|
||||
permissions | `test/functional/apps/ml/permissions/config.ts`
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
import { JOB_CONFIG, DATAFEED_CONFIG, ML_EMBEDDABLE_TYPES } from './constants';
|
||||
|
||||
const testDataList = [
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
import { JOB_CONFIG, DATAFEED_CONFIG, ML_EMBEDDABLE_TYPES } from './constants';
|
||||
|
||||
const testDataList = [
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* 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';
|
||||
|
||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||
const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js'));
|
||||
|
||||
return {
|
||||
...functionalConfig.getAll(),
|
||||
testFiles: [require.resolve('.')],
|
||||
junit: {
|
||||
reportName: 'Chrome X-Pack UI Functional Tests - ML anomaly_detection_integrations',
|
||||
},
|
||||
};
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* 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';
|
||||
|
||||
export default function ({ getService, loadTestFile }: FtrProviderContext) {
|
||||
const esArchiver = getService('esArchiver');
|
||||
const ml = getService('ml');
|
||||
|
||||
describe('machine learning - anomaly detection', function () {
|
||||
this.tags(['skipFirefox']);
|
||||
|
||||
before(async () => {
|
||||
await ml.securityCommon.createMlRoles();
|
||||
await ml.securityCommon.createMlUsers();
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
// NOTE: Logout needs to happen before anything else to avoid flaky behavior
|
||||
await ml.securityUI.logout();
|
||||
|
||||
await ml.securityCommon.cleanMlUsers();
|
||||
await ml.securityCommon.cleanMlRoles();
|
||||
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/ml/farequote');
|
||||
|
||||
await ml.testResources.resetKibanaTimeZone();
|
||||
});
|
||||
|
||||
loadTestFile(require.resolve('./anomaly_charts_dashboard_embeddables'));
|
||||
loadTestFile(require.resolve('./anomaly_embeddables_migration'));
|
||||
loadTestFile(require.resolve('./lens_to_ml'));
|
||||
loadTestFile(require.resolve('./lens_to_ml_with_wizard'));
|
||||
});
|
||||
}
|
|
@ -14,7 +14,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
|||
...functionalConfig.getAll(),
|
||||
testFiles: [require.resolve('.')],
|
||||
junit: {
|
||||
reportName: 'Chrome X-Pack UI Functional Tests - ML anomaly_detection',
|
||||
reportName: 'Chrome X-Pack UI Functional Tests - ML anomaly_detection_jobs',
|
||||
},
|
||||
};
|
||||
}
|
|
@ -40,15 +40,8 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
|
|||
loadTestFile(require.resolve('./population_job'));
|
||||
loadTestFile(require.resolve('./saved_search_job'));
|
||||
loadTestFile(require.resolve('./advanced_job'));
|
||||
loadTestFile(require.resolve('./single_metric_viewer'));
|
||||
loadTestFile(require.resolve('./anomaly_explorer'));
|
||||
loadTestFile(require.resolve('./categorization_job'));
|
||||
loadTestFile(require.resolve('./date_nanos_job'));
|
||||
loadTestFile(require.resolve('./annotations'));
|
||||
loadTestFile(require.resolve('./aggregated_scripted_job'));
|
||||
loadTestFile(require.resolve('./custom_urls'));
|
||||
loadTestFile(require.resolve('./forecasts'));
|
||||
loadTestFile(require.resolve('./lens_to_ml'));
|
||||
loadTestFile(require.resolve('./lens_to_ml_with_wizard'));
|
||||
});
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* 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';
|
||||
|
||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||
const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js'));
|
||||
|
||||
return {
|
||||
...functionalConfig.getAll(),
|
||||
testFiles: [require.resolve('.')],
|
||||
junit: {
|
||||
reportName: 'Chrome X-Pack UI Functional Tests - ML anomaly_detection_result_views',
|
||||
},
|
||||
};
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* 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';
|
||||
|
||||
export default function ({ getService, loadTestFile }: FtrProviderContext) {
|
||||
const esArchiver = getService('esArchiver');
|
||||
const ml = getService('ml');
|
||||
|
||||
describe('machine learning - anomaly detection', function () {
|
||||
this.tags(['skipFirefox']);
|
||||
|
||||
before(async () => {
|
||||
await ml.securityCommon.createMlRoles();
|
||||
await ml.securityCommon.createMlUsers();
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
// NOTE: Logout needs to happen before anything else to avoid flaky behavior
|
||||
await ml.securityUI.logout();
|
||||
|
||||
await ml.securityCommon.cleanMlUsers();
|
||||
await ml.securityCommon.cleanMlRoles();
|
||||
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/ml/farequote');
|
||||
await esArchiver.unload('x-pack/test/functional/es_archives/ml/ecommerce');
|
||||
|
||||
await ml.testResources.resetKibanaTimeZone();
|
||||
});
|
||||
|
||||
loadTestFile(require.resolve('./aggregated_scripted_job'));
|
||||
loadTestFile(require.resolve('./annotations'));
|
||||
loadTestFile(require.resolve('./anomaly_explorer'));
|
||||
loadTestFile(require.resolve('./forecasts'));
|
||||
loadTestFile(require.resolve('./single_metric_viewer'));
|
||||
});
|
||||
}
|
|
@ -1,16 +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; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { FtrProviderContext } from '../../../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile }: FtrProviderContext) {
|
||||
describe('embeddables', function () {
|
||||
this.tags(['skipFirefox']);
|
||||
loadTestFile(require.resolve('./anomaly_charts_dashboard_embeddables'));
|
||||
loadTestFile(require.resolve('./anomaly_embeddables_migration'));
|
||||
});
|
||||
}
|
|
@ -33,6 +33,5 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) {
|
|||
loadTestFile(require.resolve('./model_management'));
|
||||
loadTestFile(require.resolve('./feature_controls'));
|
||||
loadTestFile(require.resolve('./settings'));
|
||||
loadTestFile(require.resolve('./embeddables'));
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue