magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Proper Test Cases for Configurable/Simple Products

Open fr0x opened this issue 13 years ago • 4 comments

I've seen a few patches in regards to configurable products closed due to insufficient gains in load time in your unit testing.

You mentioned this setup in testing:

  • Magento CE 1.7.0.1 with clear DB
  • 2500 configurable products with 2 simple products as options per each configurable product

I assume that is then 5000 individual simple products (2 unique simple products per configurable product)? What were the number of unique super attributes for those simple products? Some of these changes are in large part dependent on the number of super attributes returned. If you only had 2 super attributes defined for those 5000 simple products (black and white) as opposed to multiple thousands (red, pink, cherry, rose, sunset, and on and on.....) these changes pan out quite a bit differently.

See Issue #293 https://github.com/magento/magento2/issues/293

fr0x avatar Aug 27 '13 15:08 fr0x

Just as an update on this......

Looking at the 2500 configurable product creation code: https://gist.github.com/mage2-team/4040304

It looks like you are only generating 2 options for your testing, "Option 1" and "Option 2".

Therefore, in things like "function _loadPrices()", this call "$options = $productAttribute->getFrontend()->getSelectOptions();" only ever returns 2 items to loop through with your configurable product tests. I'm not sure what a good average is for options, but I know we currently have 4,500+. Since this is often looped through, that can be quite a difference depending on what happens in the following loop.

I wouldn't suggest just adding in 4,000 options into that script (since it will cause your 5,000 simple products to turn into 10,000,000 simple products) but something should be tweaked with that testing setup as 2 options can't be representative of most installs.

fr0x avatar May 16 '14 14:05 fr0x

Thank you for proposal. We will get back to you once we have the solution or answer.

Internal reference: MAGETWO-33574

kokoc avatar Feb 03 '15 13:02 kokoc

Moving 33574 under performance measurement epic 53797.

@fr0x In our market research we identified the average e-commerce site having 3 product options for configurable & bundled products. We are currently using that when generating test fixtures with the performance tool kit. The epic 53797 is intended to provide more generation control for test fixtures to address # of product options and # of super attributes that manage those permutations.

choukalos avatar Jun 01 '16 20:06 choukalos

Now fixture for configurable product support any number of variation, so I close issue

kandy avatar Aug 15 '16 08:08 kandy