Open MadameSheema opened 5 months ago
Pinging @elastic/security-entity-analytics (Team:Entity Analytics)
Pinging @elastic/security-solution (Team: SecuritySolution)
@MadameSheema, Could you share some documentation about MKI tests? How do we run it locally?
Hey @machadoum you'll find all the info at the Cypress readme but let me summarize it here:
Setup a valid Elastic Cloud API key for QA environment:
User menu button
located on the top right of the header.Organization
.API keys
tab.Create API key
button.Create API key
Store the saved key on ~/.elastic/cloud.json
using the following format:
{
"api_key": {
"qa": "<API_KEY>"
}
}
Store the email and password of the account you used to login in the QA Environment at the root directory of your Kibana project on .ftr/role_users.json
, using the following format:
{
"admin": {
"email": "<email>",
"password": "<password>"
}
}
If you want to execute a test using Cypress on visual mode with MKI, you need to make sure you have the user created in your organization, and add it to the .ftr/role_users.json
:
{
"admin": {
"email": "<email>",
"password": "<password>"
},
"<roleName>": {
"email": "<email>",
"password": "<password>"
}
}
As role names please use:
The above should be the same used on the automation.
When running serverless Cypress tests on QA environment, the following PLIs are set by default:
{ product_line: 'security', product_tier: 'complete' },
{ product_line: 'endpoint', product_tier: 'complete' },
{ product_line: 'cloud', product_tier: 'complete' },
With the above configuration we'll be able to cover most of the scenarios, but there are some cases were we might want to use a different configuration. In that case, we just need to pass to the header of the test, which is the configuration we want for it.
describe(
'Entity Analytics Dashboard in Serverless',
{
tags: '@serverless',
env: {
ftrConfig: {
productTypes: [
{ product_line: 'security', product_tier: 'essentials' },
{ product_line: 'endpoint', product_tier: 'essentials' },
],
},
},
},
For test developing or test debugging purposes on QA, you have avaialable the following options:
yarn cypress:open:qa:serverless --tier <essentials|complete>
The above command will open the Cypress UI with all tests in the e2e
directory tagged as SERVERLESS. This also creates an MKI project in console.qa enviornment with the passed tier essentials or complete. If no flag is passed, the project will be cretaed as complete.
yarn cypress:open:qa:serverless --no-endpoint-addon
The above command will open the Cypress UI with all tests in the e2e
directory tagged as SERVERLESS. This also creates an MKI project in console.qa enviornment without the endpoint add-on.
yarn cypress:open:qa:serverless --no-cloud-addon
The above command will open the Cypress UI with all tests in the e2e
directory tagged as SERVERLESS. This also creates an MKI project in console.qa enviornment without the cloud add-on.
Note that all the above flags can be combined.
To run on the default configuration in serverless QA:
export QA_CONSOLE_URL="https://console.qa.cld.elstc.co"
Navigate to x-pack/test/security_solution_cypress
Execute:
yarn cypress:open:qa:serverless
Feel free to ping me if you need any further information :)
@MadameSheema I don't know how to run my local Kibana code on MKI, so my debugging options are limited. From what I could investigate, it seems like the test fails because the feature flag is disabled on the MKI environment. Do you know why it is disabled only for MKI?
Hey @machadoum really sorry about coming back that late to your message!!
Feature flags does not work on MKI environments, that is a known limitation, you cannot disable and enable FF through configuration on serverless as we do with ESS. Kibana is planning to ad a mechanism soon.
Thanks!
@MadameSheema any idea if there's a GitHub issue that we can track for "Kibana is planning to ad a mechanism soon"?
@MadameSheema any idea if there's a GitHub issue that we can track for "Kibana is planning to ad a mechanism soon"?
Not that I'm aware of
The test
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_flyout.cy.ts - should show okta and azure managed data sections and expand panel
is failing in MKI environments.