Drupal running test on its own Testing Profile which is different to what we saw in a standard profile. In many cases, the style differences in Testing profile affected the testing. It's not easy to observe and debug, even review a patch.
Luckily, we able to run webDriver #2775653: JavascriptTests with webDriver while writing tests. It helped a bit! BUT, bootstrap time + testing time for a simple test usually taken 15 sec ~ 1 min (depends on machine's platform). A simple test becomes few days work.
With an interactive shell, we able to write test in realtime and get feedback in realtime.
Here's an example provided by @droplet. This is using Codeception and Psysh.

Codeception also provided its own way to open a shell with handy helpers:
http://codeception.com/docs/07-AdvancedUsage#Interactive-Console
Other examples:
http://codecept.io/
http://webdriver.io/ ( https://twitter.com/webdriverio/status/806911722682544128 )
Known issue:
- Psysh is crashed in Drupal PHPUNIT tests.
Comments
Comment #2
droplet commentedComment #15
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!