Live data from Hacker News

Show HN: Visual debugger for Rails system tests

github.com

11–14 of 14 posts

Re: Show HN: Visual debugger for Rails system tests

#12
post #7

This could be a nice UI to let you create the test visually.

I like this idea, it's even on my future roadmap: "Record browser interactions to save as ruby code" Is there an example of a tool doing this well?

I watched the demo for a comment made above, and it looks like the gem can do what you're talking about:

> Slightly different approach, but appears to have the same overarching goals: https://github.com/bullet-train-co/magic_test

Re: Show HN: Visual debugger for Rails system tests

#13

Very cool! Will definitely check it out. Random question: when you "pause" a test, is it actually pausing the capybara/rspec test such that I can have a breakpoint/debugger/REPL experience to try out various capybara/rspec code? The reason I ask: one of the slowest/annoying parts of writing capybara tests is the context jump between "this is the css selector i get from chrome dev tools" and "this is the capybara/rspe…

I write system tests like this with the REPL often. I just change the Capybara driver from its usual headless_chrome to chrome and put a debugger (or pry) breakpoint in the RSpec example. From there I just "drive" from the REPL, testing my finders/matchers and building up the test example as I go. As you suggest, being able to use dev tools directly in the browser being driven by Capybara is massively helpful during this stage.

Re: Show HN: Visual debugger for Rails system tests

#14
post #13

Very cool! Will definitely check it out. Random question: when you "pause" a test, is it actually pausing the capybara/rspec test such that I can have a breakpoint/debugger/REPL experience to try out various capybara/rspec code? The reason I ask: one of the slowest/annoying parts of writing capybara tests is the context jump between "this is the css selector i get from chrome dev tools" and "this is the capybara/rspe…

I write system tests like this with the REPL often. I just change the Capybara driver from its usual headless_chrome to chrome and put a debugger (or pry) breakpoint in the RSpec example. From there I just "drive" from the REPL, testing my finders/matchers and building up the test example as I go. As you suggest, being able to use dev tools directly in the browser being driven by Capybara is massively helpful during…

at one point i started to make a gem called "dora" where you could "explore" the page with methods around the capybara driver, but never finished it. for example: page.find_blog_posts.highlight_all would draw a blue box around each "blog_post" element.
Post reply on HN