X-Git-Url: http://info9.net/gitweb/?p=wiki.git;a=blobdiff_plain;f=tmarble%2Fposts%2Fwebica.mdwn;h=2fceb4345744ad0c5d85c236f7065360439a9896;hp=0000000000000000000000000000000000000000;hb=a3b5cd9261728e2a7b20c41eadf3034fd68881d1;hpb=22e3a85365a0c980c605c9514969d2f0ccf68834 diff --git a/tmarble/posts/webica.mdwn b/tmarble/posts/webica.mdwn new file mode 100644 index 0000000..2fceb43 --- /dev/null +++ b/tmarble/posts/webica.mdwn @@ -0,0 +1,49 @@ +# webica + +I've just pushed the first version of my new Clojure wrapper +for [Selenium][se] called [webica][webica]. + +The reason I need **webica** is that I want to do automated +browser testing for [ClojureScript][cljs] based web applications. +Certainly NodeJS, PhantomJS, Nashorn and the like are useful... +but these can't quite emulate the full browser +experience. We want to test our ClojureScript web apps in browsers -- +ideally via our favorite automated continuous integration tools. + +
+
+ +Selenium + +
+ +My new approach with the **webica** library is to do full Java introspection +in the spirit that [amazonica][amazonica] does for the AWS API. In fact I +wanted to take it a step further by actually generating Clojure source code via +introspection that can be used by Codox to generate nice API docs +(which you don't get with amazonica). That, alas, was a little +trickier than expected due to pesky [Quine][quine]-like problems :) . + +If you load the library on the REPL you can get a feeling for each +namespace by calling the `show-functions` function. + +I realize this approach of aggressive introspection, playing fast +and loose with types and application level dynamic dispatch are +crazy antipatterns. In my defense I started out playing around +to see "if I could do it". After seeing the result in the form +of a *shell script* in Clojure -- imitating [lmgtfy][lmgtfy] -- perhaps +**webica** will actually be useful! + +I plan to talk about **webica** tonight at [clojure.mn][clojuremn] -- hope to +see you there! + + +[[!tag clojure web selenium]] + +[se]: http://docs.seleniumhq.org/ +[webica]: https://github.com/tmarble/webica +[cljs]: https://github.com/clojure/clojurescript +[clojuremn]: http://www.meetup.com/clojuremn/events/232762945/ +[amazonica]: https://github.com/mcohen01/amazonica +[quine]: https://en.wikipedia.org/wiki/Quine_%28computing%29 +[lmgtfy]: https://github.com/tmarble/webica/blob/master/examples/lmgtfy