kibana/x-pack/solutions/security/plugins/security_solution
Dzmitry Lemechko 868a4657ee
[ska] relocate api_integration_basic & defend_workflows_cypress tests (#225374)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

Before:

```
x-pack/test/
     | - api_integration_basic/
     | - defend_workflows_cypress/
```

After: 
```
x-pack/solutions/security/test/
     | - api_integration_basic/
     | - defend_workflows_cypress/
```

---------

Co-authored-by: Cesare de Cal <cesare.decal@elastic.co>
2025-06-26 17:43:58 +01:00
..
.storybook
common [Security Solution] Adds ability to revert prebuilt rules to their base version (#223301) 2025-06-26 13:48:37 +02:00
docs [Security Solution] Test plan for reverting customized prebuilt rules to their base version (#219628) 2025-06-26 14:04:47 +00:00
public [ska] relocate api_integration_basic & defend_workflows_cypress tests (#225374) 2025-06-26 17:43:58 +01:00
scripts [Security Solution] [AI assistant ] Fix error where llm.bindTools is not a function. (#225268) 2025-06-26 15:22:01 +01:00
server [Security Solution] [AI assistant ] Fix error where llm.bindTools is not a function. (#225268) 2025-06-26 15:22:01 +01:00
ui_tests [kbn/response-ops-alerts-table] set data-test-subj for EuiDataGrid based on loading status (#217230) 2025-04-15 13:05:49 +02:00
emotion.d.ts [Security Solution] [EUI Refresh] [Explore page] Migrate styled-components (#207318) 2025-01-30 13:24:05 +01:00
jest.config.dev.js
jest.integration.config.js
kibana.jsonc [Security Solution] [AI assistant] Make the Security AI assistant global (#223936) 2025-06-24 19:11:43 +01:00
package.json [ska] relocate api_integration_basic & defend_workflows_cypress tests (#225374) 2025-06-26 17:43:58 +01:00
README.md Sustainable Kibana Architecture: Move modules owned by @elastic/fleet (#202422) 2024-12-24 15:32:43 +01:00
tsconfig.json [Security Solution] [AI assistant ] Fix error where llm.bindTools is not a function. (#225268) 2025-06-26 15:22:01 +01:00

Security Solution

Welcome to the Kibana Security Solution plugin! This README will go over getting started with development and testing.

Development

Tests

The endpoint specific tests leverage the ingest manager to install the endpoint package. Before the api integration and functional tests are run the ingest manager is initialized. This initialization process includes reaching out to a package registry service to install the endpoint package. The endpoint tests support three different ways to run the tests given the constraint on an available package registry.

  1. Using Docker
  2. Running your own local package registry
  3. Using the default external package registry

These scenarios will be outlined the sections below.

Endpoint API Integration Tests Location

The endpoint api integration tests are located here

Endpoint Functional Tests Location

The endpoint functional tests are located here

Using Docker

To run the tests using the recommended docker image version you must have docker installed. The testing infrastructure will stand up a docker container using the image defined here

Make sure you're in the Kibana root directory.

Endpoint API Integration Tests

In one terminal, run:

FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:server --config x-pack/test/security_solution_endpoint_api_int/config.ts

In another terminal, run:

FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:runner --config x-pack/test/security_solution_endpoint_api_int/config.ts

Endpoint Functional Tests

In one terminal, run:

FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:server --config x-pack/test/security_solution_endpoint/config.ts

In another terminal, run:

FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:runner --config x-pack/test/security_solution_endpoint/config.ts

Running your own package registry

If you are doing endpoint package development it will be useful to run your own package registry to serve the latest package you're building. To do this use the following commands:

Make sure you're in the Kibana root directory.

Endpoint API Integration Tests

In one terminal, run:

PACKAGE_REGISTRY_URL_OVERRIDE=<url to your package registry like http://localhost:8080> yarn test:ftr:server --config x-pack/test/security_solution_endpoint_api_int/config.ts

In another terminal, run:

PACKAGE_REGISTRY_URL_OVERRIDE=<url to your package registry like http://localhost:8080>  yarn test:ftr:runner --config x-pack/test/security_solution_endpoint_api_int/config.ts

Endpoint Functional Tests

In one terminal, run:

PACKAGE_REGISTRY_URL_OVERRIDE=<url to your package registry like http://localhost:8080> yarn test:ftr:server --config x-pack/test/security_solution_endpoint/config.ts

In another terminal, run:

PACKAGE_REGISTRY_URL_OVERRIDE=<url to your package registry like http://localhost:8080>  yarn test:ftr:runner --config x-pack/test/security_solution_endpoint/config.ts

Using the default public registry

If you don't have docker installed and don't want to run your own registry, you can run the tests using the ingest manager's default public package registry. The actual package registry used is here

Make sure you're in the Kibana root directory.

Endpoint API Integration Tests

In one terminal, run:

yarn test:ftr:server --config x-pack/test/security_solution_endpoint_api_int/config.ts

In another terminal, run:

yarn test:ftr:runner --config x-pack/test/security_solution_endpoint_api_int/config.ts

Endpoint Functional Tests

In one terminal, run:

yarn test:ftr:server --config x-pack/test/security_solution_endpoint/config.ts

In another terminal, run:

yarn test:ftr:runner --config x-pack/test/security_solution_endpoint/config.ts

Generate huge amount of indices with huge amount of fields

The result of this operation will be 10 separate bucket folders within mappings_folder. Each bucket folder will contain a mappings.json file describing 50 indices.

yarn mappings:generate --fieldsCount=10000 --indexCount=500 --indexPrefix='.ds-huge' --unmappedRate=.2 --buckets=10 --outputDirectory='mappings_folder'

Load generated mappings

yarn mappings:load --mappings-dir='mappings_folder' --es-url=http://username:password@localhost:9200 --kibana-url=http://username:password@localhost:5601/app