Factory_girl vs Fabrication which is faster?

Skip to first unread message

rakesh sukla

Mar 1, 2016, 6:11:18 PM3/1/16
to fabrication

Factory_girl vs Fabrication which is faster?

For our web testing we are using Factory_Girl but it is too slow. Firstly, we are doing integration test and need real values in the database. Some of the tests are time dependent, so re-seeding the data roughly takes more than 5 minutes. I have already gone through bunch of blogs, stack overflow threads but I am not able to find an answer to my question.

Is Fabrication faster than Factory Girl for testing?

Factory girl is definitely very popular but also it is very slow. I will highly appreciate if anyone could answer this. I know most answers will be opinion based, and I will really appreciate if you could share your experience.

Paul Elliott

Mar 1, 2016, 6:19:11 PM3/1/16
to fabrica...@googlegroups.com
In terms of database speed that really has little to do with the library. They both are using active record under the hood. Where you may find a difference is in how they initialize. Factory girl loads the whole world when the app initializes so it will have a memory footprint and slowdown app start up. Fabrication doesn't load anything until you actually try to fabricate something so it won't incur overhead unless you're using it.

Hope that helps!

-- Paul
You received this message because you are subscribed to the Google Groups "fabrication" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabricationge...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
0 new messages