mozilla / frost

Unit testing framework for test driven security of AWS, GCP, Heroku and more.
https://mozilla.github.io/frost/
Mozilla Public License 2.0
104 stars 24 forks source link

Create groupings of tests / pre-defined test suites #386

Open ajvb opened 3 years ago

ajvb commented 3 years ago

A feature that has been asked for a couple of times is the ability to have predefined groups of tests that can be run, instead of having to list each test individually within a frost test ... command.

These could be groups like "security" and "cost-optimization". As well they could be grouped by severity, especially the security related tests.

There seem to be two main reasons for wanting this:

  1. When new tests are added to frost or we want to enable an existing test, a lot of copy+paste has to be done within our automation code to make sure each AWS account or GCP folder is running this test. As well, if a user who is unfamiliar with the automation wants to add a new test, there is a barrier for entry that is unnecessary.
  2. For new users to Frost, there has been a desire expressed around wanting a "default set of tests" to start with. Being able to run something like frost test starter --aws-profile my-account could be a great beginner UX for Frost.
ajvb commented 3 years ago

@g-k @sciurus does this capture the various discussions around this well enough or did I miss stuff?

sciurus commented 3 years ago

Yep!

g-k commented 3 years ago

Sounds great! Nice summary.

g-k commented 3 years ago

Implementation proposal:

It'd be better to use pytest markers, but that'd require moving data fetching from the pytest collect phase, which would be a larger change.

ajvb commented 3 years ago

@g-k Why not wrap the -m MARKEXPR pytest CLI argument? But as well, it might be worth defining the groupings we want first.