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

[SIEM] Updates cypress readme with documentation about the test data. #62747

Merged
merged 2 commits into from
Apr 10, 2020

Conversation

MadameSheema
Copy link
Member

Summary

Updates cypress readme with documentation about the test data needed for the cypress tests to run in jenkins mode.

@MadameSheema MadameSheema added Team:SIEM v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.7.0 labels Apr 7, 2020
@MadameSheema MadameSheema requested a review from spong April 7, 2020 09:36
@MadameSheema MadameSheema requested a review from a team as a code owner April 7, 2020 09:36
@MadameSheema MadameSheema self-assigned this Apr 7, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

@rylnd
Copy link
Contributor

rylnd commented Apr 7, 2020

@MadameSheema tangential to this PR, but: I think we need another pass on this README now that we've consolidated on the "run against es_archiver data" approach.

While we now mention (in passing) that this is the "preferred" approach, we still dedicate a large section of the README to running tests against a local cluster without mentioning potential pitfalls there. For example, does it:

  • load es_archiver data into my local indexes?
  • delete my local indexes? update their mappings?
  • modify my existing data?
  • revert those changes after the test is complete?

As I mentioned in a previous comment, I realize that workflow has a legitimate use case, but I think that use case (and the above) needs to be clarified in the documentation.

Speaking from personal experience: at one point I ran the tests against my local indexes and it unexpectedly modified my data. I then had to rebuild said data in order to continue development, and I have not run tests in that manner since.

Copy link
Contributor

@rylnd rylnd left a comment

Choose a reason for hiding this comment

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

I had one comment about refactoring (and simplifying) this document in terms of developer workflows, but that's tangential to this PR. The documentation around this test data is greatly appreciated!

@@ -111,6 +111,112 @@ elasticsearch:
hosts: ['https://<server>:9200']
```

## Running (Headless) Tests on the Command Line as a Jenkins execution (The preferred way)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are "headless" and "as a jenkins execution" meaningful qualifiers for the audience of this document? In my mind I see two workflows that require documentation:

  1. Developers that want to run cypress tests locally, without waiting for CI (i.e. "executing cypress CI locally")
  2. Developers that are developing new tests, or debugging existing tests (i.e. "developing/debugging cypress tests")

For the first workflow, the only configuration that should be needed is "which test(s) to run." It would be nice to simplify the DX here and encapsulate this with a script that devs can run.

For the development/debugging workflow, there's a legitimate use case for stopping execution/modifying data/isolating tests, and my preference would be to organize this README from a workflow-centric perspective (but we can do that iteratively).

x-pack/legacy/plugins/siem/cypress/README.md Outdated Show resolved Hide resolved

Note that loading and unloading data takes a signifcant amount of time so try to minimize the use of it when possible.

### Current sets of data
Copy link
Contributor

Choose a reason for hiding this comment

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

Does es_archiver have a term for this? "dataset" or "archive" or "data archive"? It would help legibility to have consistent terminology (and perhaps even a glossary if necessary).

Copy link
Member

Choose a reason for hiding this comment

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

++ for settling on consistent terminology - from the help docs it looks like it's just archive.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! I'll open another PR to rename it from es_archives to archive since we have to change some functions names as well :)

Co-Authored-By: Ryland Herrick <ryalnd@gmail.com>
@MadameSheema MadameSheema merged commit 34b1d0a into elastic:master Apr 10, 2020
@MadameSheema MadameSheema deleted the updates-readme branch April 10, 2020 09:29
MadameSheema added a commit to MadameSheema/kibana that referenced this pull request Apr 13, 2020
…elastic#62747)

* updates test data section

* Update x-pack/legacy/plugins/siem/cypress/README.md

Co-Authored-By: Ryland Herrick <ryalnd@gmail.com>

Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
MadameSheema added a commit to MadameSheema/kibana that referenced this pull request Apr 13, 2020
…elastic#62747)

* updates test data section

* Update x-pack/legacy/plugins/siem/cypress/README.md

Co-Authored-By: Ryland Herrick <ryalnd@gmail.com>

Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
MadameSheema added a commit that referenced this pull request Apr 13, 2020
…#62747) (#63346)

* updates test data section

* Update x-pack/legacy/plugins/siem/cypress/README.md

Co-Authored-By: Ryland Herrick <ryalnd@gmail.com>

Co-authored-by: Ryland Herrick <ryalnd@gmail.com>

Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
MadameSheema added a commit that referenced this pull request Apr 13, 2020
…#62747) (#63347)

* updates test data section

* Update x-pack/legacy/plugins/siem/cypress/README.md

Co-Authored-By: Ryland Herrick <ryalnd@gmail.com>

Co-authored-by: Ryland Herrick <ryalnd@gmail.com>

Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
@MindyRS MindyRS added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Sep 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants