mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[performance] use journey own ftr config to run scalability test (#152596)
While debugging scalability testing failure for `cloud_security_dashboard` journey, I found that we hardcoded base FTR config to `x-pack/performance/journeys/login.ts` and main issue is that Kibana is not started properly. This PR makes few changes: - update `kbn-performance-testing-dataset-extractor` to save journey path as `configPath` so it can be later used to start ES/Kibana in the scalability run with the same configuration it was run for the single user journey run. - update scalability entry configuration to read base FTR config from generated scalability json file (`configPath` property) How to test: - make sure to clone the latest [kibana-load-testing](https://github.com/elastic/kibana-load-testing) repo and build it `mvn clean test-compile` - from kibana root directory run any api capacity test ``` node scripts/run_scalability.js --journey-path x-pack/test/scalability/apis/api.core.capabilities.json ``` Expected result: logs should display ``` debg Loading config file from x-pack/performance/journeys/login.ts ``` - download the latest artifacts from [buildkite](https://buildkite.com/elastic/kibana-performance-data-set-extraction/builds/171#0186a342-9dea-4a9b-bbe4-c96449563269), find `cloud_security_dashboard-<uuid>.json` - from kibana root directory run scalability test for `cloud_security_dashboard` journey ``` node scripts/run_scalability.js --journey-path <path to cloud_security_dashboard-<uuid>.json> ``` Expected result: logs should display ``` debg Loading config file from x-pack/performance/journeys/cloud_security_dashboard.ts ``` Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
4f5037f985
commit
bc44f524ac
5 changed files with 9 additions and 4 deletions
|
@ -77,6 +77,7 @@ export async function runExtractor() {
|
||||||
return extractor({
|
return extractor({
|
||||||
param: {
|
param: {
|
||||||
journeyName: journey.config.getName(),
|
journeyName: journey.config.getName(),
|
||||||
|
configPath,
|
||||||
scalabilitySetup,
|
scalabilitySetup,
|
||||||
testData,
|
testData,
|
||||||
buildId,
|
buildId,
|
||||||
|
|
|
@ -42,7 +42,8 @@ export const extractor = async ({ param, client, log }: CLIParams) => {
|
||||||
username: client.username,
|
username: client.username,
|
||||||
password: client.password,
|
password: client.password,
|
||||||
};
|
};
|
||||||
const { journeyName, scalabilitySetup, testData, buildId, withoutStaticResources } = param;
|
const { journeyName, configPath, scalabilitySetup, testData, buildId, withoutStaticResources } =
|
||||||
|
param;
|
||||||
log.info(
|
log.info(
|
||||||
`Searching transactions with 'labels.testBuildId=${buildId}' and 'labels.journeyName=${journeyName}'`
|
`Searching transactions with 'labels.testBuildId=${buildId}' and 'labels.journeyName=${journeyName}'`
|
||||||
);
|
);
|
||||||
|
@ -87,6 +88,7 @@ export const extractor = async ({ param, client, log }: CLIParams) => {
|
||||||
await saveFile(
|
await saveFile(
|
||||||
{
|
{
|
||||||
journeyName,
|
journeyName,
|
||||||
|
configPath,
|
||||||
kibanaVersion,
|
kibanaVersion,
|
||||||
scalabilitySetup,
|
scalabilitySetup,
|
||||||
testData,
|
testData,
|
||||||
|
@ -101,6 +103,7 @@ export const extractor = async ({ param, client, log }: CLIParams) => {
|
||||||
await saveFile(
|
await saveFile(
|
||||||
{
|
{
|
||||||
journeyName,
|
journeyName,
|
||||||
|
configPath,
|
||||||
kibanaVersion,
|
kibanaVersion,
|
||||||
testData,
|
testData,
|
||||||
streams: esStreams,
|
streams: esStreams,
|
||||||
|
|
|
@ -40,6 +40,7 @@ export interface TestData {
|
||||||
export interface CLIParams {
|
export interface CLIParams {
|
||||||
param: {
|
param: {
|
||||||
journeyName: string;
|
journeyName: string;
|
||||||
|
configPath: string;
|
||||||
scalabilitySetup?: ScalabilitySetup;
|
scalabilitySetup?: ScalabilitySetup;
|
||||||
testData: TestData;
|
testData: TestData;
|
||||||
buildId: string;
|
buildId: string;
|
||||||
|
|
|
@ -42,10 +42,9 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const journey: ScalabilityJourney = JSON.parse(fs.readFileSync(scalabilityJsonPath, 'utf8'));
|
const journey: ScalabilityJourney = JSON.parse(fs.readFileSync(scalabilityJsonPath, 'utf8'));
|
||||||
|
const configPath = journey.configPath ?? 'x-pack/performance/journeys/login.ts';
|
||||||
|
|
||||||
const baseConfig = (
|
const baseConfig = (await readConfigFile(path.resolve(REPO_ROOT, configPath))).getAll();
|
||||||
await readConfigFile(require.resolve('../../performance/journeys/login.ts'))
|
|
||||||
).getAll();
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...baseConfig,
|
...baseConfig,
|
||||||
|
|
|
@ -9,6 +9,7 @@ import { ScalabilitySetup } from '@kbn/journeys';
|
||||||
|
|
||||||
export interface ScalabilityJourney {
|
export interface ScalabilityJourney {
|
||||||
journeyName: string;
|
journeyName: string;
|
||||||
|
configPath?: string;
|
||||||
scalabilitySetup: ScalabilitySetup;
|
scalabilitySetup: ScalabilitySetup;
|
||||||
testData?: {
|
testData?: {
|
||||||
esArchives: string[];
|
esArchives: string[];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue