reactioncommerce / reaction

Mailchimp Open Commerce is an API-first, headless commerce platform built using Node.js, React, GraphQL. Deployed via Docker and Kubernetes.
https://mailchimp.com/developer/open-commerce/
GNU General Public License v3.0
12.34k stars 2.17k forks source link

Create sample data sets along with our 3 different user personas #3239

Closed machikoyasuda closed 6 years ago

machikoyasuda commented 6 years ago

Part of https://github.com/reactioncommerce/reaction/issues/3233

Personas

aaronjudd commented 6 years ago

@zenweasel as discussed... this could be a larger ticket, but the goal here is 50,000 products from faker data.. and is in progress, but we need this by the end of the 1st performance sprint.

rymorgan commented 6 years ago

I'd love to know what the data sets we align with these personas. This seems like a great opportunity to create some UX user personas in line with those data sets.

brent-hoover commented 6 years ago

"Personas" might not have been the correct term, but I am totally open to adding more info about what exactly the data we should load here. Mostly it's just small/medium/large in terms of number of records loaded.

brent-hoover commented 6 years ago

So what I am thinking (and have mostly built) is:

  1. Small: Basically the Swag Shop. About 10 products, 2 tags

  2. Medium: So when we say "products" I wasn't sure that meant "top-level products" or "entries in the database". I went with top-level products so now this loads 1000 products with each product having a variant and a few options so around 5k records in the db. I feel like a shop with 1000 products is probably going to have 10k orders?

I haven't done this yet but a store with this many products will probably have a lot of Tags with at least a couple of layers.

  1. Large: I believe we wanted 50k products and doing this by creating records on the fly seems to be too slow, even with bulk insert. So a shop with 50k products would have how many orders? 500k? Is this even a viable test since nobody is going to be testing 50k/500k orders on a single CPU? How many tags would make sense.
brent-hoover commented 6 years ago

So I have the "Medium" dataset loading Products and Tags with multi-level tags and 100 products in each Tag. Need to add orders then hopefully I can just change the parameters for the large dataset. Main challenge is trying to make sure these run quickly.

brent-hoover commented 6 years ago

If you wanted to do testing with it now it's available at https://github.com/reactioncommerce/reaction-devtools and you can just drop it in the custom plugins directory and it should be available from the dashboard.

spencern commented 6 years ago

@zenweasel is there a PR here or just a new repo?

brent-hoover commented 6 years ago

There won't be a pr as it's an optional plugin

brent-hoover commented 6 years ago

Orders are now working for the Medium dataset. 10000 orders. I am going to test the Large dataset using a larger DB server tomorrow and then should be done.

brent-hoover commented 6 years ago

Added full tags set with three layers of navigation and 100 products assigned to each category. Should work well for testing. Still not done with large dataset

brent-hoover commented 6 years ago

Ok. I am adding images now. I swear to god that I am going to finish this tomorrow though. If you want to use it for load testing, the medium dataset should work for you

brent-hoover commented 6 years ago

I think this is done and MJ is testing it tonight.

prinzdezibel commented 6 years ago

The test data plugin itself is usable, but there's a performance problem resulting out of it when tested as non-admin user. Created a ticket for that: https://github.com/reactioncommerce/reaction/issues/3662

brent-hoover commented 6 years ago

@spencern or anybody else who wants to try this and give me any feedback would be helpful. Otherwise I would declare this done.

spencern commented 6 years ago

@zenweasel Just had a chance to look over this. Should be super valuable for QAing the app beyond using the initial starter data.

Do you have any suggestions for what the new standard data load should be for basic QA? Now that (with this plugin) it's super simple to load products and orders, there shouldn't be any reason to test PRs with only 1 product.

A nit to pick would be that it could use a little more instructions in the repo documentation e.g. Annotated screenshots of the plugin Some examples of what a store with the datasets loaded looks like? Why is using the large dataset on a dev box discouraged? Links to issues that could help make using the large dataset feasible

brent-hoover commented 6 years ago

@spencern Thanks for taking the time to look at this. Your criticisms are noted and all make sense to me, I will loop around and fix those.

I think probably the question is, how can the sample sets be changed to be best cases for testing. The current "small" set is already a lot better for testing than the stock single product I can tell you but should it have more products like 25-50? (this just occurred to me a day or so ago) Also should we add another "Marketplace" set as that currently takes a while to set up and probably means it gets tested less?

My suggestion would be to close this ticket for now and open tickets on the reaction-devtools repo (should this be renamed to reaction-testing-tools or something? It's not really a devtool)

The issue with the large dataset is that no one would/should be hosting a dataset that large on their desktop box and my experience is that it completely kills a local installation. Is that something we expect to be able to do?

I think @prinzdezibel has a ticket for the product publication issue that I know you had been looking at. I think once that issue is resolved the larger datasets would be easier to use on a desktop dev box.

spencern commented 6 years ago

This makes sense to me and I think your suggestions are the right direction. Once tickets are created in the reaction-devtools repo will you go ahead and close this issue?

brent-hoover commented 6 years ago

Issues have been opened on https://github.com/reactioncommerce/reaction-devtools/issues. Closing this issue.