Re: Starting sinatra app as part of the feature tests

112 views
Skip to first unread message

Anuj Dutta

unread,
Dec 14, 2014, 5:56:13 AM12/14/14
to vcr-mai...@googlegroups.com
Hello all,

Most of the features in VCR tend to start a sinatra app as part of the feature. Is there a reason for doing it as part of each and every feature? We could just use the same/similar code to start up a sinatra server before the features are run. This mock sinatra server will handle the HTTP calls that we need to make as part of the feature tests and will be gracefully killed after they have finished. 

Any thoughts on this?

Thanks.

Anuj

Myron Marston

unread,
Dec 15, 2014, 5:57:41 PM12/15/14
to vcr-mai...@googlegroups.com
Hey Anuj,

Since the cucumber features are published on relish as a main part of VCR's documentation, I felt it was important that each scenario defines the HTTP application the client communicates with.  That makes VCR's behavior as a sort of "proxy" in the middle between client and server easier to understand in the test.  Also, different scenarios have different needs, and having a single server that satisfies all those needs would be challenging.

If there's a way to preserve these benefits while switching to "boot the server once and keep it running" model, I'd be in favor of trying that out to hopefully make things faster.  I can't think of a way to make that work, though.

Myron
Reply all
Reply to author
Forward
0 new messages