I suspect that what I am trying to do is something that has been done before. Hopefully, this is possible and someone knows how its done. Any information would be greatly appreciated.
I am attempting to run both Selenium and OWASP ZAP in the same job in Jenkins. Essentially, I want Jenkins to start ZAP, run the Selenium tests while using ZAP as a proxy, and then start a ZAP scan using the locations provided by Selenium.
I found some instructions, which appeared like they would be a helpful, on the Jenkins site at https://wiki.jenkins.io/display/JENKINS/Execute+ZAP+as+part+of+a+Selenium+Build .
Unfortunately, the article says in two apparently opposing things in two separate places. First, "The Selenium build step must be placed before the Execute ZAP build step." Second, "Run [ZAP] as Pre-Build Step". So do I start ZAP first or run Selenium first?
It seems obvious that I must first start ZAP, leave it running while Selenium does its thing, and then perform the scan. Unfortunately, the "Execute ZAP" step from the "Official OWASP ZAP Jenkins Plugin" appears to execute only as a discrete step. After it starts, it must finish before any other steps are executed. Is there a way I can get ZAP to keep running until after Selenium completes?