Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Creating fake Fitbit users for testing purposes

ANSWERED

I am creating a Rails app that uses the Fitbit API, and need to do this in a test driven way. There are certain pages that a user should not see if unless they have logged in with their Fitbit account. This is all working.

 

The problem is trying to write tests. I am trying to test various things on the pages that only logged in users can see, but setting up the tests (in RSpec and Capybara) is proving difficult, as I have to find a way to "mock" a Fitbit login first. I don't want to put my own details in the tests (the repo will be open source). Is there such a thing as a test Fitbit user? Or is there another simple way to do this without inputting real login details?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Please don't create test users on Fitbit.

 

I suggest mocking/stubbing the Fitbit interactions for automated tests.

View best answer in original post

Best Answer
0 Votes
3 REPLIES 3

Please don't create test users on Fitbit.

 

I suggest mocking/stubbing the Fitbit interactions for automated tests.

Best Answer
0 Votes

Hi, I have a similar question.  We are getting ready to run a 1,000 person load test but with just one user we will run into the API rate limit of 150 per hour, right away.  Do you have another suggestion so that we can run a full load test?

Best Answer
0 Votes

@JonathanAlta: You should be load testing your application, not the Fitbit API. If you want to simulate the Fitbit API, you should create a mock API.

Best Answer
0 Votes