What does HackerNews think of vcr?

Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.

Language: Ruby

I generally will use vcr[0] or something similar to record requests and then I write tests and code against that.

3rd parties go down, it happens. In general a system that is dependent on a third party should have some non exceptional behavior when that happens.

So if I’m not setup with vcr, and 3rd party is down- I would on the behavior for what happens when it’s down.

[0] https://github.com/vcr/vcr

This could be great for mocks.

At one point I was trying to automate against an internal tool that had a (useless, for my purposes) dependency on AWS. Rather than give my pipeline access to AWS, I strapped VCR (https://github.com/vcr/vcr) onto it, ran it on my laptop with my own AWS permissions, and then just ran the automation with VCR in front of it from there on out.

> There are tests for rails controllers

I only found one:

https://github.com/ToolJet/ToolJet/blob/develop/test/control...

The others appear to be empty scaffolds (which imnho is worse than no tests, really), eg:

https://github.com/ToolJet/ToolJet/blob/develop/test/control...

  require "test_helper"

  class FoldersControllerTest < ActionDispatch::IntegrationTest
    # test "the truth" do
    #   assert true
    # end
  end
Same for empty model tests etc - I'd strongly encourage removing them - as they just add noise.

Btw, if not doing tdd, time is probably better spent on integration tests than controller/model tests. Main challenge I've found with rails projects that were put in use with no tests, is there's a big effort to set up test data/fixtures from scratch. One option can sometimes be to just set up a test database with real data (database dump as a fixture).

> and I have recently setup Cypress for component testing

That's nice, and probably a good focus for a project like this.

Ed: as for mocking/integration testing apis - which might be useful here, there's "vcr": https://github.com/vcr/vcr