tokenshift / cavy

Clojure HTTP client for UI automation and testing.
MIT License
0 stars 0 forks source link

Cavy

Build Status

Headless Clojure HTTP client for automated testing.

Overview

Cavy is a library for simulating an HTTP client without the overhead of browser automation tools. It wraps clj-http in a user-interaction-oriented interface with functions for following links, filling in fields and submitting forms.

If you want a library for testing Ring apps, I recommend Kerodon.

Examples

(require 'cavy)

(-> (cavy/session "https://example.com/login")
    (cavy/fill-in "Username" "my-username")
    (cavy/fill-in "Password" "my-password")
    (cavy/press "Login"))

Cookies are maintained within a session, so you can login and then navigate secured pages.

API