This doesn't need a listener at all. Alternatively, you can use the handler
property to specify the function that needs to be called when the button is clicked.
<testbutton
jcr:primaryType="cq:Widget"
autoWidth="{Boolean}true"
fieldLabel="test button"
text="Ok"
xtype="button"
handler="function(b, e){alert('Hello!!');}" />
The b and e are the button and event objects respectively, that are passed to the handler. For further reference check this Button API.
And for the listener part, the node name has to be listeners
instead of listener. That should work.
<testbutton
jcr:primaryType="cq:Widget"
autoWidth="{Boolean}true"
fieldLabel="test button"
text="Ok"
xtype="button">
<listeners
jcr:primaryType="nt:unstructured"
click="function(){alert("Hello World","All set!!!");}"/>
</testbutton>