Skip to content

Setting is_development_mode allows request to the API #6

@sogamoso

Description

@sogamoso

I recently started using VWO at work. We were pointed to this gem to do A/B Fullstack testing.

We are relying on the is_development_mode parameter to ensure we were not polluting our experiments with data from development and staging environments. Unfortunately, that doesn't seem to be the case. We noticed it when we started getting errors from VWO's API when running the web application in our development environments.

vwo-ruby-sdk/lib/vwo.rb

Lines 58 to 59 in 1d897ad

# @param[Boolean] :is_development_mode To specify whether the request
# to our server should be sent or not.

We got several errors when, for example, using the VWO client to activate a campaign. Even instantiating the VWO class will fire up a request to get the settings. This is understandable, but not ideal. It makes running automated tests where this class is instantiated more complicated than necessary; we are seeing errors being logged even if the client doesn't raise an error.

In this case, following the code, starting here:

unless valid_settings_file?(get_settings(settings_file))

Which takes us here:

settings_file || @settings_file_manager.get_settings_file

Which leads us to the client making a GET request:

settings_file_response = ::VWO::Utils::Request.get(vwo_server_url, params)

Would it be possible for this behavior to be changed to as advertised? We would expect no requests to be made when is_development_mode is set to true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions