Gradle tasks names
When running gradle I think we will want to perform the following actions: build, deploy, and test. Because our tests are a little special think we should split that up into test-all, test-unit, test-selenium, test-alexa-top-10. Those tests should all run in the background and be self contained with no side effects (i.e. they should work whether ZAP is already running or not, they should not delete any configuration settings, etc..) If we want to use an existing ZAP process ( to save time) we should use a gradle task flag --use-running-zap that maybe specificies a port that you already have ZAP running on. (i.e. gradle test-tutorial --use-running-zap 8080)
So this is how I would want to use it:
- to build:
gradle build - to deploy:
gradle deploy(this would also run the build steps) - to run unit tests:
gradle test-unit - to run all selenium tests
gradle test-selenium(this would include tutorial and non tutorial tests) - to run just tutorial tests
gradle test-selenium-tutorial - to run against the alexa top 10
gradle alexa-top-10(orgradle selenium-alexa-top-10if we like that naming convention better) - to run all tests
gradle test-all(or justgradle testmight be okay. maybegradle testwould just display a prompt about the different test tasks.. so new contributors could understand)
and then if you wanted to run selenium tests against an already running ZAP instance use the --use-running-zap PORT flag.
What are y'alls thoughts about this @psiinon @thc202 ? I'm sure there a lot of nuances I'm not considering or other things, but this is what would be the most intuitive way for me to run these tasks.
I agree with more fine grained test tasks. Although we should use camel case for the task names, that's the expected case in Gradle.
Hopefully with the changes done in #237 the deploy should no longer be needed in majority of the cases. Feedback about the new task names are very welcome.