anticoders / gagarin

Another testing framework for your meteor apps.
gagarin.meteor.com
MIT License
150 stars 21 forks source link

Parallel test running. Documentation, recommendations. #178

Open Kostanos opened 8 years ago

Kostanos commented 8 years ago

Hi, I'm playing with parallel test running. My main goal is to speed up the tests. In my case, 70 tests, mostly client-side. Running without parallel and with parallel 2 or 4 processes, has no changes to the test execution time at all (2 minutes in my case).

I guess, one of the reason is running only one meteor instance, one browser instance?

Is there any recommendations, documentation about how can tests be optimized to run in parallel.

apendua commented 8 years ago

@Kostanos How exactly you're using the parallel test runner?

Kostanos commented 8 years ago

gagarin -p 2

Actually I just realized, I used it wrong, but now half of my tests are failing. They share the DB right? so, if I use the same fixture in two parallel tests, and one of the tests changing it, the second one will fail because this change also will affect it, no?

apendua commented 8 years ago

@Kostanos You are right. If you want to run them in parallel you will need to make sure that each test is operating on a separate database. But in fact, this is the default behavior so if you are experiencing these problems it probably means that you've turned it off. Correct?

Kostanos commented 8 years ago

I didn't changed any settings regarding using DB, I didn't even knew they exists.

So I run the tests with default settings.

apendua commented 8 years ago

@Kostanos If that's the case then I don't see a reason the test may be failing. Sometimes I got timeout errors if I use too many parallel instances because my processor cannot handle it. Are your errors messages specific to your tests or maybe they look like internal Gagarin errors?