Fetching contributors…
Cannot retrieve contributors at this time
109 lines (85 sloc) 4.05 KB


This release is huge; loads of new functionality!

Selenium support

TestState now supports Selenium. AFAIK this makes it the only FP option for Selenium-based test automation.

  • Add a Selenium module including:
    • multiple tab support
    • multiple browser (instance) support
    • parallelism and concurrency - according to settings, spreads load across a browser pool and multiple tabs in each browser
    • extension methods to Selenium classes:
      • WebDriver
      • WebElement
      • Point
  • Add a Selenium-based DomZipper.

You can see two small examples here.

Retry functionality

Tests can now have automatic retry on errors and failures. It is very fine-grained about what gets retried when, as shown here.

Use .withRetryPolicy on Test{,WithInitialState} and RunnableTest to add retry capabilities to your test; there are a number of predefined retry policies available from Retry.Policy.

Use this with Selenium tests to avoid the need for sleeps and wait; no need to consider asynchronicity at all.

New Functionality

  • Add Focus DSL for Options.
  • Add a cross-compiled DomZipperModule.
  • Add to DomZipper
    • getAttribute(name): Option[String]
    • needAttribute(name): String
    • child(css?, m of n?)
    • .children01 & .children01(css)
    • .children0n & .children0n(css)
    • .children1n & .children1n(css)
    • .classes: Set[String]
    • .exists(css, filter): Boolean
    • .matches(css): Boolean
  • Add to DomZipper.collect results
    • .filter
  • Add ErrorHandler.toStringWithStackTrace
  • Add to Report
    • print to print the report to stdout
    • exception to get an exception that best describes the test failure
  • Add more DSL useful for observation partiality; see StdlibUtil.scala

New Behaviour

  • Multiple threads printing reports at the same time no longer interleave on the screen
  • Report format
    • multi-line failure messages now supported
    • failure detail can be highlighted differently than the failed test step
    • by default, failure detail is now dark red (where as it used to be bright red)
    • when collection equality fails, the results now span two lines with the output aligned
  • Tweak equality assertion failure message.
  • {In,de}crease assertions are now clearer in reports.


  • Calling .updateState on a group of actions should run after all actions, not on each inner action.
  • Calling .updateState on an empty action turn it into a non-empty action (rather than discarding the state update)
  • Coloured reports now display as intended on OS X

API Changes

  • In TestWithInitialState:
    • .run is now deprecated - use one of the following
    • Added .withRef(ref: R)
    • Added .withRefByName(ref: => R)
    • Added .withLazyRef(ref: => R)
    • Added .withoutRef(implicit ev: Unit =:= R)
  • Deprecate .mapZippers in DomZipper collection; use .map instead
  • Deprecate Report#assertF(); use Report#assert(useFailSettingsOnPass = true) instead
  • Deprecate Report#formatF(); use Report#format(useFailSettingsOnPass = true) instead
  • ROS (ref-obs-state) is now a subtype of OS (obs-state)
  • Rename Recover[E] typeclass to ErrorHandler[E]

Dependency Upgrades

  • Upgrade Cats to 1.1.0
  • Upgrade Scala to 2.12.6
  • Upgrade Scalaz to 7.2.25
  • Upgrade ScalaJs DOM to 0.9.6
  • Upgrade Scala.JS to 0.6.24


find . -name '*.scala' -type f -exec perl -pi -e 's/(?<!\w)mapZippers(?!\w)/map/g' {} +


If you like what I do —my OSS libraries, my contributions to other OSS libs, my programming blog— and you'd like to support me, more content, more lib maintenance, please become a patron! I do all my OSS work unpaid so showing your support will make a big difference.