in reply to Re^8: Testing javascript on Dancer2 psgi sites
in thread Testing javascript on Dancer2 psgi sites

Yes, launching and tearing down WWW::Mechanize::Chrome is slow.

You could look at keeping a Chrome process around and (re)connect to it on every test run. This is basically possible through the (undocumented as I now see) tab parameter, which takes a regular expression or the word 'current'. Keeping a Chrome process around is mostly untested though, as I usually find it too cumbersome to deal with left-over state from previous test runs, like cookies or other data.