Commenting out Zest statements

0 views
Skip to first unread message

Simon Bennetts

unread,
Aug 29, 2014, 12:11:20 PM8/29/14
to mozill...@googlegroups.com
What does everyone think about having an option to comment out any Zest statement?
So this would be a boolean attribute on every statement, possibly "comment" ;)
The default would be false, but if you set it to true then the statement will be treated like a comment, ie ignored.
If the statement is a container (eg a conditional or loop) then all of the contained statements will also be commented.

In ZAP I'd add a right click "Comment/Uncomment" menu option, and then either grey out the icon or something similar.
Having played around with quite a few Zest scripts I think this would be a useful enhancement.

Silence will be taken to imply approval ;)

Cheers,

Simon

Lars Kristensen

unread,
Aug 29, 2014, 2:24:34 PM8/29/14
to mozill...@googlegroups.com
Hi Simon,

I definetly think this would be useful - at least for debugging purposes. While we were developing our extension for ZAP, we had several different ZEST scripts that did almost the same thing, with minor differences. It would be great if it was possible to store everything in one script, and simply toggle which parts should run, by commenting/uncommenting different parts :)

- Lars

Sunny

unread,
Aug 30, 2014, 2:40:04 AM8/30/14
to Lars Kristensen, mozill...@googlegroups.com

+1

Frederik Braun

unread,
Sep 1, 2014, 5:11:21 AM9/1/14
to mozill...@googlegroups.com
Replying a bit late and possibly bike-shedding:

But I'd call it "disable" or "skip" :-) And in the UI use the typical
pattern to display entries in grey on white, instead of black on white.

Simon Bennetts

unread,
Sep 1, 2014, 6:37:37 AM9/1/14
to mozill...@googlegroups.com
How about "enabled", again defaulting to true?
In java the methods would then end up isEnabled() and setEnabled(boolean enabled) which are nice and understandable.

And yes, grey on white makes sense.

Frederik Braun

unread,
Sep 1, 2014, 7:12:21 AM9/1/14
to mozill...@googlegroups.com
That sounds very reasonable :)

Simon Bennetts

unread,
Sep 4, 2014, 9:55:40 AM9/4/14
to mozill...@googlegroups.com
I've committed these changes to the Zest repo and also the related ZAP UI changes.
They seem to work well :)
I'm not planning on releasing the ZAP Zest add-on until theres a fix for the Selenium issue which means it doesnt work with Firefox 32.0 :/

Simon

Sunny

unread,
Sep 10, 2014, 11:46:30 AM9/10/14
to mozill...@googlegroups.com
I have added this support to Firefox Zest add-on.

Sunny

Sunny

unread,
Sep 10, 2014, 11:46:41 AM9/10/14
to mozill...@googlegroups.com

Simon Bennetts

unread,
Sep 10, 2014, 11:48:48 AM9/10/14
to mozill...@googlegroups.com
Great!

Selenium have fixed the issue with Firefox 32.0 so I've just released a new ZAP Zest add-on.
If you use this then make sure you also update the Scripts add-on - these 2 new versions then provide drag-and-drop support for editing Zest scripts :)

Cheers,

Simon
Reply all
Reply to author
Forward
0 new messages