Running Selenium Scripts through ZAP as a proxy

105 views
Skip to first unread message

Joshua Dunn

unread,
Nov 29, 2016, 5:07:58 AM11/29/16
to OWASP ZAP Developer Group
After successfully using the ZAP tool to perform some sort of penetration and WASA testing for my job, I now want to run the automation through ZAP as part of a CI process. After following various videos and researching ways of doing this, I have managed to put something together... However I am encountering an error when trying to run the build.xml as an ant build... I am fairly new to Ant so bare with me if its something obvious!

Essentially, I have copied a project - bodgeit and deployed it's war file on tomcat. However when runninb build.xml I get the following error:

*********************************************************************************************************************************************************************************
Buildfile: /Users/joshuadunn/workspace_new/SecurityTestAutomation/ZAP/build.xml

BUILD FAILED
/Users/joshuadunn/workspace_new/SecurityTestAutomation/ZAP/build.xml:20: taskdef class org.zaproxy.clientapi.ant.AccessUrlTask cannot be found
 using the classloader AntClassLoader[]

Total time: 421 milliseconds
***********************************************************************************************************************************************************************************

I thought it may be the jars im using but after trying different versions of java and also modifying the jars to different versions, i still get the same error.. I'm pretty stuck here and cant seem to find anyone who has had a similar problem to me?

I hope someone can point me in the right direction!

My project is using:

junit-4.10.jar
selenium-server-standalone-2.53.0.jar
selenium-java-2.53.0.jar
zap-api-1.0.0.jar
zap-api-v2-8.jar
zap-clientapi-1.0.0.jar
zap-clientapi-ant-1.0.0.jar


thc...@gmail.com

unread,
Dec 1, 2016, 8:53:59 AM12/1/16
to zaproxy...@googlegroups.com
Hi.

The following (ZAP) jars must be on the classpath when defining the
tasks and to run them:
- zap-api-1.0.0.jar
- zap-clientapi-ant-1.0.0.jar

For example, if both jars are in a "zap-lib" dir (placed in the same dir
as the Ant build file) you could define the tasks with:
<path id="zap.classpath">
<fileset dir="zap-lib" includes="*.jar" />
</path>

<taskdef name="accessUrlTask"
classname="org.zaproxy.clientapi.ant.AccessUrlTask"
classpathref="zap.classpath" />
<taskdef name="activeScanUrlTask"
classname="org.zaproxy.clientapi.ant.ActiveScanUrlTask"
classpathref="zap.classpath" />


Best regards.

Keshav Ramteerth

unread,
Jan 3, 2017, 9:32:57 AM1/3/17
to OWASP ZAP Developer Group
Hi Can Anybody help me out,

Im getting below error wile running ZAPDemo task from ANT build  , please see below screen.

Auto Generated Inline Image 1
Reply all
Reply to author
Forward
0 new messages