boxwise / boxwise

A work on hold

Home Page:https://boxwise-production.firebaseapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Script to set up a bunch of test data in development

bfirsh opened this issue · comments

Problem

To get started in development, you have to create a bunch of test data to get productive. It is also hard to test whether UIs scale up to the amount of data that will be used in production.

Proposed solution

A script which bootstraps a load of fake test data.

I've started to put some of this together. One little hitch is the default rules for 'product' table requires an authenticated session, so it would require the user to create that first, and provide their username and password to the script.

Might be a bit more convenient for the development settings to just allow non authenticated sessions.

@bwaitetripadvisor Ah, hm. I was going to suggest we use the firebase database:push command, because that bypasses the auth checks, but that is only for the old Firebase database, not the new Firestore database. That is annoying.

So yeah, setting up a user as part of the bootstrapping process sounds like a good plan.

Haven't create a pull request yet, as I want to clean things up, and have it generate more documents in the firebase db, but I've got the initial working version added to my fork at https://github.com/bwaitetripadvisor/boxwise/blob/master/utils/generate-test-data.js

A start was in #243 - thanks @bwaitetripadvisor!

This needs documentation to be useful, probably as start of the getting started guide. It could even be triggered by the yarn setup command. This work is still up for grabs!

Closed ("Paused") due to discussion #275.