Skip to content
/ wally-example Public template

An example project for end to end testing with Wally, a Clojure Wrapper for Playwright

Notifications You must be signed in to change notification settings

PEZ/wally-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to End to End test a web site from Clojure

The missing Wally manual 😀

Haha, no, I know Wally is new, experimental, and subject to breaking changes. I just want to play with it and created this little example project to test it out.

Wally is a Clojure wrapper for Playwright (think Selenium/Cypress, but can be used from the Clojure REPL). Here's how to start navigating a web site from the Clojure REPL in a few steps:

  1. Copy this project to your computer
  2. Start the project REPL and connect your editor
  3. Evaluate the forms in src/e2e_test/example.clj

Yes, that's all there is to it. When you evaluate the first form in the Rich Comment of the example, Wally (or if it is Playwright, idk) will download Chromium and drivers and things, if needed. Chromium will start and open the jsonista library page on Clojars.

image

The reset of the forms will have you clicking around and enter things on that page. Place the opened Chromium window and your editor window side by side.

How to Start the project REPL and connect the editor?

This is not a guide teaching you how to do this. If you use Calva, it is only one step: Use the command: Calva: Start the Project and Connect (a.k.a. Jack-in). The prerequisites for this are:

  1. Have Java installed (I don't dare point at a way to do this, but I like sdk-man a lot myself)
  2. Have VS Code installed
    1. Some basic VS Code knowledge
  3. Have Calva installed in VS Code
    1. Some basic Calva knowledge

What about Clojure?

You don't need to know any Clojure, but of course that will make things really fun:

Happy E2E testing! ♥️

Please consider helping out with keeping this project usable as Wally is being shaped into its 1.0.0 form. Issues and PRs welcome!

About

An example project for end to end testing with Wally, a Clojure Wrapper for Playwright

Topics

Resources

Stars

Watchers

Forks