Test front (with ember) and back (rails) in reliably?


I want to be sure communication between my fontend and my backend is working. For the moment, I’m testing both individually but I want to do more for critical parts.

I saw I can dao smoke tests but it doesn’t seems very usual.

I also I can also use “Pact” but I want to be sure pacts are exacts. I saw @samselikoff had the same problem / idea.

What do you use to have a reliable integration between Backend and Frontend ?

Lots of people use cucumber or similar to test the whole stack.

The tests are not usually reliable, due to weird async issues you get many false negatives. Often you have to rerun tests that fail to see if theyre really failures or not. This is ugly but not really hard to implement.

Do you Think it’s better to you use a third app to run the tests or should I do normal acceptances tests that will use the real api instead of mocking with Mirage?

In both cases, I have to find a way to clear the database at each run, right?

The simplest thing to do is usually to use some full stack testing framework integrated with your backed. Like cucumber in rails. Because most of the stuff you have to reset or stub is on the backend.

But this is not the only way - any approach can be viable depending on what your setup is and what you prefer