Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Clojure for Functional Testing

Helpshift Inc.
September 19, 2014

Clojure for Functional Testing

Clojure for Functional Testing of Mobile and Web Apps. This was presented at Selenium Conference 2014

Helpshift Inc.

September 19, 2014
Tweet

More Decks by Helpshift Inc.

Other Decks in Programming

Transcript

  1. September 15, 2014 Contents 1 First things first: what is

    Clojure? 2 2 Clojure Syntax 4 3 Dynamic Develoment 4 4 Functional Programming 4 5 Example 4 6 Example Cont. 5 7 Example Cont. 5 1
  2. 8 Example Cont. 5 9 Hosted on the JVM 5

    10 Macros in Clojure 6 11 Clj-webdriver 6 12 calabash-clj 6 13 appium-clj 7 14 Demo 8 15 Any Questions? 9 1 First things first: what is Clojure? • Invented in 2007 by 2
  3. 2 Clojure Syntax 3 Dynamic Develoment 4 Functional Programming •

    Functions as first-class objects • Feedback loop is fast 5 Example 4
  4. 6 Example Cont. 7 Example Cont. 8 Example Cont. 9

    Hosted on the JVM • Designed to be hosted (JVM, V8, CLR, Python, LLVM, etc) • Great java library consumer • Java invocation syntax is clean and simple Ex.: 5
  5. -> (. Classname-symbol method-symbol args*) -> (.instanceMember Classname args*) 10

    Macros in Clojure • Macros gives clojure great power. • Difference between functions and macros • Writing control flow macro 11 Clj-webdriver • Clojure API for selenium webdriver • https://github.com/semperos/clj-webdriver • Clojars https://clojars.org/me.kapilreddy/clj-webdriver • Features • Demo link: https://www.youtube.com/watch?v=Zje19PkLbYk&feature= youtu.be 12 calabash-clj • Clojure API for Android • https://github.com/kapilreddy/calabash-clj 6
  6. Kapil Reddy [Helpshift] • Demo link: https://www.youtube.com/watch?v=NY6aQh0lf8M&feature= youtu.be 13 appium-clj

    • Clojure API for appium-java-client • https://github.com/helpshift/appium-clj 7
  7. Mayur Jadhav • Demo link: https://www.youtube.com/watch?v=eGcEWKZEZ9c&feature= youtu.be 14 Demo •

    Demo link: https://www.youtube.com/watch?v=mO-vAMy0Ack&feature= youtu.be 8