diff --git a/setup/performance-toolkit/README.md b/setup/performance-toolkit/README.md new file mode 100644 index 0000000000000..778a1457e10a2 --- /dev/null +++ b/setup/performance-toolkit/README.md @@ -0,0 +1,198 @@ +## Performance Toolkit + +## Overview + +The Performance Toolkit enables you to test the performance of your Magento installations and the impact of your customizations. It allows you to generate sample data for testing performance and to run Apache JMeter scenarios, which imitate users activity. As a result, you get a set of metrics, that you can use to judge how changes affect performance, and the overall load capacity of your server(s). + +## Installation + +### Apache JMeter + +- Go to the [Download Apache JMeter](http://jmeter.apache.org/download_jmeter.cgi) page and download JMeter in the *Binaries* section. Note that Java 8 or later is required. +- Unzip the archive. + +### JSON Plugins +- Go to the [JMeter Installing Plugins](https://jmeter-plugins.org/install/Install/) page. +- Download `plugins-manager.jar` and put it into the `{JMeter path}/lib/ext` directory. Then restart JMeter. +- Follow the instructions provided on the [JMeter Plugins Manager](https://jmeter-plugins.org/wiki/PluginsManager/) page to open Plugins Manager. +- Select *Json Plugins* from the plugins listed on the *Available Plugins* tab, then click the *Apply changes and restart JMeter* button. + +## Quick Start + +Before running the JMeter tests for the first time, you will need to first use the `php bin/magento setup:performance:generate-fixtures {profile path}` command to generate the test data. +You can find the configuration files of available B2C profiles in the folders `setup/performance-toolkit/profiles/ce` and `setup/performance-toolkit/profiles/ee`. + +It can take a significant amount of time to generate a profile. For example, generating the large profile can take up to 4 hours. So we recommend using the `-s` option to skip indexation. Then you can start indexation manually. + +Splitting generation and indexation processes doesn't reduce total processing time, but it requires fewer resources. For example, to generate a small profile, use commands: + + php bin/magento setup:performance:generate-fixtures -s setup/performance-toolkit/profiles/ce/small.xml + php bin/magento indexer:reindex + +For more information about the available profiles and generating fixtures generation, read [Generate data for performance testing](http://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-perf-data.html). + +For run Admin Pool in multithreading mode, please be sure, that: + - "Admin Account Sharing" is enabled + + `Follow Stores > Configuration > Advanced > Admin > Security. + Set Admin Account Sharing to Yes.` + + - Indexers setup in "Update by schedule" mode: + + `Follow System > Tool > Index Management + Set "Update by schedule" for all idexers` + +**Note:** Before generating medium or large profiles, it may be necessary to increase the value of `tmp_table_size` and `max_heap_table_size` parameters for MySQL to 512Mb or more. The value of `memory_limit` for PHP should be 1Gb or more. + +### Run JMeter scenario via console + +The following parameters can be passed to the `benchmark.jmx` scenario: + +| Parameter Name | Default Value | Description | +| --------------------------------------------- | ------------------- | ---------------------------------------------------------------------------------------- | +| host | localhost | URL component 'host' of application being tested (URL or IP). | +| base_path | / | Base path for tested site. | +| admin_path | admin | Admin backend path. | +| admin_user | admin | Admin backend user. | +| admin_password | 123123q | Admin backend password. | +| customer_password | 123123q | Storefront customer password. | +| customers_page_size | 20 | Page size for customers grid in Magento Admin. | +| files_folder | ./files/ | Path to various files that are used in scenario (`setup/performance-toolkit/files`). | +| loops | 1 | Number of loops to run. | +| frontendPoolUsers | 1 | Total number of Frontend threads. | +| adminPoolUsers | 1 | Total number of Admin threads. | +| browseCatalogByGuestPercentage | 30 | Percentage of threads in Frontend Pool that emulate catalog browsing activities. | +| browseCatalogByCustomerPercentage | 0 | Percentage of threads in Frontend Pool that emulate catalog browsing activities. | +| siteSearchPercentage | 30 | Percentage of threads in Frontend Pool that emulate catalog search activities. | +| searchQuickPercentage | 60 | Percentage of threads in Frontend Pool that emulate catalog search activities. | +| searchQuickFilterPercentage | 30 | Percentage of threads in Frontend Pool that emulate catalog search activities. | +| searchAdvancedPercentage | 10 | Percentage of threads in Frontend Pool that emulate catalog search activities. | +| checkoutByGuestPercentage | 4 | Percentage of threads in Frontend Pool that emulate checkout by guest. | +| checkoutByCustomerPercentage | 4 | Percentage of threads in Frontend Pool that emulate checkout by customer. | +| addToCartByGuestPercentage | 28 | Percentage of threads in Frontend Pool that emulate abandoned cart activities. | +| addToWishlistPercentage | 2 | Percentage of threads in Frontend Pool that emulate adding products to Wishlist. | +| compareProductsPercentage | 2 | Percentage of threads in Frontend Pool that emulate products comparison. | +| productCompareDelay | 0 | Delay (s) between iterations of product comparison. | +| promotionRulesPercentage | 10 | Percentage of threads in Admin Pool that emulate creation of promotion rules. | +| adminPromotionsManagementDelay | 0 | Delay (s) between creation of promotion rules. | +| adminCategoryManagementPercentage | 10 | Percentage of threads in Merchandising Pool that emulate category management activities. | +| adminProductEditingPercentage | 35 | Percentage of threads in Merchandising Pool that emulate product editing. | +| adminProductCreationPercentage | 25 | Percentage of threads in Merchandising Pool that emulate creation of products. | +| adminPromotionRulesPercentage | 15 | Percentage of threads in Admin Pool that emulate admin rules creating activities. | +| adminCategoryManagementDelay | 0 | Delay (s) between iterations of category management activities. | +| apiProcessOrders | 5 | Number of orders for process in Admin API - Process Orders. | +| adminEditOrderPercentage | 15 | Percentage of threads in Admin Pool that emulate order edit. | +| csrPoolUsers | 0 | Users of Customer Support Request (CSR) Pool. | +| othersPoolUsers | 0 | Users of Others Pool. | +| browseCustomerGridPercentage | 10 | Percentage of threads in CSR Pool that emulate customers browsing activities. | +| adminCreateOrderPercentage | 70 | Percentage of threads in CSR Pool that emulate creation of orders. | +| adminReturnsManagementPercentage | 20 | Percentage of threads in CSR Pool that emulate creation/processing of returns. | +| adminCreateProcessReturnsDelay | 0 | Delay (s) between creation of returns. | +| wishlistDelay | 0 | Delay (s) between adding products to Wishlist. | +| categories_count | 100 | Total number of categories that are be used in scenario. | +| simple_products_count | 30 | Total number of simple products that are be used in scenario. | + +Parameters must be passed to the command line with the `J` prefix: + +`-J{parameter_name}={parameter_value}` + +The required parameters are `{host}` and `{base_path}`. All other parameters are optional. If you do not pass any custom value, a default value will be used. + +There are some options that you should pass to JMeter in the console mode: + +`-n` Run scenario in Non-GUI mode +`-t` Path to the JMX file to be run +`-l` Path to the JTL file to log sample results to +`-j` Path to JMeter run log file + +To get more details about available JMeter options, read [Non-GUI Mode](http://jmeter.apache.org/usermanual/get-started.html#non_gui). + +For example, you can run the B2C scenario via console with 90 threads for the Frontend Pool and 10 threads for the Admin Pool: + + cd {JMeter path}/bin/ + jmeter -n -t {path to peformance toolkit}/benchmark.jmx -j ./jmeter.log -l ./jmeter-results.jtl -Jhost=magento2.dev -Jbase_path=/ -Jadmin_path=admin -JfrontendPoolUsers=90 -JadminPoolUsers=10 + +As a result, you will get `jmeter.log` and `jmeter-results.jtl`. The`jmeter.log` contains information about the test run and can be helpful in determining the cause of an error. The JTL file is a text file containing the results of a test run. It can be opened in the GUI mode to perform analysis of the results (see the *Output* section below). + +### Run JMeter scenario via GUI + +**Note:** Use the GUI mode only for scenario debugging and viewing reports. Use console mode for real-life load testing, because it requires significantly fewer resources. + +- Change directories to `{JMeter path}/bin/` and run `jmeter.bat`. +- Click *File -> Open (Ctrl+O)* and select `benchmark.jmx` file or drag and drop the `benchmark.jmx` file in the opened GUI. + +In the root node (*Performance Test Plan*) in the left panel, you can change *User Defined Variables* listed in the previous section. +To run a script, click the *Start* button (green arrow in the top menu). + +## Output + +The results of running a JMeter scenario are available in the *View Results Tree* and *Aggregate Report* nodes in the left panel of the JMeter GUI. + +When the script is run via GUI, the results are available in the left panel. Choose the corresponding report. When the script is run via console, a JTL report is generated. You can run JMeter GUI later and open it in the corresponding report node. + +### View Results Tree + +This report shows the tree of all requests and responses made during the scenario run. It provides information about the response time, headers and response codes. This report is useful for scenario debugging, but should be disabled during load testing because it consumes a lot of resources. + +You can open a JTL file in this report to debug a scenario and view the requests that cause errors. By default, a JTL file doesn't contain bodies of requests/responses, so it is better to debug scenarios in the GUI mode. + +For more details, read [View Results Tree](http://jmeter.apache.org/usermanual/component_reference.html#View_Results_Tree). + +### Aggregate Report + +This report contains aggregated information about all requests. It provides request count, min, max, average, error rate, approximate throughput, etc. You can open a JTL file in this report to analyze the results of a scenario run. + +For more details, read [Aggregate Report](http://jmeter.apache.org/usermanual/component_reference.html#Aggregate_Report). + +### Detailed URLs Report (Legacy) + +This report contains information about URLs. Note that the URL is displayed only in a generated report file (URL is not displayed in the GUI). The report file name is `{report_save_path}/detailed-urls-report.log`. It can be opened as a CSV file. + +For more details, read [View Results in Table](http://jmeter.apache.org/usermanual/component_reference.html#View_Results_in_Table). + +### Summary Report (Legacy) + +The report contains aggregated information about threads. The report file name is `{report_save_path}/summary-report.log`. + +For more details, read [Summary Report](http://jmeter.apache.org/usermanual/component_reference.html#Summary_Report). + +## Additional Information + +### Scenarios + +`benchmark.jmx` scenario has the following pools and default percentage breakdown for each scenario: + +**Frontend Pool** (frontendPoolUsers) + +| Scenario Name | % of Pool | +| ------------------------- | --------- | +| Catalog Browsing By Guest | 30 | +| Site Search | 30 | +| Add To Cart By Guest | 28 | +| Add to Wishlist | 2 | +| Compare Products | 2 | +| Checkout By Guest | 4 | +| Checkout By Customer | 4 | + +Site Search thread group contains 3 variations: +- Quick Search (60%) +- Quick Search With Filtration (30%) +- Advanced Search (10%) + +**Admin Pool** (adminPoolUsers) + +| Scenario Name |% of Pool | +| ----------------------------| --------- | +| Admin Promotion Rules | 15 | +| Admin Edit Order | 15 | +| Admin Category Management | 10 | +| Admin Edit Product | 35 | +| Admin Create Product | 25 | + +**CSR Pool** (csrPoolUsers) + +| Scenario Name | % of Pool | +| -------------------------- | --------- | +| Browse Customer Grid | 10 | +| Admin Create Order | 70 | +| Admin Returns Management | 20 | diff --git a/setup/performance-toolkit/README.txt b/setup/performance-toolkit/README.txt deleted file mode 100644 index 59ea7a69df706..0000000000000 --- a/setup/performance-toolkit/README.txt +++ /dev/null @@ -1,87 +0,0 @@ -Performance Toolkit -============= - -Installation ------------ -jMeter: --- go to http://jmeter.apache.org/download_jmeter.cgi and download jMeter in Binary section (pay you attention that Java 6 or later is required) --- unzip archive - -Plugins (only if you want to use additional reports (like graphs)): --- go to http://jmeter-plugins.org/downloads/all/ and download JMeterPlugins-Standard and JMeterPlugins-Extras --- unzip them to appropriate ext directory of your jMeter instance. --- additional reports can now be added via GUI. - - -Usage ------------ -Before running the jMeter tests for the first time, you will need to first use bin/magento setup:performance:generate-fixtures command to generate the test data. - -1. Run via console -Scenario can accept parameters that are described bellow in format : - - URL component 'host' of application being tested (URL or IP). Default is 'localhost'. - Base path for tested site. Default is '/'. - Path where reports will be saved. Reports will be saved in current working directory by default. Default is './'. - Ramp period (seconds). Period the request will be distributed within. Default is '300'. - Number of orders in the period specified in the current allocation. If is specified, the parameter will be recalculated. Default is '0'. - Number of concurrent users. Recommended amount is 100. Minimal amount is 10. Default is '100'. - Percentage of users that will only reach the add to cart stage. Default is '62'. - Percentage of users that will only reach the view catalog stage. Default is '30'. - Percentage of users that will reach the guest checkout stage. Default is '4'. - Percentage of users that will reach the (logged-in) customer checkout stage. Default is '4'. - Number of loops to run. Default is '1'. - Admin backend path. Default is 'admin'. - Admin backend user. Default is 'admin'. - Admin backend password. Default is '123123q'. - Deviation (ms) for "think time" emulation. Default is '1000'. - Constant delay offset (ms) for "think time" emulation. Default is '2000'. - -Necessary parameters must be passed to command line with "J" prefix: "-J=" - -Example: -> cd /directory_of_jMeter/bin/ -> jmeter -n -t /path_to_benchmark_file/benchmark.jmx -Jhost=magento2.dev -Jbase_path=/ -Jusers=100 -Jramp_period=300 -Jreport_save_path=./ - -2. Run via GUI --- Open jMeter/bin directory and run jmeter.bat --- Click in menu File -> Open (Ctrl+O) and select file; or drag and drop benchmark.jmx file in opened GUI. - -On the first tab 'Test Toolkit' you can change 'User Defined variables' like as , , , , . -For running script click "Start" (green arrow in the top menu). - - -Results of running (Report types) ------------ - -After running via GUI you can see result of working in left panel. Choose the corresponding report. -After running script via console report will be generated in the path that has been specified in . - - -Threads ------------ - -jMeter script consists of five threads. Setup thread and four user threads. -Percentage ratio between threads is as follows: -Browsing, adding items to the cart and abandon cart (BrowsAddToCart suffix in reports) - 62% -Just browsing (BrowsAddToCart suffix in reports) - 30% -Browsing, adding items to cart and checkout it as guest (GuestChkt suffix in reports) - 4% -Browsing, adding items to cart and checkout as registered customer (CustomerChkt suffix in reports) - 4% - - -About reports: ------------ - -Summary Report. -Report contains aggregated information about threads. -Report file name is {report_save_path}/summary-report.log -Details http://jmeter.apache.org/usermanual/component_reference.html#Summary_Report - -Detailed URLs report. -Report contains information about URLs. -Pay your attention that URL is displayed only in generated report file (in GUI, URL is not displayed). -Report file name is {report_save_path}/detailed-urls-report.log (can be open as csv format). -Details http://jmeter.apache.org/usermanual/component_reference.html#View_Results_in_Table - -About other types read on -http://jmeter.apache.org/usermanual/component_reference.html diff --git a/setup/performance-toolkit/benchmark.jmx b/setup/performance-toolkit/benchmark.jmx index 45844253f31d0..d65ff4a036b7f 100644 --- a/setup/performance-toolkit/benchmark.jmx +++ b/setup/performance-toolkit/benchmark.jmx @@ -1,37 +1,37 @@ - + - + - + false false - - abandonedCartByGuest - ${__P(abandonedCartByGuest,0)} + + host + ${__P(host,localhost)} = - - abandonedCartByCustomer - ${__P(abandonedCartByCustomer,0)} + + base_path + ${__P(base_path,/)} = - - admin_delay - ${__P(admin_delay,150)} + + files_folder + ${__P(files_folder,./files/)} = - - admin_enabled - ${__P(admin_enabled,0)} + + request_protocol + ${__P(request_protocol,http)} = @@ -49,79 +49,44 @@ ${__P(admin_user,admin)} = - - adminBrowseCustomersGridScenario1_ViewOddGridPages - ${__P(adminBrowseCustomersGridScenario1_ViewOddGridPages,0)} - = - - - adminBrowseCustomersGridScenario2_ViewEvenGridPages - ${__P(adminBrowseCustomersGridScenario2_ViewEvenGridPages,0)} - = - - - adminBrowseCustomersGridScenario3_Filtering - ${__P(adminBrowseCustomersGridScenario3_Filtering,0)} - = - - - adminBrowseCustomersGridScenario4_Sorting - ${__P(adminBrowseCustomersGridScenario4_Sorting,0)} - = - - - adminBrowseCustomersGridScenario5_FilteringAndSorting - ${__P(adminBrowseCustomersGridScenario5_FilteringAndSorting,0)} - = - - - adminBrowseOrdersGridScenario1_ViewOddGridPages - ${__P(adminBrowseOrdersGridScenario1_ViewOddGridPages,0)} + + seedForRandom + ${__P(seedForRandom,1)} = - - adminBrowseOrdersGridScenario2_ViewEvenGridPages - ${__P(adminBrowseOrdersGridScenario2_ViewEvenGridPages,0)} - = - - - adminBrowseOrdersGridScenario3_Filtering - ${__P(adminBrowseOrdersGridScenario3_Filtering,0)} - = - - - adminBrowseOrdersGridScenario4_Sorting - ${__P(adminBrowseOrdersGridScenario4_Sorting,0)} + + loops + ${__P(loops,1)} = - - adminBrowseOrdersGridScenario5_FilteringAndSorting - ${__P(adminBrowseOrdersGridScenario5_FilteringAndSorting,0)} + + addToCartByCustomerPercentage + ${__P(addToCartByCustomerPercentage,0)} = - - adminBrowseProductsGridScenario1_ViewOddGridPages - ${__P(adminBrowseProductsGridScenario1_ViewOddGridPages,0)} + + addToCartByGuestPercentage + ${__P(addToCartByGuestPercentage,28)} = - - adminBrowseProductsGridScenario2_ViewEvenGridPages - ${__P(adminBrowseProductsGridScenario2_ViewEvenGridPages,0)} + + addToWishlistPercentage + ${__P(addToWishlistPercentage,2)} = - - adminBrowseProductsGridScenario3_Filtering - ${__P(adminBrowseProductsGridScenario3_Filtering,0)} + + adminAccountManagementPercentage + ${__P(adminAccountManagementPercentage,0)} = - - adminBrowseProductsGridScenario4_Sorting - ${__P(adminBrowseProductsGridScenario4_Sorting,0)} + + adminCMSManagementDelay + ${__P(adminCMSManagementDelay,0)} = - - adminBrowseProductsGridScenario5_FilteringAndSorting - ${__P(adminBrowseProductsGridScenario5_FilteringAndSorting,0)} + + adminCMSManagementPercentage + ${__P(adminCMSManagementPercentage,0)} = @@ -129,54 +94,29 @@ ${__P(adminCategoryCount,0)} = - - adminCategoryManagement - ${__P(adminCategoryManagement,0)} - = - adminCategoryManagementDelay ${__P(adminCategoryManagementDelay,0)} = - - admin_category_management_percent - ${__P(admin_category_management_percent,100)} - = - - - adminCMSManagement - ${__P(adminCMSManagement,0)} - = - - - adminCMSManagementDelay - ${__P(adminCMSManagementDelay,0)} - = - - - admin_cms_management_percent - ${__P(admin_cms_management_percent,100)} - = - - - adminCreateOrder - ${__P(adminCreateOrder,0)} + + adminCategoryManagementPercentage + ${__P(adminCategoryManagementPercentage,10)} = - - adminCreateProduct - ${__P(adminCreateProduct,0)} + + adminCreateOrderPercentage + ${__P(adminCreateOrderPercentage,70)} = - - adminCreateProduct_percent - ${__P(adminCreateProduct_percent,100)} + + adminCreateProcessReturns + ${__P(adminCreateProcessReturns,0)} = - - adminCustomerManagement - ${__P(adminCustomerManagement,0)} + + adminCreateProcessReturnsDelay + ${__P(adminCreateProcessReturnsDelay,0)} = @@ -184,9 +124,9 @@ ${__P(adminCustomerManagementDelay,0)} = - - admin_customer_management_percent - ${__P(admin_customer_management_percent,100)} + + adminCustomerManagementPercentage + ${__P(adminCustomerManagementPercentage,0)} = @@ -194,104 +134,104 @@ ${__P(adminEditOrder,0)} = + + adminEditOrderPercentage + ${__P(adminEditOrderPercentage,15)} + = + adminEditProduct ${__P(adminEditProduct,0)} = - - adminExportCustomers - ${__P(adminExportCustomers,0)} - = - - - adminExportProducts - ${__P(adminExportProducts,0)} - = - adminImportCustomerBehavior - ${__P(adminImportCustomerBehavior,)} + ${__P(adminImportCustomerBehavior,append)} = adminImportCustomerFilePath - ${__P(adminImportCustomerFilePath,0)} - = - - - adminImportCustomers - ${__P(adminImportCustomers,0)} + ${__P(adminImportCustomerFilePath,import_customers/customer_import_addupdate.csv)} = adminImportProductBehavior - ${__P(adminImportProductBehavior,)} + ${__P(adminImportProductBehavior,append)} = adminImportProductFilePath - ${__P(adminImportProductFilePath,0)} + ${__P(adminImportProductFilePath,import_products/product_import_append_1.csv)} = - - adminImportProductFilePath-2 - ${__P(adminImportProductFilePath-2,0)} + + adminPoolUsers + ${__P(adminPoolUsers,1)} = - - adminImportProducts - ${__P(adminImportProducts,0)} + + adminProductCreationPercentage + ${__P(adminProductCreationPercentage,25)} = - - adminPrepForImport - ${__P(adminPrepForImport,0)} + + adminProductEditingPercentage + ${__P(adminProductEditingPercentage,35)} = - - apiBrowseAndBuyFlow - ${__P(apiBrowseAndBuyFlow,0)} + + adminPromotionRulesPercentage + ${__P(adminPromotionRulesPercentage,15)} = - - apiBrowseAndBuyFlowPercent - ${__P(apiBrowseAndBuyFlowPercent,100)} + + adminPromotionsManagement + ${__P(adminPromotionsManagement,0)} = - - apiCustomerSync - ${__P(apiCustomerSync,0)} + + adminPromotionsManagementDelay + ${__P(adminPromotionsManagementDelay,0)} = - - apiCustomerSyncPercent - ${__P(apiCustomerSyncPercent,100)} + + adminReturnsManagementPercentage + ${__P(adminReturnsManagementPercentage,20)} = - - apiOrderInvoiceShipmentSync - ${__P(apiOrderInvoiceShipmentSync,0)} + + admin_browse_customer_filter_text + ${__P(admin_browse_customer_filter_text,Firstname)} + = + + + admin_browse_orders_filter_text + ${__P(admin_browse_orders_filter_text,pending)} = - - apiOrderInvoiceShipmentSyncPercent - ${__P(apiOrderInvoiceShipmentSyncPercent,100)} + + admin_browse_product_filter_text + ${__P(admin_browse_product_filter_text,Product)} = - - apiProductSync - ${__P(apiProductSync,0)} + + apiBasePercentage + ${__P(apiBasePercentage,0)} + = + + + apiOrderInvoiceShipmentSync + ${__P(apiOrderInvoiceShipmentSync,0)} = - - apiProductSyncPercent - ${__P(apiProductSyncPercent,100)} + + apiPoolUsers + ${__P(apiPoolUsers,0)} = - - apiSnapshot - ${__P(apiSnapshot,0)} + + apiProcessOrders + ${__P(apiProcessOrders,5)} = @@ -299,9 +239,29 @@ ${__P(bamboo_build_number,)} = - - base_path - ${__P(base_path,)} + + browseCatalogByCustomerPercentage + ${__P(browseCatalogByCustomerPercentage,0)} + = + + + browseCatalogByGuestPercentage + ${__P(browseCatalogByGuestPercentage,30)} + = + + + browseCustomerGridPercentage + ${__P(browseCustomerGridPercentage,10)} + = + + + browseOrderGridPercentage + ${__P(browseOrderGridPercentage,0)} + = + + + browseProductGridPercentage + ${__P(browseProductGridPercentage,0)} = @@ -309,39 +269,44 @@ ${__P(cache_indicator,0)} = - - catalogBrowsingByGuest - ${__P(catalogBrowsingByGuest,0)} + + categories_count + ${__P(categories_count,100)} = - - catalogBrowsingByCustomer - ${__P(catalogBrowsingByCustomer,0)} + + checkoutByCustomerPercentage + ${__P(checkoutByCustomerPercentage,4)} = - - checkoutByGuest - ${__P(checkoutByGuest,0)} + + checkoutByGuestPercentage + ${__P(checkoutByGuestPercentage,4)} = - - checkoutByCustomer - ${__P(checkoutByCustomer,0)} + + compareProductsPercentage + ${__P(compareProductsPercentage,2)} = - - customer_checkout_percent - ${__P(customer_checkout_percent,4)} + + configurable_products_count + ${__P(configurable_products_count,30)} + = + + + csrPoolUsers + ${__P(csrPoolUsers,0)} = - - customer_limit - ${__P(customer_limit,20)} + + customer_checkout_percent + ${__P(customer_checkout_percent,100)} = customer_password - 123123q + ${__P(customer_password,123123q)} = @@ -354,24 +319,39 @@ ${__P(dashboard_enabled,0)} = - - files_folder - ${__P(files_folder,/opt/mpaf/tool/fragments/files/)} + + exportCustomersPercentage + ${__P(exportCustomersPercentage,0)} + = + + + exportProductsPercentage + ${__P(exportProductsPercentage,0)} + = + + + form_key + ${__P(form_key,uVEW54r8kKday8Wk)} + = + + + frontendPoolUsers + ${__P(frontendPoolUsers,1)} = guest_checkout_percent - ${__P(guest_checkout_percent,4)} + ${__P(guest_checkout_percent,100)} = - - host - ${__P(host,)} + + importCustomersPercentage + ${__P(importCustomersPercentage,0)} = - - loops - ${__P(loops,1)} + + importProductsPercentage + ${__P(importProductsPercentage,0)} = @@ -379,34 +359,29 @@ ${__P(lineItemsAmount,10)} = - - orders - ${__P(orders,0)} - = - orders_page_size ${__P(orders_page_size,20)} = - - products_page_size - ${__P(products_page_size,20)} + + othersPoolUsers + ${__P(othersPoolUsers,0)} = - - productCompareByGuest - ${__P(productCompareByGuest,0)} + + productCompareDelay + ${__P(productCompareDelay,0)} = - - products_compare_delay - ${__P(product_compare_delay,0)} + + productGridMassActionPercentage + ${__P(productGridMassActionPercentage,0)} = - - product_compare_percent - ${__P(product_compare_percent,100)} + + products_page_size + ${__P(products_page_size,20)} = @@ -429,14 +404,9 @@ ${__P(response_time_file_name,production.csv)} = - - reviewByCustomer - ${__P(reviewByCustomer,0)} - = - - - review_percent - ${__P(review_percent,100)} + + reviewByCustomerPercentage + ${__P(reviewByCustomerPercentage,0)} = @@ -449,39 +419,29 @@ ${__P(scenario,)} = - - searchQuick - ${__P(searchQuick,0)} - = - - - searchQuick_percent - ${__P(searchQuick_percent,0)} - = - - - searchQuickFilter - ${__P(searchQuickFilter,0)} + + searchAdvancedPercentage + ${__P(searchAdvancedPercentage,10)} = - - searchQuickFilter_percent - ${__P(searchQuickFilter_percent,0)} + + searchQuickFilterPercentage + ${__P(searchQuickFilterPercentage,30)} = - - searchAdvanced - ${__P(searchAdvanced,0)} + + searchQuickPercentage + ${__P(searchQuickPercentage,60)} = - - searchAdvanced_percent - ${__P(searchAdvanced_percent,0)} + + simple_products_count + ${__P(simple_products_count,30)} = - - setupAndTearDownThread - ${__P(setupAndTearDownThread,1)} + + siteSearchPercentage + ${__P(siteSearchPercentage,30)} = @@ -491,7 +451,7 @@ start_time - ${__time(yyyy-MM-dd'T'HH:mm:ss.SSSZ)} + ${__P(start_time,${__time(yyyy-MM-dd'T'HH:mm:ss.SSSZ)})} = @@ -499,9 +459,9 @@ ${__P(starting_index,0)} = - - test_duration - ${__P(test_duration,900)} + + think_time_delay_offset + ${__P(think_time_delay_offset,2000)} = @@ -509,44 +469,14 @@ ${__P(think_time_deviation,1000)} = - - think_time_delay_offset - ${__P(think_time_delay_offset,2000)} - = - url_suffix - .html - = - - - users - ${__P(users,100)} - = - - - view_catalog_percent - ${__P(view_catalog_percent,62)} - = - - - view_product_add_to_cart_percent - ${__P(view_product_add_to_cart_percent,30)} + ${__P(url_suffix,.html)} = website_id - 1 - = - - - wishlistByCustomer - ${__P(wishlistByCustomer,0)} - = - - - wishlist_percent - ${__P(wishlist_percent,100)} + ${__P(website_id,1)} = @@ -558,6 +488,76 @@ + + false + + + + true + true + true + + true + true + true + true + false + true + true + false + false + true + false + false + true + false + false + 0 + true + true + true + true + + + + mpaf/tool/fragments/ce/view_results_tree.jmx + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + + + /tmp/aggregate-jmeter-results.jtl + mpaf/tool/fragments/ce/aggregate_report.jmx + + @@ -566,12 +566,12 @@ - http + ${request_protocol} utf-8 Java 4 - + mpaf/tool/fragments/ce/http_request_default.jmx @@ -593,9 +593,24 @@ gzip, deflate - + mpaf/tool/fragments/ce/http_header_manager.jmx + + stoptest + + false + 1 + + 1 + 1 + 1384333221000 + 1384333221000 + false + + + mpaf/tool/fragments/ce/setup/setup.jmx + @@ -607,28 +622,23 @@ true true + + ${form_key} + ${host} + ${base_path} + false + 0 + true + true + true - + mpaf/tool/fragments/ce/http_cookie_manager.jmx - - stoptest - - false - 1 - - ${setupAndTearDownThread} - 1 - 1384333221000 - 1384333221000 - false - - - - - - props.remove("category_url_key"); + + +props.remove("category_url_key"); props.remove("category_url_keys_list"); props.remove("category_name"); props.remove("category_names_list"); @@ -644,13 +654,14 @@ props.put("activeAdminThread", ""); String path = "${host}"; String environment = path.substring(4, 6); props.put("environment", environment); - - - false - - - - Boolean stopTestOnError (String error) { + + + false + mpaf/tool/fragments/ce/setup/initialize.jmx + + + + Boolean stopTestOnError (String error) { log.error(error); System.out.println(error); SampleResult.setStopTest(true); @@ -667,11 +678,14 @@ if (!slash.equals(path.substring(path.length() -1)) || !slash.equals(path.substr return stopTestOnError("\"base_path\" parameter is invalid. It must start and end with \"/\""); } - - - false - - + + + false + mpaf/tool/fragments/ce/setup/validate_user_defined_variables.jmx + + + + @@ -680,7 +694,7 @@ if (!slash.equals(path.substring(path.length() -1)) || !slash.equals(path.substr - + ${request_protocol} ${base_path}${admin_path} GET @@ -727,14 +741,14 @@ if (!slash.equals(path.substring(path.length() -1)) || !slash.equals(path.substr - false + true = true dummy - false + true ${admin_form_key} = true @@ -760,7 +774,7 @@ if (!slash.equals(path.substring(path.length() -1)) || !slash.equals(path.substr - + ${request_protocol} ${base_path}${admin_path}/admin/dashboard/ POST @@ -771,19 +785,18 @@ if (!slash.equals(path.substring(path.length() -1)) || !slash.equals(path.substr Java false - Implementation needs to be set to Java as per http://stackoverflow.com/questions/19636282/jmeter-error-in-redirect-url-for-get + mpaf/tool/fragments/ce/setup/login.jmx - - - <title>Dashboard / Magento Admin</title> - - Assertion.response_data - false - 2 - - - + + + <title>Dashboard / Magento Admin</title> + + Assertion.response_data + false + 2 + + false admin_form_key @@ -793,104 +806,11 @@ if (!slash.equals(path.substring(path.length() -1)) || !slash.equals(path.substr 1 - - - ^.+$ - - Assertion.response_data - false - 1 - variable - admin_form_key - - - - - - - true - ${admin_form_key} - = - true - form_key - - - true - types - = - true - massaction_prepare_key - - - true - config,layout,block_html,collections,reflection,db_ddl,eav,config_integration,full_page,target_rule,translate,config_webservice,config_integration_api - = - true - types - - - - - - - - - - ${base_path}${admin_path}/admin/cache/massEnable - POST - true - false - true - false - false - - Begin by enabling all cache types - - - - - - - true - ${admin_form_key} - = - true - form_key - - - true - types - = - true - massaction_prepare_key - - - true - config,layout,block_html,collections,reflection,db_ddl,eav,config_integration,full_page,target_rule,translate,config_webservice,config_integration_api - = - true - types - - - - - - - - - - ${base_path}${admin_path}/admin/cache/massRefresh - POST - true - false - true - false - false - - Refresh all cache types - - + + + + @@ -909,7 +829,7 @@ if (!slash.equals(path.substring(path.length() -1)) || !slash.equals(path.substr false false - Site - Get Category 1 + mpaf/tool/fragments/ce/setup/extract_categories.jmx @@ -960,15 +880,15 @@ if (!slash.equals(path.substring(path.length() -1)) || !slash.equals(path.substr import java.util.ArrayList; -// If it is first iteration of cycle then recreate category url key list -if (1 == Integer.parseInt(vars.get("category_url_key_counter"))) { - categoryUrlKeysList = new ArrayList(); - props.put("category_url_keys_list", categoryUrlKeysList); - props.put("category_url_key", vars.get("category_url_key")); -} else { - categoryUrlKeysList = props.get("category_url_keys_list"); -} -categoryUrlKeysList.add(vars.get("category_url_key")); + // If it is first iteration of cycle then recreate category url key list + if (1 == Integer.parseInt(vars.get("category_url_key_counter"))) { + categoryUrlKeysList = new ArrayList(); + props.put("category_url_keys_list", categoryUrlKeysList); + props.put("category_url_key", vars.get("category_url_key")); + } else { + categoryUrlKeysList = props.get("category_url_keys_list"); + } + categoryUrlKeysList.add(vars.get("category_url_key")); false @@ -993,16 +913,16 @@ categoryUrlKeysList.add(vars.get("category_url_key")); import java.util.ArrayList; -// If it is first iteration of cycle then recreate category name list -if (1 == Integer.parseInt(vars.get("category_name_counter"))) { - categoryNamesList = new ArrayList(); - props.put("category_names_list",categoryNamesList); - props.put("category_name", vars.get("category_name")); -} else { - categoryNamesList = props.get("category_names_list"); -} -log.info("category name: " + vars.get("category_name")); -categoryNamesList.add(vars.get("category_name")); + // If it is first iteration of cycle then recreate category name list + if (1 == Integer.parseInt(vars.get("category_name_counter"))) { + categoryNamesList = new ArrayList(); + props.put("category_names_list",categoryNamesList); + props.put("category_name", vars.get("category_name")); + } else { + categoryNamesList = props.get("category_names_list"); + } + log.info("category name: " + vars.get("category_name")); + categoryNamesList.add(vars.get("category_name")); false @@ -1011,69 +931,51 @@ categoryNamesList.add(vars.get("category_name")); props.put("category_url_key", vars.get("category_url_key")); -props.put("category_name", vars.get("category_name")); + props.put("category_name", vars.get("category_name")); false - - - - - - - - - - - - ${base_path}catalogsearch/result/?limit=30&q=Simple - GET - true - false - true - false - false - - + + + + mpaf/tool/fragments/ce/setup/extract_configurable_products.jmx + + + - - - (?i)Search results for: (.+?)Simple(.+?) + + + + Content-Type + application/json + + + Accept + */* + - Assertion.response_data - false - 2 - - - - false - simple_products_url_keys - <a class="product-item-link"(?s).+?href="http://${host}${base_path}(index.php/)?([^'"]+)${url_suffix}">(?s).+?Simple - $2$ - - -1 - + - - - simple_products_url_keys - simple_products_url_key - true - - - - - + + true + + + + false + {"username":"${admin_user}","password":"${admin_password}"} + = + + - + ${request_protocol} - ${base_path}${simple_products_url_key}${url_suffix} - GET + ${base_path}rest/V1/integration/admin/token + POST true false true @@ -1082,106 +984,152 @@ props.put("category_name", vars.get("category_name")); - - - simple_product_id - .//input[@type="hidden" and @name="product"]/@value - false - true - false - - - - - simple_product_title - .//*[@data-ui-id='page-title-wrapper']/text() - false - true - false - - - - false - simple_product_uenc - "uenc":"([^"]+)" - $1$ - - 1 - simple_product_1_url_key - + + admin_token + $ + + + BODY + - + - ^\d+$ + ^[a-z0-9-]+$ Assertion.response_data false 1 variable - simple_product_id + admin_token - - - ^.+$ + + + + + Authorization + Bearer ${admin_token} + + + + + + + + + true + type_id + = + true + searchCriteria[filterGroups][0][filters][0][field] + + + true + configurable + = + true + searchCriteria[filterGroups][0][filters][0][value] + + + true + ${configurable_products_count} + = + true + searchCriteria[pageSize] + - Assertion.response_data - false - 1 - variable - simple_product_title - + + + + + + ${request_protocol} + + ${base_path}rest/V1/products + GET + true + false + true + false + false + + + + + false + configurable_products_url_keys + url_key\",\"value\":\"(.*?)\" + $1$ + + -1 + - - - ^[a-z0-9-]+$ - - Assertion.response_data - false - 1 - variable - simple_products_url_key - + + false + configurable_product_ids + \"id\":(\d+), + $1$ + + -1 + - - - ^.+$ - - Assertion.response_data - false - 1 - variable - simple_product_uenc - + + false + configurable_product_names + name\":\"(.*?)\" + $1$ + + -1 + + + + false + configurable_product_skus + sku\":\"(.*?)\" + $1$ + + -1 + + + + configurable_product_ids + configurable_product_id + true + + 1 1 - simple_products_counter + configurable_products_counter false - + import java.util.ArrayList; import java.util.HashMap; +import org.apache.commons.codec.binary.Base64; // If it is first iteration of cycle then recreate productList -if (1 == Integer.parseInt(vars.get("simple_products_counter"))) { +if (1 == Integer.parseInt(vars.get("configurable_products_counter"))) { productList = new ArrayList(); - props.put("simple_products_list", productList); + props.put("configurable_products_list", productList); } else { - productList = props.get("simple_products_list"); + productList = props.get("configurable_products_list"); } +String productUrl = vars.get("request_protocol") + "://" + vars.get("host") + vars.get("base_path") + vars.get("configurable_products_url_keys_" + vars.get("configurable_products_counter"))+ vars.get("url_suffix"); +encodedUrl = Base64.encodeBase64(productUrl.getBytes()); // Create product map Map productMap = new HashMap(); -productMap.put("id", vars.get("simple_product_id")); -productMap.put("title", vars.get("simple_product_title")); -productMap.put("url_key", vars.get("simple_products_url_key")); -productMap.put("uenc", vars.get("simple_product_uenc")); +productMap.put("id", vars.get("configurable_product_id")); +productMap.put("title", vars.get("configurable_product_names_" + vars.get("configurable_products_counter"))); +productMap.put("sku", vars.get("configurable_product_skus_" + vars.get("configurable_products_counter"))); +productMap.put("url_key", vars.get("configurable_products_url_keys_" + vars.get("configurable_products_counter"))); +productMap.put("uenc", new String(encodedUrl)); // Collect products map in products list productList.add(productMap); @@ -1191,64 +1139,46 @@ productList.add(productMap); - - - - - - - - - - - ${base_path}catalogsearch/result/?limit=30&q=Configurable - GET - true - false - true - false - false - - + + + + mpaf/tool/fragments/ce/setup/extract_simple_products.jmx + + + - - - Search results for: (.+?)Configurable(.+?) - <div class="search results"> + + + + Content-Type + application/json + + + Accept + */* + - Assertion.response_data - false - 2 - - - - false - configurable_products_url_keys - <a class="product-item-link"(?s).+?href="http://${host}${base_path}(index.php/)?([^'"]+)${url_suffix}">(?s).+?Configurable - $2$ - - -1 - + - - - configurable_products_url_keys - configurable_products_url_key - true - - - - - + + true + + + + false + {"username":"${admin_user}","password":"${admin_password}"} + = + + - + ${request_protocol} - ${base_path}${configurable_products_url_key}${url_suffix} - GET + ${base_path}rest/V1/integration/admin/token + POST true false true @@ -1257,177 +1187,223 @@ productList.add(productMap); - - - configurable_product_id - .//input[@type="hidden" and @name="product"]/@value - false - true - false - - - - - configurable_product_title - .//*[@data-ui-id='page-title-wrapper']/text() - false - true - false - - - - false - configurable_product_uenc - "uenc":"([^"]+)" - $1$ - - 1 - simple_product_1_url_key - + + admin_token + $ + + + BODY + - + + + ^[a-z0-9-]+$ + + Assertion.response_data + false + 1 + variable + admin_token + + + + + + + Authorization + Bearer ${admin_token} + + + + + + + + + true + type_id + = + true + searchCriteria[filterGroups][0][filters][0][field] + + + true + simple + = + true + searchCriteria[filterGroups][0][filters][0][value] + + + true + ${simple_products_count} + = + true + searchCriteria[pageSize] + + + + + + + + ${request_protocol} + + ${base_path}rest/V1/products + GET + true + false + true + false + false + + + + false - configurable_product_attribute_id - "[sp|json]+Config": \{"attributes":\{.*:{"id":"(\d+).*:{"id":"(\d+) + simple_products_url_keys + url_key\",\"value\":\"(.*?)\" $1$ - 1 + -1 - + false - configurable_product_attribute_id_2 - "[sp|json]+Config": \{"attributes":\{.*:{"id":"(\d+).*:{"id":"(\d+) - $2$ + simple_product_ids + \"id\":(\d+), + $1$ - 1 + -1 - + false - configurable_product_attribute_option_id - "options":\[\{"id":"(\d+)" + simple_product_names + name\":\"(.*?)\" $1$ - 1 + -1 - + false - configurable_product_attribute_option_id_2 - "options":\[\{"id":"(\d+)" + simple_product_skus + sku\":\"(.*?)\" $1$ - 2 + -1 - - - ^\d+$ - - Assertion.response_data - false - 1 - variable - configurable_product_id - - - - - ^.+$ - - Assertion.response_data - false - 1 - variable - configurable_product_title - - - - - ^[a-z0-9-]+$ - - Assertion.response_data - false - 1 - variable - configurable_products_url_key - - - - - ^\d+$ - - Assertion.response_data - false - 1 - variable - configurable_product_attribute_id - - - - - ^\d+$ - - Assertion.response_data - false - 1 - variable - configurable_product_attribute_option_id - - - - - ^.+$ - - Assertion.response_data - false - 1 - variable - configurable_product_uenc - - + + + simple_product_ids + simple_product_id + true + + 1 1 - configurable_products_counter + simple_products_counter false - + import java.util.ArrayList; import java.util.HashMap; +import org.apache.commons.codec.binary.Base64; // If it is first iteration of cycle then recreate productList -if (1 == Integer.parseInt(vars.get("configurable_products_counter"))) { +if (1 == Integer.parseInt(vars.get("simple_products_counter"))) { productList = new ArrayList(); - props.put("configurable_products_list", productList); + props.put("simple_products_list", productList); } else { - productList = props.get("configurable_products_list"); + productList = props.get("simple_products_list"); } - +String productUrl = vars.get("request_protocol") + "://" + vars.get("host") + vars.get("base_path") + vars.get("simple_products_url_keys_" + vars.get("simple_products_counter"))+ vars.get("url_suffix"); +encodedUrl = Base64.encodeBase64(productUrl.getBytes()); // Create product map Map productMap = new HashMap(); -productMap.put("id", vars.get("configurable_product_id")); -productMap.put("title", vars.get("configurable_product_title")); -productMap.put("url_key", vars.get("configurable_products_url_key")); -productMap.put("uenc", vars.get("configurable_product_uenc")); -productMap.put("attribute_id", vars.get("configurable_product_attribute_id")); -productMap.put("attribute_id_2", vars.get("configurable_product_attribute_id_2")); -productMap.put("attribute_option_id", vars.get("configurable_product_attribute_option_id")); -productMap.put("attribute_option_id_2", vars.get("configurable_product_attribute_option_id_2")); +productMap.put("id", vars.get("simple_product_id")); +productMap.put("title", vars.get("simple_product_names_" + vars.get("simple_products_counter"))); +productMap.put("sku", vars.get("simple_product_skus_" + vars.get("simple_products_counter"))); +productMap.put("url_key", vars.get("simple_products_url_keys_" + vars.get("simple_products_counter"))); +productMap.put("uenc", new String(encodedUrl)); // Collect products map in products list -productList.add(productMap); +productList.add(productMap); false + + + + mpaf/tool/fragments/ce/setup/extract_admin_users.jmx + + + + + + + false + ${admin_form_key} + = + true + form_key + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/user/roleGrid/limit/200/?ajax=true&isAjax=true + POST + true + false + true + false + false + + + + + + + false + import java.util.regex.Pattern; + import java.util.regex.Matcher; + import java.util.LinkedList; + + LinkedList adminUserList = new LinkedList(); + String response = new String(data); + Pattern pattern = Pattern.compile("<td\\W*?data-column=.username[^>]*?>\\W*?(\\w+)\\W*?<"); + Matcher matcher = pattern.matcher(response); + + while (matcher.find()) { + adminUserList.add(matcher.group(1)); + } + + adminUserList.poll(); + props.put("adminUserList", adminUserList); + + + + + + + + mpaf/tool/fragments/ce/setup/extract_customers.jmx + + @@ -1436,7 +1412,7 @@ productList.add(productMap); - + ${request_protocol} ${base_path}${admin_path}/customer/index/ GET @@ -1470,138 +1446,165 @@ manager.add(cookie); - - - - - - true - customer_listing - = - true - namespace - - - true - - = - true - search - - - true - customer_since[locale]=en_US&website_id=1 - = - true - filters[placeholder] - - - true - ${customers_page_size} - = - true - paging[pageSize] - - - true - 1 - = - true - paging[current] - - - true - entity_id - = - true - sorting[field] - - - true - asc - = - true - sorting[direction] - - - true - true - = - true - isAjax - - - - - - - - - - ${base_path}${admin_path}/mui/index/render/ - GET - true - false - true - false - false - - - - - - \"totalRecords\":0 - - Assertion.response_data - false - 20 - - - - false - customer_emails - \"email\":\"([^"]+) - $1$ - - -1 - - - - false - customer_ids - \"entity_id\":\"([^"]+) - $1$ - - -1 - - - - - customer_emails - customer_email - true - - - - 1 - - 1 - email_counter - - false + + + + + true + customer_listing + = + true + namespace + + + true + entity_id + = + true + sorting[field] + + + true + asc + = + true + sorting[direction] + + + true + true + = + true + isAjax + + + true + customer_since[locale]=en_US + = + true + filters[placeholder] + + + true + 1 + = + true + filters[website_id] + + + true + ${customers_page_size} + = + true + paging[pageSize] + + + true + 1 + = + true + paging[current] + + + true + entity_id + = + true + sorting[field] + + + true + asc + = + true + sorting[direction] + + + true + true + = + true + isAjax + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + + + + $.totalRecords + 0 + true + false + true + true + + + + customer_emails + $.items[*].email + + + BODY + + + + customer_ids + $.items[*].entity_id + + + BODY + + + + false + + + import java.util.LinkedList; +LinkedList emailsList = new LinkedList(); +props.put("customer_emails_list", emailsList); + + + + + customer_emails + customer_email + true + + + + 1 + + 1 + email_counter + + false - import java.util.ArrayList; + +try { -// If it is first iteration of cycle then recreate emailsList -if (1 == Integer.parseInt(vars.get("email_counter"))) { - emailsList = new ArrayList(); - props.put("customer_emails_list", emailsList); -} else { - emailsList = props.get("customer_emails_list"); +props.get("customer_emails_list").add(vars.get("customer_email")); + +} catch (java.lang.Exception e) { + log.error("error…", e); + SampleResult.setStopThread(true); } -emailsList.add(vars.get("customer_email")); + false @@ -1640,46 +1643,12 @@ idsList.add(vars.get("customer_id")); - - Boolean stopTestOnError (String error) { - log.error(error); - System.out.println(error); - SampleResult.setStopTest(true); - return false; -} - -if (props.get("simple_products_list") == null) { - return stopTestOnError("Cannot find simple products. Test stopped."); -} -if (props.get("configurable_products_list") == null) { - return stopTestOnError("Cannot find configurable products. Test stopped."); -} -if (props.get("customer_emails_list") == null) { - return stopTestOnError("Cannot find customer emails. Test stopped."); -} -if (props.get("category_url_keys_list") == null) { - return stopTestOnError("Cannot find category url keys. Test stopped."); -} -if (props.get("category_names_list") == null) { - return stopTestOnError("Cannot find category names. Test stopped."); -} -int orders = Integer.parseInt(vars.get("orders")); - - -if (orders > 0) { - int checkout_sum = Integer.parseInt(vars.get("guest_checkout_percent")) + Integer.parseInt(vars.get("customer_checkout_percent")); - checkout_sum = checkout_sum > 0 ? checkout_sum : 1; - int users = orders * (100 / checkout_sum); - props.put("users", users); -} else { - props.put("users", Integer.parseInt(vars.get("users"))); -} - - - - false - - + + + + mpaf/tool/fragments/ce/setup/cache.jmx + + "${cache_indicator}" == "1" || "${cache_indicator}" == "2" false @@ -1687,7 +1656,7 @@ if (orders > 0) { // Default to disable all cache types -vars.put("cache_types", "config,layout,block_html,collections,reflection,db_ddl,eav,config_integration,full_page,target_rule,translate,config_webservice,config_integration_api"); +vars.put("cache_types", "config,layout,block_html,collections,reflection,db_ddl,eav,config_integration,full_page,translate,config_webservice,config_integration_api"); if ("${cache_indicator}" == "1") { // Only disable Full Page Cache @@ -1729,7 +1698,7 @@ if ("${cache_indicator}" == "1") { - + ${request_protocol} ${base_path}${admin_path}/admin/cache/massDisable POST @@ -1752,7 +1721,7 @@ if ("${cache_indicator}" == "1") { - false + true ${admin_form_key} = true @@ -1765,7 +1734,7 @@ if ("${cache_indicator}" == "1") { - + ${request_protocol} ${base_path}${admin_path}/admin/cache/ GET @@ -1792,7 +1761,6 @@ if ("${cache_indicator}" == "1") { INTEGRATION_API_CONFIG(?s).+?<span>Enabled</span> WEBSERVICE(?s).+?<span>Enabled</span> REFLECTION(?s).+?<span>Enabled</span> - TARGET_RULE(?s).+?<span>Enabled</span> Assertion.response_data false @@ -1810,7 +1778,7 @@ if ("${cache_indicator}" == "1") { - false + true ${admin_form_key} = true @@ -1823,7 +1791,7 @@ if ("${cache_indicator}" == "1") { - + ${request_protocol} ${base_path}${admin_path}/admin/cache/ GET @@ -1850,7 +1818,6 @@ if ("${cache_indicator}" == "1") { INTEGRATION_API_CONFIG(?s).+?<span>Enabled</span> WEBSERVICE(?s).+?<span>Enabled</span> REFLECTION(?s).+?<span>Enabled</span> - TARGET_RULE(?s).+?<span>Enabled</span Assertion.response_data false @@ -1868,7 +1835,7 @@ if ("${cache_indicator}" == "1") { - false + true ${admin_form_key} = true @@ -1881,7 +1848,7 @@ if ("${cache_indicator}" == "1") { - + ${request_protocol} ${base_path}${admin_path}/admin/cache/ GET @@ -1908,7 +1875,6 @@ if ("${cache_indicator}" == "1") { INTEGRATION_API_CONFIG(?s).+?<span>Disabled</span> WEBSERVICE(?s).+?<span>Disabled</span> REFLECTION(?s).+?<span>Disabled</span> - TARGET_RULE(?s).+?<span>Disabled</span Assertion.response_data false @@ -1917,326 +1883,135 @@ if ("${cache_indicator}" == "1") { - - - - - true - ["customer_form_login"] - = - true - blocks - - - true - ["default","customer_account_login"] - = - true - handles - - - true - {"route":"customer","controller":"account","action":"login","uri":"/customer/account/login/"} - = - true - originalRequest - - - true - true - = - true - ajax - - - true - true - = - true - isAjax - - - - - - - - - - ${base_path}page_cache/block/render/ - GET - true - false - true - false - false - - - - - - "customer_form_login" - Registered Customers - form_key - - Assertion.response_data - false - 2 - - - - false - form_key - <input name=\\"form_key\\" type=\\"hidden\\" value=\\"([^'"]+)\\" \\/> - $1$ - - 1 - - - - - ^.+$ - - Assertion.response_data - false - 1 - variable - form_key - - - - - - - - false - 1 - = - true - product - - - false - - = - true - related_product - - - false - 1 - = - true - qty - - - false - ${form_key} - = - true - form_key - - - - - - - - - - ${base_path}checkout/cart/add - POST - true - false - true - false - false - - - - - continue - - false - ${loops} - - ${__javaScript(Math.round(props.get("users")*${view_catalog_percent}/100>>0))} - ${ramp_period} - 1437409133000 - 1437409133000 - false - - - - - - rv1 - '.' - 1 - 999999 - 1 - true - - - - - rv2 - '.' - 1 - 999999 - 2 - true - - - - - rv3 - '.' - 1 - 999999 - 3 - true - - - - - Passing arguments between threads - number = (int)(${rv1} * props.get("simple_products_list").size()); -simpleList = props.get("simple_products_list").get(number); -vars.put("simple_product_1_url_key", simpleList.get("url_key")); -vars.put("simple_product_1_name", simpleList.get("title")); -vars.put("simple_product_1_id", simpleList.get("id")); - -number1 = (int)(${rv2} * props.get("simple_products_list").size()); -simpleList = props.get("simple_products_list").get(number1); -vars.put("simple_product_2_url_key", simpleList.get("url_key")); -vars.put("simple_product_2_name", simpleList.get("title")); -vars.put("simple_product_2_id", simpleList.get("id")); - -number = (int)(${rv3} * props.get("configurable_products_list").size()); -configurableList = props.get("configurable_products_list").get(number); -vars.put("configurable_product_1_url_key", configurableList.get("url_key")); -vars.put("configurable_product_1_name", configurableList.get("title")); -vars.put("configurable_product_1_id", configurableList.get("id")); + + Boolean stopTestOnError (String error) { + log.error(error); + System.out.println(error); + SampleResult.setStopTest(true); + return false; +} -number = (int)(Math.random() * props.get("category_url_keys_list").size()); -vars.put("category_url_key", props.get("category_url_keys_list").get(number)); -vars.put("category_name", props.get("category_names_list").get(number)); -vars.put("testLabel", "CatProdBrows"); +if (props.get("simple_products_list") == null) { + return stopTestOnError("Cannot find simple products. Test stopped."); +} +if (props.get("configurable_products_list") == null) { + return stopTestOnError("Cannot find configurable products. Test stopped."); +} +if (props.get("customer_emails_list") == null) { + return stopTestOnError("Cannot find customer emails. Test stopped."); +} +if (props.get("category_url_keys_list") == null) { + return stopTestOnError("Cannot find category url keys. Test stopped."); +} +if (props.get("category_names_list") == null) { + return stopTestOnError("Cannot find category names. Test stopped."); +} + - true - - - - - - - - - - - - - - ${base_path} - GET - true - false - true - false - false - - - - - - <title>Home page</title> - - Assertion.response_data - false - 2 - - - - - - ${think_time_delay_offset} - ${think_time_deviation} - + false + mpaf/tool/fragments/ce/setup/validate_properties.jmx - + - + + + true + 1 + = + true + product + + + true + + = + true + related_product + + + true + 1 + = + true + qty + + + true + ${form_key} + = + true + form_key + + - + ${request_protocol} - ${base_path}${category_url_key}${url_suffix} - GET + ${base_path}checkout/cart/add + POST true false true false false - - - - - <span class="base" data-ui-id="page-title">${category_name}</span> - - Assertion.response_data - false - 6 - - - - false - category_id - <li class="item category([^'"]+)">\s*<strong>${category_name}</strong>\s*</li> - $1$ - - 1 - simple_product_1_url_key - - - - - ^[0-9]+$ - - Assertion.response_data - false - 1 - variable - category_id - - - - - - ${think_time_delay_offset} - ${think_time_deviation} - + mpaf/tool/fragments/ce/setup/warmup_add_to_cart.jmx - + - + + + false + ["customer_form_login"] + = + true + blocks + + + false + ["default","customer_account_login"] + = + true + handles + + + false + {"route":"customer","controller":"account","action":"login","uri":"/customer/account/login/"} + = + true + originalRequest + + + true + true + = + true + ajax + + + true + true + = + true + isAjax + + - + ${request_protocol} - ${base_path}${simple_product_1_url_key}${url_suffix} + ${base_path}page_cache/block/render/ GET true false @@ -2244,12 +2019,13 @@ vars.put("testLabel", "CatProdBrows"); false false - + mpaf/tool/fragments/ce/setup/ajax_load_login_form.jmx - <title>${simple_product_1_name} - <span>In stock</span> + "customer_form_login" + Registered Customers + form_key Assertion.response_data false @@ -2257,14 +2033,153 @@ vars.put("testLabel", "CatProdBrows"); + + + + continue + + false + ${loops} + + ${frontendPoolUsers} + ${ramp_period} + 1505803944000 + 1505803944000 + false + + + mpaf/tool/fragments/_system/thread_group.jmx + + + 1 + false + 1 + ${browseCatalogByCustomerPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Catalog Browsing By Customer"); + + true + + + + + + + 30 + ${host} + / + false + 0 + true + true + + + ${form_key} + ${host} + ${base_path} + false + 0 + true + true + + + true + mpaf/tool/fragments/ce/http_cookie_manager.jmx + - - ${think_time_delay_offset} - ${think_time_deviation} - + + mpaf/tool/fragments/ce/common/init_random_generator_setup.jmx + +import java.util.Random; + +Random random = new Random(); +if (${seedForRandom} > 0) { + random.setSeed(${seedForRandom} + ${__threadNum}); +} + +vars.putObject("randomIntGenerator", random); + + + + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("category_url_keys_list").size()); + +vars.put("category_url_key", props.get("category_url_keys_list").get(number)); +vars.put("category_name", props.get("category_names_list").get(number)); + + + + false + mpaf/tool/fragments/ce/common/extract_category_setup.jmx + + + + mpaf/tool/fragments/ce/get_customer_email.jmx + import org.apache.jmeter.samplers.SampleResult; + +String siterator = vars.get("customer_emails_index"); +int iterator; +if(siterator == null){ + iterator = 0; + vars.put("customer_emails_index", "0"); +} else { + iterator = Integer.parseInt(siterator); + iterator ++; + vars.put("customer_emails_index", iterator.toString()); +} + +emails_list = props.get("customer_emails_list"); + +threadsNumber = ctx.getThreadGroup().getNumThreads(); +emailsCount = emails_list.size(); +if (threadsNumber > emailsCount) { + log.error(" There are not enough customers for this scenario."); +} else { + clusterLength = Math.round(emailsCount / threadsNumber); + threadNum = ctx.getThreadNum(); + emails_index = clusterLength * threadNum + iterator; + maxLimit = clusterLength * (threadNum + 1); + if (emails_index >= maxLimit) { + iterator = 0; + emails_index = clusterLength * threadNum + iterator; + vars.put("customer_emails_index", iterator.toString()); + } +} +vars.put("customer_email", emails_list.get(emails_index)); + + + true + - + @@ -2272,9 +2187,9 @@ vars.put("testLabel", "CatProdBrows"); - + ${request_protocol} - ${base_path}${simple_product_2_url_key}${url_suffix} + ${base_path}customer/account/login/ GET true false @@ -2282,12 +2197,11 @@ vars.put("testLabel", "CatProdBrows"); false false - + mpaf/tool/fragments/ce/common/open_login_page.jmx - <title>${simple_product_2_name} - <span>In stock</span> + <title>Customer Login</title> Assertion.response_data false @@ -2296,196 +2210,36 @@ vars.put("testLabel", "CatProdBrows"); - - ${think_time_delay_offset} - ${think_time_deviation} - - - - - - - - - - - - - - ${base_path}${configurable_product_1_url_key}${url_suffix} - GET - true - false - true - false - false - - - - - - <title>${configurable_product_1_name} - <span>In stock</span> - - Assertion.response_data - false - 2 - - - - - - - continue - - false - ${loops} - - ${__javaScript(Math.round(props.get("users")*${view_product_add_to_cart_percent}/100>>0))} - ${ramp_period} - 1437411475000 - 1437411475000 - false - - - - - - rv1 - '.' - 1 - 999999 - 1 - true - - - - - rv2 - '.' - 1 - 999999 - 2 - true - - - - - rv3 - '.' - 1 - 999999 - 3 - true - - - - - Passing arguments between threads - number = (int)(${rv1} * props.get("simple_products_list").size()); -simpleList = props.get("simple_products_list").get(number); -vars.put("simple_product_1_url_key", simpleList.get("url_key")); -vars.put("simple_product_1_name", simpleList.get("title")); -vars.put("simple_product_1_id", simpleList.get("id")); -vars.put("simple_product_1_uenc", simpleList.get("uenc")); - -number1 = (int)(${rv2} * props.get("simple_products_list").size()); -simpleList = props.get("simple_products_list").get(number1); -vars.put("simple_product_2_url_key", simpleList.get("url_key")); -vars.put("simple_product_2_name", simpleList.get("title")); -vars.put("simple_product_2_id", simpleList.get("id")); -vars.put("simple_product_2_uenc", simpleList.get("uenc")); - -number = (int)(${rv3} * props.get("configurable_products_list").size()); -configurableList = props.get("configurable_products_list").get(number); -vars.put("configurable_product_1_url_key", configurableList.get("url_key")); -vars.put("configurable_product_1_name", configurableList.get("title")); -vars.put("configurable_product_1_id", configurableList.get("id")); -vars.put("configurable_attribute_id", configurableList.get("attribute_id")); -vars.put("configurable_attribute_id_2", configurableList.get("attribute_id_2")); -vars.put("configurable_option_id", configurableList.get("attribute_option_id")); -vars.put("configurable_option_id_2", configurableList.get("attribute_option_id_2")); -vars.put("configurable_product_1_uenc", simpleList.get("uenc")); - -number = (int)(Math.random() * props.get("category_url_keys_list").size()); -vars.put("category_url_key", props.get("category_url_keys_list").get(number)); -vars.put("category_name", props.get("category_names_list").get(number)); -vars.put("testLabel", "BrowsAddToCart"); -vars.put("loadType", "Guest"); - - - true - - - - - - - - - - - - - - ${base_path} - GET - true - false - true - false - false - - - - - - <title>Home page</title> - - Assertion.response_data - false - 2 - - - - - + - - true - ["customer_form_login"] - = - true - blocks - - + true - ["default","customer_account_login"] + ${form_key} = true - handles + form_key - + true - {"route":"customer","controller":"account","action":"login","uri":"/customer/account/login/"} + ${customer_email} = true - originalRequest + login[username] - + true - true + ${customer_password} = true - ajax + login[password] - + true - true + = true - isAjax + send @@ -2493,39 +2247,37 @@ vars.put("loadType", "Guest"); - + ${request_protocol} - ${base_path}page_cache/block/render/ - GET + ${base_path}customer/account/loginPost/ + POST true false true false false - + mpaf/tool/fragments/ce/common/login.jmx - "customer_form_login" - Registered Customers - form_key + <title>My Account</title> Assertion.response_data false 2 - + false - form_key - <input name=\\"form_key\\" type=\\"hidden\\" value=\\"([^'"]+)\\" \\/> + addressId + customer/address/edit/id/([^'"]+)/ $1$ 1 - + ^.+$ @@ -2533,18 +2285,85 @@ vars.put("loadType", "Guest"); false 1 variable - form_key + addressId - - - ${think_time_delay_offset} - ${think_time_deviation} - + + + + + true + + = + true + sections + + + true + false + = + true + update_section_id + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ + + + + + + + + ${request_protocol} + + ${base_path}customer/section/load/ + GET + true + false + true + false + false + + - + + + + + + + + + ${request_protocol} + + ${base_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/open_home_page.jmx + + + + <title>Home page</title> + + Assertion.response_data + false + 2 + + + + + @@ -2552,7 +2371,7 @@ vars.put("loadType", "Guest"); - + ${request_protocol} ${base_path}${category_url_key}${url_suffix} GET @@ -2562,7 +2381,7 @@ vars.put("loadType", "Guest"); false false - + mpaf/tool/fragments/ce/common/open_category.jmx @@ -2596,134 +2415,594 @@ vars.put("loadType", "Guest"); - - ${think_time_delay_offset} - ${think_time_deviation} - - - - - - - - - - - - - - ${base_path}${simple_product_1_url_key}${url_suffix} - GET - true - false - true - false - false - - + + true + 2 + mpaf/tool/fragments/ce/loop_controller.jmx - - - <title>${simple_product_1_name} - <span>In stock</span> - - Assertion.response_data - false - 2 - + + 1 + + 1 + _counter + + true + true + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("simple_products_list").size()); +product = props.get("simple_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/simple_products_setup.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + - - ${think_time_delay_offset} - ${think_time_deviation} - + + true + 1 + mpaf/tool/fragments/ce/loop_controller.jmx + + + 1 + + 1 + _counter + + true + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("configurable_products_list").size()); +product = props.get("configurable_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/configurable_products_setup.jmx - - - - - false - ${simple_product_1_id} - = - true - product - - - false - - = - true - related_product - - - false - 1 - = - true - qty - - - false - ${form_key} - = - true - form_key - - + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + + + + 1 + false + 1 + ${browseCatalogByGuestPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Catalog Browsing By Guest"); + + true + + + + + + + 30 + ${host} + / + false + 0 + true + true + + + ${form_key} + ${host} + ${base_path} + false + 0 + true + true + + + true + mpaf/tool/fragments/ce/http_cookie_manager.jmx + + + + mpaf/tool/fragments/ce/common/init_random_generator_setup.jmx + +import java.util.Random; + +Random random = new Random(); +if (${seedForRandom} > 0) { + random.setSeed(${seedForRandom} + ${__threadNum}); +} + +vars.putObject("randomIntGenerator", random); + + + + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("category_url_keys_list").size()); + +vars.put("category_url_key", props.get("category_url_keys_list").get(number)); +vars.put("category_name", props.get("category_names_list").get(number)); + + + + false + mpaf/tool/fragments/ce/common/extract_category_setup.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/open_home_page.jmx + + + + <title>Home page</title> + + Assertion.response_data + false + 2 + + + + + + + - + ${request_protocol} - ${base_path}checkout/cart/add/uenc/${simple_product_1_uenc}/product/${simple_product_1_id}/ - POST + ${base_path}${category_url_key}${url_suffix} + GET true false true false false - + mpaf/tool/fragments/ce/common/open_category.jmx + + + + <span class="base" data-ui-id="page-title">${category_name}</span> + + Assertion.response_data + false + 6 + + + + false + category_id + <li class="item category([^'"]+)">\s*<strong>${category_name}</strong>\s*</li> + $1$ + + 1 + simple_product_1_url_key + + + + + ^[0-9]+$ + + Assertion.response_data + false + 1 + variable + category_id + + + + + + true + 2 + mpaf/tool/fragments/ce/loop_controller.jmx + + + 1 + + 1 + _counter + + true + true + + + + + +import java.util.Random; +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("simple_products_list").size()); +product = props.get("simple_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/simple_products_setup.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + + true + 1 + mpaf/tool/fragments/ce/loop_controller.jmx - - - - X-Requested-With - XMLHttpRequest + + 1 + + 1 + _counter + + true + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("configurable_products_list").size()); +product = props.get("configurable_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/configurable_products_setup.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + + + + 1 + false + 1 + ${siteSearchPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Site Search"); + + true + + + + + ${files_folder}search_terms.csv + UTF-8 + + , + false + true + false + shareMode.thread + mpaf/tool/fragments/ce/search/search_terms.jmx + + + + 1 + false + 1 + ${searchQuickPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Quick Search"); + + true + + + + + + + 30 + ${host} + / + false + 0 + true + true + + + ${form_key} + ${host} + ${base_path} + false + 0 + true + true - + true + mpaf/tool/fragments/ce/http_cookie_manager.jmx - - + + + + + + + + + ${request_protocol} + + ${base_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/open_home_page.jmx + + + + <title>Home page</title> + + Assertion.response_data + false + 2 + + + + + - - true - cart,messages - = - true - sections - - + true - true - = - true - update_section_id - - - false - ${__time(yyyy-MM-dd'T'HH:mm:ss.SSSZ)} + q + ${searchTerm} = true - _ @@ -2731,9 +3010,9 @@ vars.put("loadType", "Guest"); - + ${request_protocol} - ${base_path}customer/section/load/ + ${base_path}catalogsearch/result/ GET true false @@ -2741,177 +3020,205 @@ vars.put("loadType", "Guest"); false false - + mpaf/tool/fragments/ce/search/search_quick.jmx - - - - X-Requested-With - XMLHttpRequest - - - - - - + - You added ${simple_product_1_name} to your shopping cart. + Search results for: + <span class="toolbar-number">\d<\/span> Items|Items <span class="toolbar-number">1 Assertion.response_data false 2 - - - This product is out of stock. - - Assertion.response_data - false - 6 - - - - - \"summary_count\":1 - - Assertion.response_data - false - 2 - + + false + product_url_keys + <a class="product-item-link"(?s).+?href="(?:http|https)://${host}${base_path}(index.php/)?([^'"]+)${url_suffix}">(?s). + $2$ + + -1 + - - ${think_time_delay_offset} - ${think_time_deviation} - + + +foundProducts = Integer.parseInt(vars.get("product_url_keys_matchNr")); + +if (foundProducts > 3) { + foundProducts = 3; +} + +vars.put("foundProducts", String.valueOf(foundProducts)); + + + + true + mpaf/tool/fragments/ce/search/set_found_items.jmx - - - - - - - - - - - ${base_path}${simple_product_2_url_key}${url_suffix} - GET - true - false - true - false - false - - + + true + ${foundProducts} + mpaf/tool/fragments/ce/loop_controller.jmx - - - <title>${simple_product_2_name} - <span>In stock</span> - - Assertion.response_data - false - 2 - + + 1 + + 1 + _counter + + true + true + - - - - ${think_time_delay_offset} - ${think_time_deviation} - + + + mpaf/tool/fragments/ce/search/searched_products_setup.jmx + +number = vars.get("_counter"); +product = vars.get("product_url_keys_"+number); + +vars.put("product_url_key", product); + + + + true + - - - - - false - ${simple_product_2_id} - = - true - product - - - false - - = - true - related_product - - - false - 1 - = - true - qty - - - false - ${form_key} - = - true - form_key - - - - - - - - - - ${base_path}checkout/cart/add/uenc/${simple_product_2_uenc}/product/${simple_product_2_id}/ - POST - true - false - true - false - false - - + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + + + + 1 + false + 1 + ${searchQuickFilterPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx - - - - X-Requested-With - XMLHttpRequest + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Quick Search With Filtration"); + + true + + + + + + + 30 + ${host} + / + false + 0 + true + true + + + ${form_key} + ${host} + ${base_path} + false + 0 + true + true - + true + mpaf/tool/fragments/ce/http_cookie_manager.jmx - - + + + + + + + + + ${request_protocol} + + ${base_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/open_home_page.jmx + + + + <title>Home page</title> + + Assertion.response_data + false + 2 + + + + + - - true - cart,messages - = - true - sections - true - - + true - true - = - true - update_section_id - true - - - false - ${__time(yyyy-MM-dd'T'HH:mm:ss.SSSZ)} + q + ${searchTerm} = true - _ - true @@ -2921,7 +3228,7 @@ vars.put("loadType", "Guest"); - ${base_path}customer/section/load/ + ${base_path}catalogsearch/result/ GET true false @@ -2929,137 +3236,353 @@ vars.put("loadType", "Guest"); false false - + mpaf/tool/fragments/ce/search/search_quick_filter.jmx - - - - X-Requested-With - XMLHttpRequest - - - - - - + - You added ${simple_product_2_name} to your shopping cart. + Search results for: + Items <span class="toolbar-number">1 Assertion.response_data false 2 - - - This product is out of stock. - - Assertion.response_data - false - 6 - + + 0 + attribute_1_options_count + count((//div[@class="filter-options-content"])[1]//li[@class="item"]) + false + true + false + - - - \"summary_count\":2 - - Assertion.response_data - false - 2 - + + 0 + attribute_2_options_count + count((//div[@class="filter-options-content"])[2]//li[@class="item"]) + false + true + false + + + + + attribute_1_filter_url + ((//div[@class="filter-options-content"])[1]//li[@class="item"]//a)[${__javaScript(Math.floor(Math.random()*${attribute_1_options_count})+1)}]/@href + false + true + false + + + + false + product_url_keys + <a class="product-item-link"(?s).+?href="http://${host}${base_path}(index.php/)?([^'"]+)${url_suffix}">(?s). + $2$ + + -1 + - - ${think_time_delay_offset} - ${think_time_deviation} - - - - - - - - - - - - - - ${base_path}${configurable_product_1_url_key}${url_suffix} - GET - true - false - true - false - false - - + + ${attribute_1_options_count} > 0 + false + mpaf/tool/fragments/ce/search/search_quick_filter-first-attribute.jmx - - - <title>${configurable_product_1_name} - <span>In stock</span> - - Assertion.response_data - false - 2 - + + vars.put("search_url", vars.get("attribute_1_filter_url")); + + + false + - - - - ${think_time_delay_offset} - ${think_time_deviation} - - - - - - - - false - ${configurable_product_1_id} - = - true - product - - - false - - = - true - related_product - - - false - 1 - = - true - qty - - - false - ${configurable_option_id} - = - true - super_attribute[${configurable_attribute_id}] - - - false - ${configurable_option_id_2} - = - true - super_attribute[${configurable_attribute_id_2}] - - - false - ${form_key} - = - true - form_key - - + + + + + + + + + + + ${attribute_1_filter_url} + GET + true + false + true + false + false + + + + + + Search results for: + <span class="toolbar-number">[1-9]+ + + Assertion.response_data + false + 2 + + + + 0 + attribute_2_options_count + count((//div[@class="filter-options-content"])[2]//li[@class="item"]) + false + true + false + + + + + attribute_2_filter_url + ((//div[@class="filter-options-content"])[2]//li[@class="item"]//a)[${__javaScript(Math.floor(Math.random()*${attribute_2_options_count})+1)}]/@href + false + true + false + + + + false + product_url_keys + <a class="product-item-link"(?s).+?href="http://${host}${base_path}(index.php/)?([^'"]+)${url_suffix}">(?s). + $2$ + + -1 + + + + + + + ${attribute_2_options_count} > 0 + false + mpaf/tool/fragments/ce/search/search_quick_filter-second-attribute.jmx + + + vars.put("search_url", vars.get("attribute_2_filter_url")); + + + false + + + + + + + + + + + + + ${attribute_2_filter_url} + GET + true + false + true + false + false + + + + + + Search results for: + <span class="toolbar-number">[1-9]+ + + Assertion.response_data + false + 2 + + + + false + product_url_keys + <a class="product-item-link"(?s).+?href="http://${host}${base_path}(index.php/)?([^'"]+)${url_suffix}">(?s). + $2$ + + -1 + + + + + + + +foundProducts = Integer.parseInt(vars.get("product_url_keys_matchNr")); + +if (foundProducts > 3) { + foundProducts = 3; +} + +vars.put("foundProducts", String.valueOf(foundProducts)); + + + + true + mpaf/tool/fragments/ce/search/set_found_items.jmx + + + + true + ${foundProducts} + mpaf/tool/fragments/ce/loop_controller.jmx + + + 1 + + 1 + _counter + + true + true + + + + + mpaf/tool/fragments/ce/search/searched_products_setup.jmx + +number = vars.get("_counter"); +product = vars.get("product_url_keys_"+number); + +vars.put("product_url_key", product); + + + + true + + + + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + + + + 1 + false + 1 + ${searchAdvancedPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Advanced Search"); + + true + + + + + + + 30 + ${host} + / + false + 0 + true + true + + + ${form_key} + ${host} + ${base_path} + false + 0 + true + true + + + true + mpaf/tool/fragments/ce/http_cookie_manager.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/open_home_page.jmx + + + + <title>Home page</title> + + Assertion.response_data + false + 2 + + + + + + + + @@ -3067,63 +3590,118 @@ vars.put("loadType", "Guest"); - ${base_path}checkout/cart/add/uenc/${configurable_product_1_uenc}/product/${configurable_product_1_id}/ - POST + ${base_path}catalogsearch/advanced/ + GET true false true false false - + mpaf/tool/fragments/ce/search/open_advanced_search_page.jmx - - - - X-Requested-With - XMLHttpRequest - - - - - + + + <title>Advanced Search</title> + + Assertion.response_data + false + 2 + + + + + attribute_name + (//select[@class="multiselect"])[last()]/@name + false + true + false + + + + 0 + attribute_options_count + count((//select[@class="multiselect"])[last()]/option) + false + true + false + + + + + attribute_value + ((//select[@class="multiselect"])[last()]/option)[${__javaScript(Math.floor(Math.random()*${attribute_options_count})+1)}]/@value + false + true + false + + + + + - + - + true - cart,messages + name + = true - sections - true - + true - true + sku + = true - update_section_id - true - - false - ${__time(yyyy-MM-dd'T'HH:mm:ss.SSSZ)} + + true + description + ${searchTerm} = true - _ - true + + true + short_description + + = + true + + + true + price%5Bfrom%5D + + = + true + + + true + price%5Bto%5D + ${priceTo} + = + true + + + + + + + + + - + ${request_protocol} - ${base_path}customer/section/load/ + ${base_path}catalogsearch/advanced/result/ GET true false @@ -3131,132 +3709,212 @@ vars.put("loadType", "Guest"); false false - + mpaf/tool/fragments/ce/search/search_advanced.jmx - - - - X-Requested-With - XMLHttpRequest - - - - - - + - You added ${configurable_product_1_name} to your shopping cart. + items</strong> were found using the following search criteria Assertion.response_data false 2 - - - We don't have as many &quot;${configurable_product_1_name}&quot; as you requested. - - Assertion.response_data - false - 6 - - - - - \"summary_count\":3 - - Assertion.response_data - false - 2 - + + false + product_url_keys + <a class="product-item-link"(?s).+?href="(?:http|https)://${host}${base_path}(index.php/)?([^'"]+)${url_suffix}">(?s). + $2$ + + -1 + - - - continue - - false - ${loops} - - ${__javaScript(Math.round(props.get("users")*${guest_checkout_percent}/100>>0))} - ${ramp_period} - 1437409133000 - 1437409133000 - false - - - - - - rv1 - '.' - 1 - 999999 - 1 - true - - - - - rv2 - '.' - 1 - 999999 - 2 - true - - - - - rv3 - '.' - 1 - 999999 - 3 - true - - - - - Passing arguments between threads - number = (int)(${rv1} * props.get("simple_products_list").size()); -simpleList = props.get("simple_products_list").get(number); -vars.put("simple_product_1_url_key", simpleList.get("url_key")); -vars.put("simple_product_1_name", simpleList.get("title")); -vars.put("simple_product_1_id", simpleList.get("id")); -vars.put("simple_product_1_uenc", simpleList.get("uenc")); + + +foundProducts = Integer.parseInt(vars.get("product_url_keys_matchNr")); -number1 = (int)(${rv2} * props.get("simple_products_list").size()); -simpleList = props.get("simple_products_list").get(number1); -vars.put("simple_product_2_url_key", simpleList.get("url_key")); -vars.put("simple_product_2_name", simpleList.get("title")); -vars.put("simple_product_2_id", simpleList.get("id")); -vars.put("simple_product_2_uenc", simpleList.get("uenc")); +if (foundProducts > 3) { + foundProducts = 3; +} -number = (int)(${rv3} * props.get("configurable_products_list").size()); -configurableList = props.get("configurable_products_list").get(number); -vars.put("configurable_product_1_url_key", configurableList.get("url_key")); -vars.put("configurable_product_1_name", configurableList.get("title")); -vars.put("configurable_product_1_id", configurableList.get("id")); -vars.put("configurable_attribute_id", configurableList.get("attribute_id")); -vars.put("configurable_attribute_id_2", configurableList.get("attribute_id_2")); -vars.put("configurable_option_id", configurableList.get("attribute_option_id")); -vars.put("configurable_option_id_2", configurableList.get("attribute_option_id_2")); -vars.put("configurable_product_1_uenc", simpleList.get("uenc")); +vars.put("foundProducts", String.valueOf(foundProducts)); + + + + true + mpaf/tool/fragments/ce/search/set_found_items.jmx + + + + true + ${foundProducts} + mpaf/tool/fragments/ce/loop_controller.jmx + + + 1 + + 1 + _counter + + true + true + + + + + mpaf/tool/fragments/ce/search/searched_products_setup.jmx + +number = vars.get("_counter"); +product = vars.get("product_url_keys_"+number); -number = (int)(Math.random() * props.get("category_url_keys_list").size()); -vars.put("category_url_key", props.get("category_url_keys_list").get(number)); -vars.put("category_name", props.get("category_names_list").get(number)); -vars.put("testLabel", "GuestChkt"); -vars.put("loadType", "Guest"); +vars.put("product_url_key", product); + true - + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + + + + + + 1 + false + 1 + ${addToCartByGuestPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Add To Cart By Guest"); + + true + + + + + + + 30 + ${host} + / + false + 0 + true + true + + + ${form_key} + ${host} + ${base_path} + false + 0 + true + true + + + true + mpaf/tool/fragments/ce/http_cookie_manager.jmx + + + + mpaf/tool/fragments/ce/common/init_random_generator_setup.jmx + +import java.util.Random; + +Random random = new Random(); +if (${seedForRandom} > 0) { + random.setSeed(${seedForRandom} + ${__threadNum}); +} + +vars.putObject("randomIntGenerator", random); + + + + true + + + + + mpaf/tool/fragments/ce/common/init_total_products_in_cart_setup.jmx + +vars.put("totalProductsAdded", "0"); + + + + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("category_url_keys_list").size()); + +vars.put("category_url_key", props.get("category_url_keys_list").get(number)); +vars.put("category_name", props.get("category_names_list").get(number)); + + + + false + mpaf/tool/fragments/ce/common/extract_category_setup.jmx + + + @@ -3264,7 +3922,7 @@ vars.put("loadType", "Guest"); - + ${request_protocol} ${base_path} GET @@ -3274,7 +3932,7 @@ vars.put("loadType", "Guest"); false false - + mpaf/tool/fragments/ce/common/open_home_page.jmx @@ -3287,102 +3945,7 @@ vars.put("loadType", "Guest"); - - - - - true - ["customer_form_login"] - = - true - blocks - - - true - ["default","customer_account_login"] - = - true - handles - - - true - {"route":"customer","controller":"account","action":"login","uri":"/customer/account/login/"} - = - true - originalRequest - - - true - true - = - true - ajax - - - true - true - = - true - isAjax - - - - - - - - - - ${base_path}page_cache/block/render/ - GET - true - false - true - false - false - - - - - - "customer_form_login" - Registered Customers - form_key - - Assertion.response_data - false - 2 - - - - false - form_key - <input name=\\"form_key\\" type=\\"hidden\\" value=\\"([^'"]+)\\" \\/> - $1$ - - 1 - - - - - ^.+$ - - Assertion.response_data - false - 1 - variable - form_key - - - - - - ${think_time_delay_offset} - ${think_time_deviation} - - - - + @@ -3390,7 +3953,7 @@ vars.put("loadType", "Guest"); - + ${request_protocol} ${base_path}${category_url_key}${url_suffix} GET @@ -3400,7 +3963,7 @@ vars.put("loadType", "Guest"); false false - + mpaf/tool/fragments/ce/common/open_category.jmx @@ -3434,76 +3997,113 @@ vars.put("loadType", "Guest"); - - ${think_time_delay_offset} - ${think_time_deviation} - - - - - - - - - - - - - - ${base_path}${simple_product_1_url_key}${url_suffix} - GET - true - false - true - false - false - - + + true + 2 + mpaf/tool/fragments/ce/loop_controller.jmx - - - <title>${simple_product_1_name} - <span>In stock</span> - - Assertion.response_data - false - 2 - + + 1 + + 1 + _counter + + true + true + - + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("simple_products_list").size()); +product = props.get("simple_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/simple_products_setup.jmx + - - ${think_time_delay_offset} - ${think_time_deviation} - + + mpaf/tool/fragments/ce/loops/update_products_added_counter.jmx + +productsAdded = Integer.parseInt(vars.get("totalProductsAdded")); +productsAdded = productsAdded + 1; + +vars.put("totalProductsAdded", String.valueOf(productsAdded)); + + + + true + - + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + - false - ${simple_product_1_id} + true + ${product_id} = true product - false + true = true related_product - false + true 1 = true qty - false + true ${form_key} = true @@ -3515,9 +4115,9 @@ vars.put("loadType", "Guest"); - + ${request_protocol} - ${base_path}checkout/cart/add/uenc/${simple_product_1_uenc}/product/${simple_product_1_id}/ + ${base_path}checkout/cart/add/ POST true false @@ -3525,8 +4125,7 @@ vars.put("loadType", "Guest"); false false - - + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/simple_product_add_to_cart.jmx @@ -3535,11 +4134,11 @@ vars.put("loadType", "Guest"); XMLHttpRequest - + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx - + @@ -3557,8 +4156,8 @@ vars.put("loadType", "Guest"); update_section_id - false - ${__time(yyyy-MM-dd'T'HH:mm:ss.SSSZ)} + true + ${__time()}${__Random(1,1000000)} = true _ @@ -3569,7 +4168,7 @@ vars.put("loadType", "Guest"); - + ${request_protocol} ${base_path}customer/section/load/ GET @@ -3579,21 +4178,11 @@ vars.put("loadType", "Guest"); false false - + mpaf/tool/fragments/ce/load_cart_section.jmx - - - - X-Requested-With - XMLHttpRequest - - - - - - You added ${simple_product_1_name} to your shopping cart. + You added ${product_name} to your shopping cart. Assertion.response_data false @@ -3611,85 +4200,246 @@ vars.put("loadType", "Guest"); - \"summary_count\":1 + \"summary_count\":${totalProductsAdded} Assertion.response_data false 2 - + + + + + X-Requested-With + XMLHttpRequest + + + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx + + + - - ${think_time_delay_offset} - ${think_time_deviation} - + + true + 1 + mpaf/tool/fragments/ce/loop_controller.jmx + + + 1 + + 1 + _counter + + true + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("configurable_products_list").size()); +product = props.get("configurable_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/configurable_products_setup.jmx - - - - - - - - - - - ${base_path}${simple_product_2_url_key}${url_suffix} - GET - true - false - true - false - false - - + + mpaf/tool/fragments/ce/loops/update_products_added_counter.jmx + +productsAdded = Integer.parseInt(vars.get("totalProductsAdded")); +productsAdded = productsAdded + 1; + +vars.put("totalProductsAdded", String.valueOf(productsAdded)); + + + + true + + + + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + true + 1 + mpaf/tool/fragments/ce/common/get_configurable_product_options.jmx - - - <title>${simple_product_2_name} - <span>In stock</span> + + + + Content-Type + application/json + + + Accept + */* + - Assertion.response_data - false - 2 - + + + + true + + + + false + {"username":"${admin_user}","password":"${admin_password}"} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/V1/integration/admin/token + POST + true + false + true + false + false + + + + + admin_token + $ + + + BODY + + + + + ^[a-z0-9-]+$ + + Assertion.response_data + false + 1 + variable + admin_token + + + + + + + Authorization + Bearer ${admin_token} + + + + + + + + + + + + ${request_protocol} + + ${base_path}rest/V1/configurable-products/${product_sku}/options/all + GET + true + false + true + false + false + + + + + attribute_ids + $.[*].attribute_id + NO_VALUE + + BODY + + + + option_values + $.[*].values[0].value_index + NO_VALUE + + BODY + + + - - ${think_time_delay_offset} - ${think_time_deviation} - - - - + - false - ${simple_product_2_id} + true + ${product_id} = true product - false + true = true related_product - false + true 1 = true qty - false + true ${form_key} = true @@ -3701,9 +4451,9 @@ vars.put("loadType", "Guest"); - + ${request_protocol} - ${base_path}checkout/cart/add/uenc/${simple_product_2_uenc}/product/${simple_product_2_id}/ + ${base_path}checkout/cart/add/ POST true false @@ -3711,8 +4461,38 @@ vars.put("loadType", "Guest"); false false - + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/configurable_product_add_to_cart.jmx + + false + + + + try { + attribute_ids = vars.get("attribute_ids"); + option_values = vars.get("option_values"); + attribute_ids = attribute_ids.replace("[","").replace("]","").replace("\"", ""); + option_values = option_values.replace("[","").replace("]","").replace("\"", ""); + attribute_ids_array = attribute_ids.split(","); + option_values_array = option_values.split(","); + args = ctx.getCurrentSampler().getArguments(); + it = args.iterator(); + while (it.hasNext()) { + argument = it.next(); + if (argument.getStringValue().contains("${")) { + args.removeArgument(argument.getName()); + } + } + for (int i = 0; i < attribute_ids_array.length; i++) { + ctx.getCurrentSampler().addArgument("super_attribute[" + attribute_ids_array[i] + "]", option_values_array[i]); + } + } catch (Exception e) { + log.error("eror…", e); + } + + mpaf/tool/fragments/ce/common/configurable_product_add_to_cart_preprocessor.jmx + + @@ -3720,11 +4500,11 @@ vars.put("loadType", "Guest"); XMLHttpRequest - + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx - + @@ -3733,7 +4513,6 @@ vars.put("loadType", "Guest"); = true sections - true true @@ -3741,15 +4520,13 @@ vars.put("loadType", "Guest"); = true update_section_id - true - false - ${__time(yyyy-MM-dd'T'HH:mm:ss.SSSZ)} + true + ${__time()}${__Random(1,1000000)} = true _ - true @@ -3757,7 +4534,7 @@ vars.put("loadType", "Guest"); - + ${request_protocol} ${base_path}customer/section/load/ GET @@ -3767,21 +4544,11 @@ vars.put("loadType", "Guest"); false false - + mpaf/tool/fragments/ce/load_cart_section.jmx - - - - X-Requested-With - XMLHttpRequest - - - - - - You added ${simple_product_2_name} to your shopping cart. + You added ${product_name} to your shopping cart. Assertion.response_data false @@ -3799,22 +4566,142 @@ vars.put("loadType", "Guest"); - \"summary_count\":2 + \"summary_count\":${totalProductsAdded} Assertion.response_data false 2 - + + + + + X-Requested-With + XMLHttpRequest + + + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx + + + + + - - ${think_time_delay_offset} - ${think_time_deviation} - + + 1 + false + 1 + ${addToWishlistPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Add to Wishlist"); + + true + + + + + + + 30 + ${host} + / + false + 0 + true + true + + + ${form_key} + ${host} + ${base_path} + false + 0 + true + true + + + true + mpaf/tool/fragments/ce/http_cookie_manager.jmx + + + + mpaf/tool/fragments/ce/common/init_random_generator_setup.jmx + +import java.util.Random; + +Random random = new Random(); +if (${seedForRandom} > 0) { + random.setSeed(${seedForRandom} + ${__threadNum}); +} + +vars.putObject("randomIntGenerator", random); + + + + true + + + + + mpaf/tool/fragments/ce/get_customer_email.jmx + import org.apache.jmeter.samplers.SampleResult; + +String siterator = vars.get("customer_emails_index"); +int iterator; +if(siterator == null){ + iterator = 0; + vars.put("customer_emails_index", "0"); +} else { + iterator = Integer.parseInt(siterator); + iterator ++; + vars.put("customer_emails_index", iterator.toString()); +} + +emails_list = props.get("customer_emails_list"); + +threadsNumber = ctx.getThreadGroup().getNumThreads(); +emailsCount = emails_list.size(); +if (threadsNumber > emailsCount) { + log.error(" There are not enough customers for this scenario."); +} else { + clusterLength = Math.round(emailsCount / threadsNumber); + threadNum = ctx.getThreadNum(); + emails_index = clusterLength * threadNum + iterator; + maxLimit = clusterLength * (threadNum + 1); + if (emails_index >= maxLimit) { + iterator = 0; + emails_index = clusterLength * threadNum + iterator; + vars.put("customer_emails_index", iterator.toString()); + } +} +vars.put("customer_email", emails_list.get(emails_index)); + + + true + - + @@ -3822,9 +4709,9 @@ vars.put("loadType", "Guest"); - + ${request_protocol} - ${base_path}${configurable_product_1_url_key}${url_suffix} + ${base_path}customer/account/login/ GET true false @@ -3832,12 +4719,11 @@ vars.put("loadType", "Guest"); false false - + mpaf/tool/fragments/ce/common/open_login_page.jmx - <title>${configurable_product_1_name} - <span>In stock</span> + <title>Customer Login</title> Assertion.response_data false @@ -3846,56 +4732,36 @@ vars.put("loadType", "Guest"); - - ${think_time_delay_offset} - ${think_time_deviation} - - - - + - - false - ${configurable_product_1_id} - = - true - product - - - false - - = - true - related_product - - - false - 1 + + true + ${form_key} = true - qty + form_key - - false - ${configurable_option_id} + + true + ${customer_email} = true - super_attribute[${configurable_attribute_id}] + login[username] - - false - ${configurable_option_id_2} + + true + ${customer_password} = true - super_attribute[${configurable_attribute_id_2}] + login[password] - - false - ${form_key} + + true + = true - form_key + send @@ -3903,9 +4769,9 @@ vars.put("loadType", "Guest"); - + ${request_protocol} - ${base_path}checkout/cart/add/uenc/${configurable_product_1_uenc}/product/${configurable_product_1_id}/ + ${base_path}customer/account/loginPost/ POST true false @@ -3913,45 +4779,61 @@ vars.put("loadType", "Guest"); false false - + mpaf/tool/fragments/ce/common/login.jmx - - - - X-Requested-With - XMLHttpRequest - - - - - - - + + + <title>My Account</title> + + Assertion.response_data + false + 2 + + + + false + addressId + customer/address/edit/id/([^'"]+)/ + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + addressId + + + + true - cart,messages + = true sections - true true - true + false = true update_section_id - true - false - ${__time(yyyy-MM-dd'T'HH:mm:ss.SSSZ)} + true + ${__time()}${__Random(1,1000000)} = true _ - true @@ -3959,7 +4841,7 @@ vars.put("loadType", "Guest"); - + ${request_protocol} ${base_path}customer/section/load/ GET @@ -3970,53 +4852,251 @@ vars.put("loadType", "Guest"); false - - - - - X-Requested-With - XMLHttpRequest - - - - - - You added ${configurable_product_1_name} to your shopping cart. - - Assertion.response_data - false - 2 - - - - - We don't have as many &quot;${configurable_product_1_name}&quot; as you requested. - - Assertion.response_data - false - 6 - + + true + 5 + mpaf/tool/fragments/ce/loop_controller.jmx + + + 1 + + 1 + _counter + + true + true + - - - \"summary_count\":3 - - Assertion.response_data - false - 2 - + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("simple_products_list").size()); +product = props.get("simple_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/simple_products_setup.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + + + + true + ${form_key} + = + true + form_key + false + + + true + ${product_uenc} + = + true + uenc + + + true + ${product_id} + = + true + product + + + + + + + + ${request_protocol} + + ${base_path}wishlist/index/add/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/wishlist/add_to_wishlist.jmx + + + + <title>My Wish List</title> + + Assertion.response_data + false + 16 + + + + false + wishListItems + data-post-remove='\{"action":"(.+)\/wishlist\\/index\\/remove\\/","data":\{"item":"([^"]+)" + $2$ + + -1 + + + + + + + + + true + wishlist,messages + = + true + sections + + + true + false + = + true + update_section_id + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ + + + + + + + + ${request_protocol} + + ${base_path}customer/section/load/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/wishlist/load_wishlist_section.jmx + + + + {"wishlist":{"counter":" + + Assertion.response_data + false + 16 + + + + ${wishlistDelay}*1000 + + + + + + + wishListItems + wishListItem + true + mpaf/tool/fragments/ce/wishlist/clear_wishlist.jmx + + + 1 + 5 + 1 + counter + + true + true + + + + + + true + ${form_key} + = + true + form_key + true + + + true + ${wishListItem} + = + true + item + true + + + + + + + + ${request_protocol} + + ${base_path}wishlist/index/remove/ + POST + true + false + true + false + false + + - - ${think_time_delay_offset} - ${think_time_deviation} - - - - + @@ -4024,9 +5104,9 @@ vars.put("loadType", "Guest"); - + ${request_protocol} - ${base_path}checkout/ + ${base_path}customer/account/logout/ GET true false @@ -4034,147 +5114,277 @@ vars.put("loadType", "Guest"); false false - + mpaf/tool/fragments/ce/common/logout.jmx - + - <title>Checkout</title> + You are signed out. Assertion.response_data false 2 - - - <title>Shopping Cart</title> - - Assertion.response_data - false - 6 - - - - false - cart_id - "quoteData":{"entity_id":"([^'"]+)", - $1$ - - 1 - - - - false - form_key - <input name="form_key" type="hidden" value="([^'"]+)" /> - $1$ - - 1 - - - - - ^.+$ - - Assertion.response_data - false - 1 - variable - cart_id - - - - - ^.+$ - - Assertion.response_data - false - 1 - variable - form_key - - + + - - ${think_time_delay_offset} - ${think_time_deviation} - + + 1 + false + 1 + ${compareProductsPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Compare Products"); + + true + + + + + + + 30 + ${host} + / + false + 0 + true + true + + + ${form_key} + ${host} + ${base_path} + false + 0 + true + true + + + true + mpaf/tool/fragments/ce/http_cookie_manager.jmx - - true - - - - false - {"customerEmail":"test@example.com"} - = - - + + mpaf/tool/fragments/ce/common/init_random_generator_setup.jmx + +import java.util.Random; + +Random random = new Random(); +if (${seedForRandom} > 0) { + random.setSeed(${seedForRandom} + ${__threadNum}); +} + +vars.putObject("randomIntGenerator", random); + + + + true + + + + + mpaf/tool/fragments/ce/common/init_total_products_in_cart_setup.jmx + +vars.put("totalProductsAdded", "0"); + + + + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("category_url_keys_list").size()); + +vars.put("category_url_key", props.get("category_url_keys_list").get(number)); +vars.put("category_name", props.get("category_names_list").get(number)); + + + + false + mpaf/tool/fragments/ce/common/extract_category_setup.jmx + + + + + - + ${request_protocol} - ${base_path}rest/default/V1/customers/isEmailAvailable - POST + ${base_path}${category_url_key}${url_suffix} + GET true false true false false - + mpaf/tool/fragments/ce/product_compare/open_category.jmx - - - - Referer - ${base_path}checkout/onepage/ - - - Content-Type - application/json; charset=UTF-8 - - - X-Requested-With - XMLHttpRequest - - - Accept - application/json - + + + <span class="base" data-ui-id="page-title">${category_name}</span> - + Assertion.response_data + false + 6 + - + + false + random_product_compare_id + catalog\\/product_compare\\/add\\/\",\"data\":\{\"product\":\"([0-9]+)\" + $1$ + + 1 + + + - true + ^[0-9]+$ Assertion.response_data false - 8 + 1 + variable + random_product_compare_id - - ${think_time_delay_offset} - ${think_time_deviation} - + + true + 2 + mpaf/tool/fragments/ce/loop_controller.jmx + + + 1 + + 1 + _counter + + true + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("simple_products_list").size()); +product = props.get("simple_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/simple_products_setup.jmx - - true - + + mpaf/tool/fragments/ce/loops/update_products_added_counter.jmx + +productsAdded = Integer.parseInt(vars.get("totalProductsAdded")); +productsAdded = productsAdded + 1; + +vars.put("totalProductsAdded", String.valueOf(productsAdded)); + + + + true + + + + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + - - false - {"address":{"country_id":"US","postcode":"95630"}} + + true + ${product_id} + = + true + product + + + true + ${form_key} = + true + form_key + + + true + ${product_uenc} + = + true + uenc @@ -4182,9 +5392,9 @@ vars.put("loadType", "Guest"); - + ${request_protocol} - ${base_path}rest/default/V1/guest-carts/${cart_id}/estimate-shipping-methods + ${base_path}catalog/product_compare/add/ POST true false @@ -4192,54 +5402,32 @@ vars.put("loadType", "Guest"); false false - - - - - - Referer - ${base_path}checkout/onepage/ - - - Content-Type - application/json; charset=UTF-8 - - - X-Requested-With - XMLHttpRequest - - - Accept - application/json - - - - - - - "available":true - - Assertion.response_data - false - 2 - - - - - - ${think_time_delay_offset} - ${think_time_deviation} - + mpaf/tool/fragments/ce/product_compare/product_compare_add.jmx - - true - + + - - false - {"addressInformation":{"shipping_address":{"countryId":"US","regionId":"12","regionCode":"CA","region":"California","street":["10441 Jefferson Blvd ste 200"],"company":"","telephone":"3109450345","fax":"","postcode":"90232","city":"Culver City","firstname":"Name","lastname":"Lastname"},"shipping_method_code":"flatrate","shipping_carrier_code":"flatrate"}} + + true + compare-products,messages + = + true + sections + + + true + false = + true + update_section_id + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ @@ -4247,42 +5435,21 @@ vars.put("loadType", "Guest"); - + ${request_protocol} - ${base_path}rest/default/V1/guest-carts/${cart_id}/shipping-information - POST + ${base_path}customer/section/load/ + GET true false true false false - + mpaf/tool/fragments/ce/product_compare/customer_section_load_product_compare_add.jmx - - - - Referer - ${base_path}checkout/onepage/ - - - Content-Type - application/json; charset=UTF-8 - - - X-Requested-With - XMLHttpRequest - - - Accept - application/json - - - - - + - {"payment_methods": + \"compare-products\":{\"count\":${totalProductsAdded} Assertion.response_data false @@ -4290,21 +5457,112 @@ vars.put("loadType", "Guest"); + - - ${think_time_delay_offset} - ${think_time_deviation} - + + true + 1 + mpaf/tool/fragments/ce/loop_controller.jmx + + + 1 + + 1 + _counter + + true + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("configurable_products_list").size()); +product = props.get("configurable_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/configurable_products_setup.jmx - - true - + + mpaf/tool/fragments/ce/loops/update_products_added_counter.jmx + +productsAdded = Integer.parseInt(vars.get("totalProductsAdded")); +productsAdded = productsAdded + 1; + +vars.put("totalProductsAdded", String.valueOf(productsAdded)); + + + + true + + + + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + - - false - {"cartId":"${cart_id}","email":"test@example.com","paymentMethod":{"method":"checkmo","po_number":null,"additional_data":null},"billingAddress":{"countryId":"US","regionId":"12","regionCode":"CA","region":"California","street":["10441 Jefferson Blvd ste 200"],"company":"","telephone":"3109450345","fax":"","postcode":"90232","city":"Culver City","firstname":"Name","lastname":"Lastname"}} + + true + ${product_id} = + true + product + + + true + ${form_key} + = + true + form_key + + + true + ${product_uenc} + = + true + uenc @@ -4312,9 +5570,9 @@ vars.put("loadType", "Guest"); - + ${request_protocol} - ${base_path}rest/default/V1/guest-carts/${cart_id}/payment-information + ${base_path}catalog/product_compare/add/ POST true false @@ -4322,60 +5580,64 @@ vars.put("loadType", "Guest"); false false - - - - - - Referer - ${base_path}checkout/onepage/ - - - Content-Type - application/json; charset=UTF-8 + mpaf/tool/fragments/ce/product_compare/product_compare_add.jmx + + + + + + + true + compare-products,messages + = + true + sections - - X-Requested-With - XMLHttpRequest + + true + false + = + true + update_section_id - - Accept - application/json + + true + ${__time()}${__Random(1,1000000)} + = + true + _ - - - - - "[0-9]+" - - Assertion.response_data - false - 2 - - - - order_id - $ - - - BODY - - + + + + + + ${request_protocol} + + ${base_path}customer/section/load/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_compare/customer_section_load_product_compare_add.jmx + - ^\d+$ + \"compare-products\":{\"count\":${totalProductsAdded} Assertion.response_data false - 1 - variable - order_id + 2 + - + @@ -4383,9 +5645,9 @@ vars.put("loadType", "Guest"); - + ${request_protocol} - ${base_path}checkout/onepage/success/ + ${base_path}catalog/product_compare/index/ GET true false @@ -4393,127 +5655,149 @@ vars.put("loadType", "Guest"); false false - - - - - Thank you for your purchase! - Your order # is + mpaf/tool/fragments/ce/product_compare/compare_products.jmx + + + + 1 + 0 + ${__javaScript(Math.round(${productCompareDelay}*1000))} + mpaf/tool/fragments/ce/product_compare/compare_products_pause.jmx + + + + + + + true + ${form_key} + = + true + form_key + - Assertion.response_data - false - 2 - - - + + + + + + ${request_protocol} + + ${base_path}catalog/product_compare/clear + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/product_compare/compare_products_clear.jmx + + - - continue - - false - ${loops} - - ${__javaScript(Math.round(props.get("users")*${customer_checkout_percent}/100>>0))} - ${ramp_period} - 1437177203000 - 1437177203000 - false - - - - - - rv1 - '.' - 1 - 999999 - 1 - true - - - - - rv2 - '.' - 1 - 999999 - 2 - true - - - - - rv3 - '.' - 1 - 999999 - 3 - true - - - - - Passing arguments between threads - import org.apache.jmeter.samplers.SampleResult; + + 1 + false + 1 + ${checkoutByGuestPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Checkout By Guest"); + + true + + + + + + + 30 + ${host} + / + false + 0 + true + true + + + ${form_key} + ${host} + ${base_path} + false + 0 + true + true + + + true + mpaf/tool/fragments/ce/http_cookie_manager.jmx + + + + mpaf/tool/fragments/ce/common/init_random_generator_setup.jmx + +import java.util.Random; -number = (int)(${rv1} * props.get("simple_products_list").size()); -simpleList = props.get("simple_products_list").get(number); -vars.put("simple_product_1_url_key", simpleList.get("url_key")); -vars.put("simple_product_1_name", simpleList.get("title")); -vars.put("simple_product_1_id", simpleList.get("id")); -vars.put("simple_product_1_uenc", simpleList.get("uenc")); +Random random = new Random(); +if (${seedForRandom} > 0) { + random.setSeed(${seedForRandom} + ${__threadNum}); +} -number1 = (int)(${rv2} * props.get("simple_products_list").size()); -simpleList = props.get("simple_products_list").get(number1); -vars.put("simple_product_2_url_key", simpleList.get("url_key")); -vars.put("simple_product_2_name", simpleList.get("title")); -vars.put("simple_product_2_id", simpleList.get("id")); -vars.put("simple_product_2_uenc", simpleList.get("uenc")); +vars.putObject("randomIntGenerator", random); + + + + true + + + + + mpaf/tool/fragments/ce/common/init_total_products_in_cart_setup.jmx + +vars.put("totalProductsAdded", "0"); + + + + true + + + + + +import java.util.Random; -number = (int)(${rv3} * props.get("configurable_products_list").size()); -configurableList = props.get("configurable_products_list").get(number); -vars.put("configurable_product_1_url_key", configurableList.get("url_key")); -vars.put("configurable_product_1_name", configurableList.get("title")); -vars.put("configurable_product_1_id", configurableList.get("id")); -vars.put("configurable_attribute_id", configurableList.get("attribute_id")); -vars.put("configurable_attribute_id_2", configurableList.get("attribute_id_2")); -vars.put("configurable_option_id", configurableList.get("attribute_option_id")); -vars.put("configurable_option_id_2", configurableList.get("attribute_option_id_2")); -vars.put("configurable_product_1_uenc", simpleList.get("uenc")); +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("category_url_keys_list").size()); -number = (int)(Math.random() * props.get("category_url_keys_list").size()); vars.put("category_url_key", props.get("category_url_keys_list").get(number)); vars.put("category_name", props.get("category_names_list").get(number)); - -emails_index = 0; -if (!props.containsKey("customer_emails_index")) { - props.put("customer_emails_index", emails_index); -} - -try { - emails_index = props.get("customer_emails_index"); - emails_list = props.get("customer_emails_list"); - if (emails_index == emails_list.size()) { - emails_index=0; - } - vars.put("customer_email", emails_list.get(emails_index)); - props.put("customer_emails_index", ++emails_index); -} -catch (java.lang.Exception e) { - log.error("Caught Exception in 'Customer Checkout' thread."); - log.info("Using default email address - user_1@example.com"); - vars.put("customer_email", "user_1@example.com"); -} -vars.put("testLabel", "CustomerChkt"); -vars.put("loadType", "Customer"); - - - true - - - - + + + + false + mpaf/tool/fragments/ce/common/extract_category_setup.jmx + + + @@ -4521,7 +5805,7 @@ vars.put("loadType", "Customer"); - + ${request_protocol} ${base_path} GET @@ -4531,7 +5815,7 @@ vars.put("loadType", "Customer"); false false - + mpaf/tool/fragments/ce/common/open_home_page.jmx @@ -4544,13 +5828,7 @@ vars.put("loadType", "Customer"); - - ${think_time_delay_offset} - ${think_time_deviation} - - - - + @@ -4558,9 +5836,9 @@ vars.put("loadType", "Customer"); - + ${request_protocol} - ${base_path}customer/account/login/ + ${base_path}${category_url_key}${url_suffix} GET true false @@ -4568,56 +5846,151 @@ vars.put("loadType", "Customer"); false false - + mpaf/tool/fragments/ce/common/open_category.jmx - <title>Customer Login</title> + <span class="base" data-ui-id="page-title">${category_name}</span> Assertion.response_data false - 2 + 6 + + + + false + category_id + <li class="item category([^'"]+)">\s*<strong>${category_name}</strong>\s*</li> + $1$ + + 1 + simple_product_1_url_key + + + + + ^[0-9]+$ + + Assertion.response_data + false + 1 + variable + category_id - - - - - true - ["customer_form_login"] - = - true - blocks - - - true - ["default","customer_account_login"] - = - true - handles - - + + true + 2 + mpaf/tool/fragments/ce/loop_controller.jmx + + + 1 + + 1 + _counter + + true + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("simple_products_list").size()); +product = props.get("simple_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/simple_products_setup.jmx + + + + mpaf/tool/fragments/ce/loops/update_products_added_counter.jmx + +productsAdded = Integer.parseInt(vars.get("totalProductsAdded")); +productsAdded = productsAdded + 1; + +vars.put("totalProductsAdded", String.valueOf(productsAdded)); + + + + true + + + + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + + + true - {"route":"customer","controller":"account","action":"login","uri":"/customer/account/login/"} + ${product_id} = true - originalRequest + product - + true - true + = true - ajax + related_product - + true - true + 1 = true - isAjax + qty + + + true + ${form_key} + = + true + form_key @@ -4625,87 +5998,52 @@ vars.put("loadType", "Customer"); - + ${request_protocol} - ${base_path}page_cache/block/render/ - GET + ${base_path}checkout/cart/add/ + POST true false true false false - + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/simple_product_add_to_cart.jmx - - - "customer_form_login" - Registered Customers - form_key - - Assertion.response_data - false - 2 - - - - false - form_key - <input name=\\"form_key\\" type=\\"hidden\\" value=\\"([^'"]+)\\" \\/> - $1$ - - 1 - - - - - ^.+$ - - Assertion.response_data - false - 1 - variable - form_key - - - - - - ${think_time_delay_offset} - ${think_time_deviation} - + + + + X-Requested-With + XMLHttpRequest + + + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx + - + - - true - ${form_key} - = - true - form_key - - + true - ${customer_email} + cart,messages = true - login[username] + sections - + true - ${customer_password} + true = true - login[password] + update_section_id - + true - + ${__time()}${__Random(1,1000000)} = true - send + _ @@ -4713,197 +6051,278 @@ vars.put("loadType", "Customer"); - + ${request_protocol} - ${base_path}customer/account/loginPost/ - POST + ${base_path}customer/section/load/ + GET true false true false false - + mpaf/tool/fragments/ce/load_cart_section.jmx - <title>My Account</title> + You added ${product_name} to your shopping cart. Assertion.response_data false 2 - - false - addressId - customer/address/edit/id/([^'"]+)/ - $1$ - - 1 - - - + - ^.+$ + This product is out of stock. Assertion.response_data false - 1 - variable - addressId + 6 - - false - form_key - <input name="form_key" type="hidden" value="([^'"]+)" /> - $1$ - - 1 - - - + - ^.+$ + \"summary_count\":${totalProductsAdded} Assertion.response_data false - 1 - variable - form_key + 2 - - - - ${think_time_delay_offset} - ${think_time_deviation} - + + + + + X-Requested-With + XMLHttpRequest + + + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx + + - - - - - - - - - - - ${base_path}${category_url_key}${url_suffix} - GET - true - false - true - false - false - - + + true + 1 + mpaf/tool/fragments/ce/loop_controller.jmx - - - <span class="base" data-ui-id="page-title">${category_name}</span> - - Assertion.response_data - false - 6 - - - - false - category_id - <li class="item category([^'"]+)">\s*<strong>${category_name}</strong>\s*</li> - $1$ - - 1 - simple_product_1_url_key - - - - - ^[0-9]+$ - - Assertion.response_data - false - 1 - variable - category_id - + + 1 + + 1 + _counter + + true + true + - + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("configurable_products_list").size()); +product = props.get("configurable_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/configurable_products_setup.jmx + - - ${think_time_delay_offset} - ${think_time_deviation} - + + mpaf/tool/fragments/ce/loops/update_products_added_counter.jmx + +productsAdded = Integer.parseInt(vars.get("totalProductsAdded")); +productsAdded = productsAdded + 1; + +vars.put("totalProductsAdded", String.valueOf(productsAdded)); + + + + true + - - - - - - - - - - - ${base_path}${simple_product_1_url_key}${url_suffix} - GET - true - false - true - false - false - - + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + true + 1 + mpaf/tool/fragments/ce/common/get_configurable_product_options.jmx - - - <title>${simple_product_1_name} - <span>In stock</span> + + + + Content-Type + application/json + + + Accept + */* + - Assertion.response_data - false - 2 - + + + true + + + + false + {"username":"${admin_user}","password":"${admin_password}"} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/V1/integration/admin/token + POST + true + false + true + false + false + + + + + admin_token + $ + + + BODY + + + + + ^[a-z0-9-]+$ + + Assertion.response_data + false + 1 + variable + admin_token + + + + + + + Authorization + Bearer ${admin_token} + + + + + + + + + + + + + ${request_protocol} + + ${base_path}rest/V1/configurable-products/${product_sku}/options/all + GET + true + false + true + false + false + + + + + attribute_ids + $.[*].attribute_id + NO_VALUE + + BODY + + + + option_values + $.[*].values[0].value_index + NO_VALUE + + BODY + + + - - ${think_time_delay_offset} - ${think_time_deviation} - - - - + - false - ${simple_product_1_id} + true + ${product_id} = true product - false + true = true related_product - false + true 1 = true qty - false + true ${form_key} = true @@ -4915,9 +6334,9 @@ vars.put("loadType", "Customer"); - + ${request_protocol} - ${base_path}checkout/cart/add/uenc/${simple_product_1_uenc}/product/${simple_product_1_id}/ + ${base_path}checkout/cart/add/ POST true false @@ -4925,9 +6344,38 @@ vars.put("loadType", "Customer"); false false - - + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/configurable_product_add_to_cart.jmx + + false + + + + try { + attribute_ids = vars.get("attribute_ids"); + option_values = vars.get("option_values"); + attribute_ids = attribute_ids.replace("[","").replace("]","").replace("\"", ""); + option_values = option_values.replace("[","").replace("]","").replace("\"", ""); + attribute_ids_array = attribute_ids.split(","); + option_values_array = option_values.split(","); + args = ctx.getCurrentSampler().getArguments(); + it = args.iterator(); + while (it.hasNext()) { + argument = it.next(); + if (argument.getStringValue().contains("${")) { + args.removeArgument(argument.getName()); + } + } + for (int i = 0; i < attribute_ids_array.length; i++) { + ctx.getCurrentSampler().addArgument("super_attribute[" + attribute_ids_array[i] + "]", option_values_array[i]); + } + } catch (Exception e) { + log.error("eror…", e); + } + + mpaf/tool/fragments/ce/common/configurable_product_add_to_cart_preprocessor.jmx + + @@ -4935,11 +6383,11 @@ vars.put("loadType", "Customer"); XMLHttpRequest - + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx - + @@ -4957,8 +6405,8 @@ vars.put("loadType", "Customer"); update_section_id - false - ${__time(yyyy-MM-dd'T'HH:mm:ss.SSSZ)} + true + ${__time()}${__Random(1,1000000)} = true _ @@ -4969,7 +6417,7 @@ vars.put("loadType", "Customer"); - + ${request_protocol} ${base_path}customer/section/load/ GET @@ -4979,8 +6427,36 @@ vars.put("loadType", "Customer"); false false - + mpaf/tool/fragments/ce/load_cart_section.jmx + + + You added ${product_name} to your shopping cart. + + Assertion.response_data + false + 2 + + + + + This product is out of stock. + + Assertion.response_data + false + 6 + + + + + \"summary_count\":${totalProductsAdded} + + Assertion.response_data + false + 2 + + + @@ -4988,12 +6464,38 @@ vars.put("loadType", "Customer"); XMLHttpRequest - + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}checkout/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/guest_checkout/checkout_start.jmx + - You added ${simple_product_1_name} to your shopping cart. + <title>Checkout</title> Assertion.response_data false @@ -5002,356 +6504,26659 @@ vars.put("loadType", "Customer"); - This product is out of stock. + <title>Shopping Cart</title> Assertion.response_data false 6 - + + false + cart_id + "quoteData":{"entity_id":"([^'"]+)", + $1$ + + 1 + + + - \"summary_count\":1 + ^.+$ Assertion.response_data false - 2 + 1 + variable + cart_id - - ${think_time_delay_offset} - ${think_time_deviation} - - - - - - + + true + + + + false + {"customerEmail":"test@example.com"} + = + + - + ${request_protocol} - ${base_path}${simple_product_2_url_key}${url_suffix} - GET + ${base_path}rest/default/V1/customers/isEmailAvailable + POST true false true false false - + mpaf/tool/fragments/ce/guest_checkout/checkout_email_available.jmx + + + + Referer + ${base_path}checkout/onepage/ + + + Content-Type + application/json; charset=UTF-8 + + + X-Requested-With + XMLHttpRequest + + + Accept + application/json + + + + - <title>${simple_product_2_name} - <span>In stock</span> + true Assertion.response_data false - 2 + 8 - - ${think_time_delay_offset} - ${think_time_deviation} - - + + true + + + + false + {"address":{"country_id":"US","postcode":"95630"}} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/guest-carts/${cart_id}/estimate-shipping-methods + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/guest_checkout/checkout_estimate_shipping_methods_with_postal_code.jmx + + + + + Referer + ${base_path}checkout/onepage/ + + + Content-Type + application/json; charset=UTF-8 + + + X-Requested-With + XMLHttpRequest + + + Accept + application/json + + + + + + + "available":true + + Assertion.response_data + false + 2 + + + - - + + true + - + false - ${simple_product_2_id} + {"addressInformation":{"shipping_address":{"countryId":"US","regionId":"12","regionCode":"CA","region":"California","street":["10441 Jefferson Blvd ste 200"],"company":"","telephone":"3109450345","fax":"","postcode":"90232","city":"Culver City","firstname":"Name","lastname":"Lastname"},"shipping_method_code":"flatrate","shipping_carrier_code":"flatrate"}} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/guest-carts/${cart_id}/shipping-information + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/guest_checkout/checkout_billing_shipping_information.jmx + + + + + Referer + ${base_path}checkout/onepage/ + + + Content-Type + application/json; charset=UTF-8 + + + X-Requested-With + XMLHttpRequest + + + Accept + application/json + + + + + + + {"payment_methods": + + Assertion.response_data + false + 2 + + + + + + true + + + + false + {"cartId":"${cart_id}","email":"test@example.com","paymentMethod":{"method":"checkmo","po_number":null,"additional_data":null},"billingAddress":{"countryId":"US","regionId":"12","regionCode":"CA","region":"California","street":["10441 Jefferson Blvd ste 200"],"company":"","telephone":"3109450345","fax":"","postcode":"90232","city":"Culver City","firstname":"Name","lastname":"Lastname"}} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/guest-carts/${cart_id}/payment-information + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/guest_checkout/checkout_payment_info_place_order.jmx + + + + + Referer + ${base_path}checkout/onepage/ + + + Content-Type + application/json; charset=UTF-8 + + + X-Requested-With + XMLHttpRequest + + + Accept + application/json + + + + + + + "[0-9]+" + + Assertion.response_data + false + 2 + + + + order_id + $ + + + BODY + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + order_id + + + + + + + + + + + + + ${request_protocol} + + ${base_path}checkout/onepage/success/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/guest_checkout/checkout_success.jmx + + + + Thank you for your purchase! + Your order # is + + Assertion.response_data + false + 2 + + + + + + + + + 1 + false + 1 + ${checkoutByCustomerPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Checkout By Customer"); + + true + + + + + + + 30 + ${host} + / + false + 0 + true + true + + + ${form_key} + ${host} + ${base_path} + false + 0 + true + true + + + true + mpaf/tool/fragments/ce/http_cookie_manager.jmx + + + + mpaf/tool/fragments/ce/common/init_random_generator_setup.jmx + +import java.util.Random; + +Random random = new Random(); +if (${seedForRandom} > 0) { + random.setSeed(${seedForRandom} + ${__threadNum}); +} + +vars.putObject("randomIntGenerator", random); + + + + true + + + + + mpaf/tool/fragments/ce/common/init_total_products_in_cart_setup.jmx + +vars.put("totalProductsAdded", "0"); + + + + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("category_url_keys_list").size()); + +vars.put("category_url_key", props.get("category_url_keys_list").get(number)); +vars.put("category_name", props.get("category_names_list").get(number)); + + + + false + mpaf/tool/fragments/ce/common/extract_category_setup.jmx + + + + mpaf/tool/fragments/ce/get_customer_email.jmx + import org.apache.jmeter.samplers.SampleResult; + +String siterator = vars.get("customer_emails_index"); +int iterator; +if(siterator == null){ + iterator = 0; + vars.put("customer_emails_index", "0"); +} else { + iterator = Integer.parseInt(siterator); + iterator ++; + vars.put("customer_emails_index", iterator.toString()); +} + +emails_list = props.get("customer_emails_list"); + +threadsNumber = ctx.getThreadGroup().getNumThreads(); +emailsCount = emails_list.size(); +if (threadsNumber > emailsCount) { + log.error(" There are not enough customers for this scenario."); +} else { + clusterLength = Math.round(emailsCount / threadsNumber); + threadNum = ctx.getThreadNum(); + emails_index = clusterLength * threadNum + iterator; + maxLimit = clusterLength * (threadNum + 1); + if (emails_index >= maxLimit) { + iterator = 0; + emails_index = clusterLength * threadNum + iterator; + vars.put("customer_emails_index", iterator.toString()); + } +} +vars.put("customer_email", emails_list.get(emails_index)); + + + true + + + + + + + + + + + + ${request_protocol} + + ${base_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/open_home_page.jmx + + + + <title>Home page</title> + + Assertion.response_data + false + 2 + + + + + + + + + + + + + ${request_protocol} + + ${base_path}customer/account/login/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/open_login_page.jmx + + + + <title>Customer Login</title> + + Assertion.response_data + false + 2 + + + + + + + + + true + ${form_key} + = + true + form_key + + + true + ${customer_email} + = + true + login[username] + + + true + ${customer_password} + = + true + login[password] + + + true + + = + true + send + + + + + + + + ${request_protocol} + + ${base_path}customer/account/loginPost/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/common/login.jmx + + + + <title>My Account</title> + + Assertion.response_data + false + 2 + + + + false + addressId + customer/address/edit/id/([^'"]+)/ + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + addressId + + + + + + + + true + + = + true + sections + + + true + false + = + true + update_section_id + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ + + + + + + + + ${request_protocol} + + ${base_path}customer/section/load/ + GET + true + false + true + false + false + + + + + + + + + + + + + ${request_protocol} + + ${base_path}${category_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/open_category.jmx + + + + <span class="base" data-ui-id="page-title">${category_name}</span> + + Assertion.response_data + false + 6 + + + + false + category_id + <li class="item category([^'"]+)">\s*<strong>${category_name}</strong>\s*</li> + $1$ + + 1 + simple_product_1_url_key + + + + + ^[0-9]+$ + + Assertion.response_data + false + 1 + variable + category_id + + + + + + true + 2 + mpaf/tool/fragments/ce/loop_controller.jmx + + + 1 + + 1 + _counter + + true + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("simple_products_list").size()); +product = props.get("simple_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/simple_products_setup.jmx + + + + mpaf/tool/fragments/ce/loops/update_products_added_counter.jmx + +productsAdded = Integer.parseInt(vars.get("totalProductsAdded")); +productsAdded = productsAdded + 1; + +vars.put("totalProductsAdded", String.valueOf(productsAdded)); + + + + true + + + + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + + + + true + ${product_id} + = + true + product + + + true + + = + true + related_product + + + true + 1 + = + true + qty + + + true + ${form_key} + = + true + form_key + + + + + + + + ${request_protocol} + + ${base_path}checkout/cart/add/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/simple_product_add_to_cart.jmx + + + + + X-Requested-With + XMLHttpRequest + + + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx + + + + + + + + true + cart,messages + = + true + sections + + + true + true + = + true + update_section_id + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ + + + + + + + + ${request_protocol} + + ${base_path}customer/section/load/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/load_cart_section.jmx + + + + You added ${product_name} to your shopping cart. + + Assertion.response_data + false + 2 + + + + + This product is out of stock. + + Assertion.response_data + false + 6 + + + + + \"summary_count\":${totalProductsAdded} + + Assertion.response_data + false + 2 + + + + + + + X-Requested-With + XMLHttpRequest + + + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx + + + + + + true + 1 + mpaf/tool/fragments/ce/loop_controller.jmx + + + 1 + + 1 + _counter + + true + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("configurable_products_list").size()); +product = props.get("configurable_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/configurable_products_setup.jmx + + + + mpaf/tool/fragments/ce/loops/update_products_added_counter.jmx + +productsAdded = Integer.parseInt(vars.get("totalProductsAdded")); +productsAdded = productsAdded + 1; + +vars.put("totalProductsAdded", String.valueOf(productsAdded)); + + + + true + + + + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + true + 1 + mpaf/tool/fragments/ce/common/get_configurable_product_options.jmx + + + + + Content-Type + application/json + + + Accept + */* + + + + + + true + + + + false + {"username":"${admin_user}","password":"${admin_password}"} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/V1/integration/admin/token + POST + true + false + true + false + false + + + + + admin_token + $ + + + BODY + + + + + ^[a-z0-9-]+$ + + Assertion.response_data + false + 1 + variable + admin_token + + + + + + + Authorization + Bearer ${admin_token} + + + + + + + + + + + + + ${request_protocol} + + ${base_path}rest/V1/configurable-products/${product_sku}/options/all + GET + true + false + true + false + false + + + + + attribute_ids + $.[*].attribute_id + NO_VALUE + + BODY + + + + option_values + $.[*].values[0].value_index + NO_VALUE + + BODY + + + + + + + + + + true + ${product_id} + = + true + product + + + true + + = + true + related_product + + + true + 1 + = + true + qty + + + true + ${form_key} + = + true + form_key + + + + + + + + ${request_protocol} + + ${base_path}checkout/cart/add/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/configurable_product_add_to_cart.jmx + + + false + + + + try { + attribute_ids = vars.get("attribute_ids"); + option_values = vars.get("option_values"); + attribute_ids = attribute_ids.replace("[","").replace("]","").replace("\"", ""); + option_values = option_values.replace("[","").replace("]","").replace("\"", ""); + attribute_ids_array = attribute_ids.split(","); + option_values_array = option_values.split(","); + args = ctx.getCurrentSampler().getArguments(); + it = args.iterator(); + while (it.hasNext()) { + argument = it.next(); + if (argument.getStringValue().contains("${")) { + args.removeArgument(argument.getName()); + } + } + for (int i = 0; i < attribute_ids_array.length; i++) { + ctx.getCurrentSampler().addArgument("super_attribute[" + attribute_ids_array[i] + "]", option_values_array[i]); + } + } catch (Exception e) { + log.error("eror…", e); + } + + mpaf/tool/fragments/ce/common/configurable_product_add_to_cart_preprocessor.jmx + + + + + + X-Requested-With + XMLHttpRequest + + + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx + + + + + + + + true + cart,messages + = + true + sections + + + true + true + = + true + update_section_id + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ + + + + + + + + ${request_protocol} + + ${base_path}customer/section/load/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/load_cart_section.jmx + + + + You added ${product_name} to your shopping cart. + + Assertion.response_data + false + 2 + + + + + This product is out of stock. + + Assertion.response_data + false + 6 + + + + + \"summary_count\":${totalProductsAdded} + + Assertion.response_data + false + 2 + + + + + + + X-Requested-With + XMLHttpRequest + + + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}checkout/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/customer_checkout/checkout_start.jmx + + + + <title>Checkout</title> + + Assertion.response_data + false + 2 + + + + + <title>Shopping Cart</title> + + Assertion.response_data + false + 6 + + + + false + cart_id + "quoteData":{"entity_id":"([^'"]+)", + $1$ + + 1 + + + + false + address_id + "default_billing":"([^'"]+)", + $1$ + + 1 + + + + false + customer_id + "customer_id":([^'",]+), + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + cart_id + + + + + [0-9]+$ + + Assertion.response_data + false + 1 + variable + address_id + + + + + [0-9]+$ + + Assertion.response_data + false + 1 + variable + customer_id + + + + + + true + + + + false + {"addressId":"${addressId}"} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/carts/mine/estimate-shipping-methods-by-address-id + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/customer_checkout/checkout_estimate_shipping_methods.jmx + + + + + Referer + ${base_path}checkout/onepage/ + + + Content-Type + application/json; charset=UTF-8 + + + X-Requested-With + XMLHttpRequest + + + Accept + application/json + + + + + + + "available":true + + Assertion.response_data + false + 2 + + + + + + true + + + + false + {"addressInformation":{"shipping_address":{"customerAddressId":"${address_id}","countryId":"US","regionId":5,"regionCode":"AR","region":"Arkansas","customerId":"${customer_id}","street":["123 Freedom Blvd. #123"],"telephone":"022-333-4455","postcode":"123123","city":"Fayetteville","firstname":"Anthony","lastname":"Nealy"},"shipping_method_code":"flatrate","shipping_carrier_code":"flatrate"}} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/carts/mine/shipping-information + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/customer_checkout/checkout_billing_shipping_information.jmx + + + + + Referer + ${host}${base_path}checkout/onepage + + + Content-Type + application/json; charset=UTF-8 + + + X-Requested-With + XMLHttpRequest + + + Accept + application/json + + + + + + + {"payment_methods" + + Assertion.response_data + false + 2 + + + + + + true + + + + false + {"cartId":"${cart_id}","paymentMethod":{"method":"checkmo","po_number":null,"additional_data":null},"billingAddress":{"customerAddressId":"${address_id}","countryId":"US","regionId":5,"regionCode":"AR","region":"Arkansas","customerId":"${customer_id}","street":["123 Freedom Blvd. #123"],"telephone":"022-333-4455","postcode":"123123","city":"Fayetteville","firstname":"Anthony","lastname":"Nealy"}} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/carts/mine/payment-information + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/customer_checkout/checkout_payment_info_place_order.jmx + + + + + Referer + ${host}${base_path}checkout/onepage + + + Content-Type + application/json; charset=UTF-8 + + + Accept + application/json + + + X-Requested-With + XMLHttpRequest + + + + + + + "[0-9]+" + + Assertion.response_data + false + 2 + + + + + + + + + + + + + ${request_protocol} + + ${base_path}checkout/onepage/success/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/customer_checkout/checkout_success.jmx + + + + Thank you for your purchase! + Your order number is + + Assertion.response_data + false + 2 + + + + + + + + + + + + + + ${request_protocol} + + ${base_path}customer/account/logout/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/logout.jmx + + + + You are signed out. + + Assertion.response_data + false + 2 + + + + + false + + + curSampler = ctx.getCurrentSampler(); +if(curSampler.getName().contains("Checkout success")) { + manager = curSampler.getCookieManager(); + manager.clear(); +} + + mpaf/tool/fragments/ce/customer_checkout/checkout_clear_cookie.jmx + + + + + + + 1 + false + 1 + ${reviewByCustomerPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Product Review By Customer"); + + true + + + + + + + 30 + ${host} + / + false + 0 + true + true + + + ${form_key} + ${host} + ${base_path} + false + 0 + true + true + + + true + mpaf/tool/fragments/ce/http_cookie_manager.jmx + + + + mpaf/tool/fragments/ce/common/init_random_generator_setup.jmx + +import java.util.Random; + +Random random = new Random(); +if (${seedForRandom} > 0) { + random.setSeed(${seedForRandom} + ${__threadNum}); +} + +vars.putObject("randomIntGenerator", random); + + + + true + + + + + mpaf/tool/fragments/ce/get_customer_email.jmx + import org.apache.jmeter.samplers.SampleResult; + +String siterator = vars.get("customer_emails_index"); +int iterator; +if(siterator == null){ + iterator = 0; + vars.put("customer_emails_index", "0"); +} else { + iterator = Integer.parseInt(siterator); + iterator ++; + vars.put("customer_emails_index", iterator.toString()); +} + +emails_list = props.get("customer_emails_list"); + +threadsNumber = ctx.getThreadGroup().getNumThreads(); +emailsCount = emails_list.size(); +if (threadsNumber > emailsCount) { + log.error(" There are not enough customers for this scenario."); +} else { + clusterLength = Math.round(emailsCount / threadsNumber); + threadNum = ctx.getThreadNum(); + emails_index = clusterLength * threadNum + iterator; + maxLimit = clusterLength * (threadNum + 1); + if (emails_index >= maxLimit) { + iterator = 0; + emails_index = clusterLength * threadNum + iterator; + vars.put("customer_emails_index", iterator.toString()); + } +} +vars.put("customer_email", emails_list.get(emails_index)); + + + true + + + + + + + + + + + + ${request_protocol} + + ${base_path}customer/account/login/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/open_login_page.jmx + + + + <title>Customer Login</title> + + Assertion.response_data + false + 2 + + + + + + + + + true + ${form_key} + = + true + form_key + + + true + ${customer_email} + = + true + login[username] + + + true + ${customer_password} + = + true + login[password] + + + true + + = + true + send + + + + + + + + ${request_protocol} + + ${base_path}customer/account/loginPost/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/common/login.jmx + + + + <title>My Account</title> + + Assertion.response_data + false + 2 + + + + false + addressId + customer/address/edit/id/([^'"]+)/ + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + addressId + + + + + + + + true + + = + true + sections + + + true + false + = + true + update_section_id + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ + + + + + + + + ${request_protocol} + + ${base_path}customer/section/load/ + GET + true + false + true + false + false + + + + + + true + 1 + mpaf/tool/fragments/ce/loop_controller.jmx + + + 1 + + 1 + _counter + + true + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("simple_products_list").size()); +product = props.get("simple_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/simple_products_setup.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + + + + true + ${form_key} + = + true + form_key + + + true + 3 + = + true + ratings[1] + + + true + + = + true + validate_rating + + + true + FirstName + = + true + nickname + + + true + Some Review Title + = + true + title + + + true + Some Review Text + = + true + detail + + + + + + + + ${request_protocol} + + ${base_path}review/product/post/id/${product_id} + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/product_review/product_review.jmx + + + + HTTP/1.1 200 OK + + Assertion.response_headers + false + 16 + + + + + + + + + true + review,messages + = + true + sections + + + true + false + = + true + update_section_id + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ + + + + + + + + ${request_protocol} + + ${base_path}customer/section/load/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_review/load_review.jmx + + + + 1 + 0 + ${__javaScript(Math.round(${reviewDelay}*1000))} + mpaf/tool/fragments/ce/product_review/product_review_pause.jmx + + + + + + + + + + + + ${request_protocol} + + ${base_path}customer/account/logout/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/logout.jmx + + + + You are signed out. + + Assertion.response_data + false + 2 + + + + + + + + 1 + false + 1 + ${addToCartByCustomerPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Add To Cart By Customer"); + + true + + + + + + + 30 + ${host} + / + false + 0 + true + true + + + ${form_key} + ${host} + ${base_path} + false + 0 + true + true + + + true + mpaf/tool/fragments/ce/http_cookie_manager.jmx + + + + mpaf/tool/fragments/ce/common/init_random_generator_setup.jmx + +import java.util.Random; + +Random random = new Random(); +if (${seedForRandom} > 0) { + random.setSeed(${seedForRandom} + ${__threadNum}); +} + +vars.putObject("randomIntGenerator", random); + + + + true + + + + + mpaf/tool/fragments/ce/common/init_total_products_in_cart_setup.jmx + +vars.put("totalProductsAdded", "0"); + + + + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("category_url_keys_list").size()); + +vars.put("category_url_key", props.get("category_url_keys_list").get(number)); +vars.put("category_name", props.get("category_names_list").get(number)); + + + + false + mpaf/tool/fragments/ce/common/extract_category_setup.jmx + + + + mpaf/tool/fragments/ce/get_customer_email.jmx + import org.apache.jmeter.samplers.SampleResult; + +String siterator = vars.get("customer_emails_index"); +int iterator; +if(siterator == null){ + iterator = 0; + vars.put("customer_emails_index", "0"); +} else { + iterator = Integer.parseInt(siterator); + iterator ++; + vars.put("customer_emails_index", iterator.toString()); +} + +emails_list = props.get("customer_emails_list"); + +threadsNumber = ctx.getThreadGroup().getNumThreads(); +emailsCount = emails_list.size(); +if (threadsNumber > emailsCount) { + log.error(" There are not enough customers for this scenario."); +} else { + clusterLength = Math.round(emailsCount / threadsNumber); + threadNum = ctx.getThreadNum(); + emails_index = clusterLength * threadNum + iterator; + maxLimit = clusterLength * (threadNum + 1); + if (emails_index >= maxLimit) { + iterator = 0; + emails_index = clusterLength * threadNum + iterator; + vars.put("customer_emails_index", iterator.toString()); + } +} +vars.put("customer_email", emails_list.get(emails_index)); + + + true + + + + + + + + + + + + ${request_protocol} + + ${base_path}customer/account/login/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/open_login_page.jmx + + + + <title>Customer Login</title> + + Assertion.response_data + false + 2 + + + + + + + + + true + ${form_key} + = + true + form_key + + + true + ${customer_email} + = + true + login[username] + + + true + ${customer_password} + = + true + login[password] + + + true + + = + true + send + + + + + + + + ${request_protocol} + + ${base_path}customer/account/loginPost/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/common/login.jmx + + + + <title>My Account</title> + + Assertion.response_data + false + 2 + + + + false + addressId + customer/address/edit/id/([^'"]+)/ + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + addressId + + + + + + + + true + + = + true + sections + + + true + false + = + true + update_section_id + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ + + + + + + + + ${request_protocol} + + ${base_path}customer/section/load/ + GET + true + false + true + false + false + + + + + + + + + + + + + ${request_protocol} + + ${base_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/open_home_page.jmx + + + + <title>Home page</title> + + Assertion.response_data + false + 2 + + + + + + + + + + + + + ${request_protocol} + + ${base_path}${category_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/open_category.jmx + + + + <span class="base" data-ui-id="page-title">${category_name}</span> + + Assertion.response_data + false + 6 + + + + false + category_id + <li class="item category([^'"]+)">\s*<strong>${category_name}</strong>\s*</li> + $1$ + + 1 + simple_product_1_url_key + + + + + ^[0-9]+$ + + Assertion.response_data + false + 1 + variable + category_id + + + + + + true + 2 + mpaf/tool/fragments/ce/loop_controller.jmx + + + 1 + + 1 + _counter + + true + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("simple_products_list").size()); +product = props.get("simple_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/simple_products_setup.jmx + + + + mpaf/tool/fragments/ce/loops/update_products_added_counter.jmx + +productsAdded = Integer.parseInt(vars.get("totalProductsAdded")); +productsAdded = productsAdded + 1; + +vars.put("totalProductsAdded", String.valueOf(productsAdded)); + + + + true + + + + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + + + + true + ${product_id} + = + true + product + + + true + + = + true + related_product + + + true + 1 + = + true + qty + + + true + ${form_key} + = + true + form_key + + + + + + + + ${request_protocol} + + ${base_path}checkout/cart/add/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/simple_product_add_to_cart.jmx + + + + + X-Requested-With + XMLHttpRequest + + + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx + + + + + + + + true + cart,messages + = + true + sections + + + true + true + = + true + update_section_id + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ + + + + + + + + ${request_protocol} + + ${base_path}customer/section/load/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/load_cart_section.jmx + + + + You added ${product_name} to your shopping cart. + + Assertion.response_data + false + 2 + + + + + This product is out of stock. + + Assertion.response_data + false + 6 + + + + + \"summary_count\":${totalProductsAdded} + + Assertion.response_data + false + 2 + + + + + + + X-Requested-With + XMLHttpRequest + + + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx + + + + + + true + 1 + mpaf/tool/fragments/ce/loop_controller.jmx + + + 1 + + 1 + _counter + + true + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("configurable_products_list").size()); +product = props.get("configurable_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/configurable_products_setup.jmx + + + + mpaf/tool/fragments/ce/loops/update_products_added_counter.jmx + +productsAdded = Integer.parseInt(vars.get("totalProductsAdded")); +productsAdded = productsAdded + 1; + +vars.put("totalProductsAdded", String.valueOf(productsAdded)); + + + + true + + + + + + + + + + + + ${request_protocol} + + ${base_path}${product_url_key}${url_suffix} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/product_view.jmx + + + + <span>In stock</span> + + Assertion.response_data + false + 2 + + + + + + true + 1 + mpaf/tool/fragments/ce/common/get_configurable_product_options.jmx + + + + + Content-Type + application/json + + + Accept + */* + + + + + + true + + + + false + {"username":"${admin_user}","password":"${admin_password}"} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/V1/integration/admin/token + POST + true + false + true + false + false + + + + + admin_token + $ + + + BODY + + + + + ^[a-z0-9-]+$ + + Assertion.response_data + false + 1 + variable + admin_token + + + + + + + Authorization + Bearer ${admin_token} + + + + + + + + + + + + + ${request_protocol} + + ${base_path}rest/V1/configurable-products/${product_sku}/options/all + GET + true + false + true + false + false + + + + + attribute_ids + $.[*].attribute_id + NO_VALUE + + BODY + + + + option_values + $.[*].values[0].value_index + NO_VALUE + + BODY + + + + + + + + + + true + ${product_id} + = + true + product + + + true + + = + true + related_product + + + true + 1 + = + true + qty + + + true + ${form_key} + = + true + form_key + + + + + + + + ${request_protocol} + + ${base_path}checkout/cart/add/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/configurable_product_add_to_cart.jmx + + + false + + + + try { + attribute_ids = vars.get("attribute_ids"); + option_values = vars.get("option_values"); + attribute_ids = attribute_ids.replace("[","").replace("]","").replace("\"", ""); + option_values = option_values.replace("[","").replace("]","").replace("\"", ""); + attribute_ids_array = attribute_ids.split(","); + option_values_array = option_values.split(","); + args = ctx.getCurrentSampler().getArguments(); + it = args.iterator(); + while (it.hasNext()) { + argument = it.next(); + if (argument.getStringValue().contains("${")) { + args.removeArgument(argument.getName()); + } + } + for (int i = 0; i < attribute_ids_array.length; i++) { + ctx.getCurrentSampler().addArgument("super_attribute[" + attribute_ids_array[i] + "]", option_values_array[i]); + } + } catch (Exception e) { + log.error("eror…", e); + } + + mpaf/tool/fragments/ce/common/configurable_product_add_to_cart_preprocessor.jmx + + + + + + X-Requested-With + XMLHttpRequest + + + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx + + + + + + + + true + cart,messages + = + true + sections + + + true + true + = + true + update_section_id + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ + + + + + + + + ${request_protocol} + + ${base_path}customer/section/load/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/load_cart_section.jmx + + + + You added ${product_name} to your shopping cart. + + Assertion.response_data + false + 2 + + + + + This product is out of stock. + + Assertion.response_data + false + 6 + + + + + \"summary_count\":${totalProductsAdded} + + Assertion.response_data + false + 2 + + + + + + + X-Requested-With + XMLHttpRequest + + + mpaf/tool/fragments/ce/common/http_header_manager_ajax.jmx + + + + + + + + + + continue + + false + ${loops} + + ${adminPoolUsers} + ${ramp_period} + 1505803944000 + 1505803944000 + false + + + mpaf/tool/fragments/_system/thread_group.jmx + + + 1 + false + 1 + ${adminProductEditingPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Admin Edit Product"); + + true + + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + mpaf/tool/fragments/ce/admin_login/admin_retrieve_form_key.jmx + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + + + mpaf/tool/fragments/ce/admin_edit_product/admin_edit_product_updated.jmx + import java.util.ArrayList; + import java.util.HashMap; + +try { + simpleCount = props.get("simple_products_list").size(); + configCount = props.get("configurable_products_list").size(); + productCount = 0; + if (simpleCount > configCount) { + productCount = configCount; + } else { + productCount = simpleCount; + } + int threadsNumber = ctx.getThreadGroup().getNumThreads(); + if (threadsNumber == 0) { + threadsNumber = 1; + } + //Current thread number starts from 0 + currentThreadNum = ctx.getThreadNum(); + + String siterator = vars.get("threadIterator_" + currentThreadNum.toString()); + iterator = 0; + if(siterator == null){ + vars.put("threadIterator_" + currentThreadNum.toString() , "0"); + } else { + iterator = Integer.parseInt(siterator); + iterator ++; + vars.put("threadIterator_" + currentThreadNum.toString() , iterator.toString()); + } + + //Number of products for one thread + productClusterLength = productCount / threadsNumber; + //Index of the current product from the cluster + i = productClusterLength * currentThreadNum + iterator; + + if (iterator >= productClusterLength) { + vars.put("threadIterator_" + currentThreadNum.toString(), "0"); + iterator = 0; + } + + //ids of simple and configurable products to edit + vars.put("simple_product_id", props.get("simple_products_list").get(i).get("id")); + vars.put("configurable_product_id", props.get("configurable_products_list").get(i).get("id")); + + //id of related product + do { + relatedIndex = (int)(Math.random() * props.get("simple_products_list").size()); + } while(i == relatedIndex); + vars.put("related_product_id", props.get("simple_products_list").get(relatedIndex).get("id")); + } catch (Exception ex) { + log.info("Script execution failed", ex); +} + + + false + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/edit/id/${simple_product_id}/ + GET + true + false + true + false + false + + + + + + Product + + Assertion.response_data + false + 16 + + + + false + simple_product_name + ,"name":"([^'"]+)", + $1$ + + 1 + + + + false + simple_product_sku + ,"sku":"([^'"]+)", + $1$ + + 1 + + + + false + simple_product_category_id + ,"category_ids":."(\d+)". + $1$ + + 1 + + + + + Passing arguments between threads + //Additional category to be added + + int categoryId = Integer.parseInt(vars.get("simple_product_category_id")); + if (categoryId > 4) { + categoryId = categoryId - 1; + } else { + categoryId = categoryId + 1; + } + vars.put("category_additional", categoryId.toString()); + //New price + vars.put("price_new", "9999"); + //New special price + vars.put("special_price_new", "8888"); + //New quantity + vars.put("quantity_new", "100600"); + + + false + + + + + + + true + true + = + true + ajax + false + + + true + true + = + true + isAjax + false + + + true + ${admin_form_key} + = + true + form_key + false + + + true + ${simple_product_name} + = + true + product[name] + false + + + true + ${simple_product_sku} + = + true + product[sku] + false + + + true + ${price_new} + = + true + product[price] + false + + + true + 2 + = + true + product[tax_class_id] + false + + + true + ${quantity_new} + = + true + product[quantity_and_stock_status][qty] + false + + + true + 1 + = + true + product[quantity_and_stock_status][is_in_stock] + false + + + true + 1.0000 + = + true + product[weight] + false + + + true + 1 + = + true + product[product_has_weight] + false + + + true + ${simple_product_category_id} + = + true + product[category_ids][] + false + + + true + <p>Full simple product Description ${simple_product_id} Edited</p> + = + true + product[description] + false + + + true + 1 + = + true + product[status] + false + + + true + + = + true + product[configurable_variations] + false + + + true + 1 + = + true + affect_configurable_product_attributes + false + + + true + + = + true + product[image] + false + + + true + + = + true + product[small_image] + false + + + true + + = + true + product[thumbnail] + false + + + true + ${simple_product_name} + = + true + product[url_key] + false + + + true + ${simple_product_name} Meta Title Edited + = + true + product[meta_title] + false + + + true + ${simple_product_name} Meta Keyword Edited + = + true + product[meta_keyword] + false + + + true + ${simple_product_name} Meta Description Edited + = + true + product[meta_description] + false + + + true + 1 + = + true + product[website_ids][] + false + + + true + ${special_price_new} + = + true + product[special_price] + false + + + true + + = + true + product[special_from_date] + false + + + true + + = + true + product[special_to_date] + false + + + true + + = + true + product[cost] + false + + + true + 1 + = + true + product[stock_data][use_config_manage_stock] + false + + + true + ${quantity_new} + = + true + product[stock_data][original_inventory_qty] + false + + + true + ${quantity_new} + = + true + product[stock_data][qty] + false + + + true + 0 + = + true + product[stock_data][min_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_min_qty] + false + + + true + 1 + = + true + product[stock_data][min_sale_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_min_sale_qty] + false + + + true + 10000 + = + true + product[stock_data][max_sale_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_max_sale_qty] + false + + + true + 0 + = + true + product[stock_data][is_qty_decimal] + false + + + true + 0 + = + true + product[stock_data][is_decimal_divided] + false + + + true + 0 + = + true + product[stock_data][backorders] + false + + + true + 1 + = + true + product[stock_data][use_config_backorders] + false + + + true + 1 + = + true + product[stock_data][notify_stock_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_notify_stock_qty] + false + + + true + 0 + = + true + product[stock_data][enable_qty_increments] + false + + + true + 0 + = + true + product[stock_data][qty_increments] + false + + + true + 1 + = + true + product[stock_data][use_config_qty_increments] + false + + + true + 1 + = + true + product[stock_data][is_in_stock] + false + + + true + + = + true + product[custom_design] + false + + + true + + = + true + product[custom_design_from] + false + + + true + + = + true + product[custom_design_to] + false + + + true + + = + true + product[custom_layout_update] + false + + + true + + = + true + product[page_layout] + false + + + true + container2 + = + true + product[options_container] + false + + + true + + = + true + new-variations-attribute-set-id + false + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/validate/id/${simple_product_id}/?isAjax=true + POST + true + false + true + false + false + + + + + + {"error":false} + + Assertion.response_data + false + 2 + + + + + + + + true + true + = + true + ajax + false + + + true + true + = + true + isAjax + false + + + true + ${admin_form_key} + = + true + form_key + false + + + true + ${simple_product_name} + = + true + product[name] + false + + + true + ${simple_product_sku} + = + true + product[sku] + false + + + true + ${price_new} + = + true + product[price] + false + + + true + 2 + = + true + product[tax_class_id] + false + + + true + ${quantity_new} + = + true + product[quantity_and_stock_status][qty] + false + + + true + 1 + = + true + product[quantity_and_stock_status][is_in_stock] + false + + + true + 1.0000 + = + true + product[weight] + false + + + true + 1 + = + true + product[product_has_weight] + false + + + true + ${simple_product_category_id} + = + true + product[category_ids][] + false + + + true + ${category_additional} + = + true + product[category_ids][] + + + true + <p>Full simple product Description ${simple_product_id} Edited</p> + = + true + product[description] + false + + + true + 1 + = + true + product[status] + false + + + true + + = + true + product[configurable_variations] + false + + + true + 1 + = + true + affect_configurable_product_attributes + false + + + true + + = + true + product[image] + false + + + true + + = + true + product[small_image] + false + + + true + + = + true + product[thumbnail] + false + + + true + ${simple_product_name} + = + true + product[url_key] + false + + + true + ${simple_product_name} Meta Title Edited + = + true + product[meta_title] + false + + + true + ${simple_product_name} Meta Keyword Edited + = + true + product[meta_keyword] + false + + + true + ${simple_product_name} Meta Description Edited + = + true + product[meta_description] + false + + + true + 1 + = + true + product[website_ids][] + false + + + true + ${special_price_new} + = + true + product[special_price] + false + + + true + + = + true + product[special_from_date] + false + + + true + + = + true + product[special_to_date] + false + + + true + + = + true + product[cost] + false + + + true + 1 + = + true + product[stock_data][use_config_manage_stock] + false + + + true + ${quantity_new} + = + true + product[stock_data][original_inventory_qty] + false + + + true + ${quantity_new} + = + true + product[stock_data][qty] + false + + + true + 0 + = + true + product[stock_data][min_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_min_qty] + false + + + true + 1 + = + true + product[stock_data][min_sale_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_min_sale_qty] + false + + + true + 10000 + = + true + product[stock_data][max_sale_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_max_sale_qty] + false + + + true + 0 + = + true + product[stock_data][is_qty_decimal] + false + + + true + 0 + = + true + product[stock_data][is_decimal_divided] + false + + + true + 0 + = + true + product[stock_data][backorders] + false + + + true + 1 + = + true + product[stock_data][use_config_backorders] + false + + + true + 1 + = + true + product[stock_data][notify_stock_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_notify_stock_qty] + false + + + true + 0 + = + true + product[stock_data][enable_qty_increments] + false + + + true + 0 + = + true + product[stock_data][qty_increments] + false + + + true + 1 + = + true + product[stock_data][use_config_qty_increments] + false + + + true + 1 + = + true + product[stock_data][is_in_stock] + false + + + true + + = + true + product[custom_design] + false + + + true + + = + true + product[custom_design_from] + false + + + true + + = + true + product[custom_design_to] + false + + + true + + = + true + product[custom_layout_update] + false + + + true + + = + true + product[page_layout] + false + + + true + container2 + = + true + product[options_container] + false + + + true + + = + true + new-variations-attribute-set-id + false + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/save/id/${simple_product_id}/back/edit/active_tab/product-details/ + POST + true + false + true + false + false + + + + + + You saved the product + + Assertion.response_data + false + 2 + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/edit/id/${configurable_product_id}/ + GET + true + false + true + false + false + + + + + + Product + + Assertion.response_data + false + 16 + + + + false + configurable_product_name + ,"name":"([^'"]+)", + $1$ + + 1 + + + + false + configurable_product_sku + ,"sku":"([^'"]+)", + $1$ + + 1 + + + + false + configurable_product_category_id + ,"category_ids":."(\d+)" + $1$ + + 1 + + + + false + configurable_attribute_id + ,"configurable_variation":"([^'"]+)", + $1$ + + 1 + true + + + + false + configurable_matrix + "configurable-matrix":(\[.*?\]) + $1$ + + 1 + true + + + + associated_products_ids + $.[*].id + + configurable_matrix + VAR + + + + false + configurable_product_data + (\{"product":.*?configurable_attributes_data.*?\})\s*< + $1$ + + 1 + + + + configurable_attributes_data + $.product.configurable_attributes_data + + configurable_product_data + VAR + + + + false + configurable_attribute_ids + "attribute_id":"(\d+)" + $1$ + + -1 + variable + configurable_attributes_data + + + + false + configurable_attribute_codes + "code":"(\w+)" + $1$ + + -1 + variable + configurable_attributes_data + + + + false + configurable_attribute_labels + "label":"(.*?)" + $1$ + + -1 + variable + configurable_attributes_data + + + + false + configurable_attribute_values + "values":(\{(?:\}|.*?\}\})) + $1$ + + -1 + variable + configurable_attributes_data + + + + + configurable_attribute_ids + configurable_attribute_id + true + + + + 1 + ${configurable_attribute_ids_matchNr} + 1 + attribute_counter + + true + true + + + + return vars.get("configurable_attribute_values_" + vars.get("attribute_counter")); + + + false + + + + false + attribute_${configurable_attribute_id}_values + "value_index":"(\d+)" + $1$ + + -1 + configurable_attribute_values_${attribute_counter} + + + + + + + + + true + true + = + true + isAjax + false + + + true + ${admin_form_key} + = + true + form_key + false + + + true + ${configurable_product_name} + = + true + product[name] + false + + + true + ${configurable_product_sku} + = + true + product[sku] + false + + + true + ${price_new} + = + true + product[price] + false + + + true + 2 + = + true + product[tax_class_id] + false + + + true + 1 + = + true + product[quantity_and_stock_status][is_in_stock] + false + + + true + 3 + = + true + product[weight] + false + + + true + ${configurable_product_category_id} + = + true + product[category_ids][] + false + + + true + ${category_additional} + = + true + product[category_ids][] + false + + + true + <p>Configurable product description ${configurable_product_id} Edited</p> + = + true + product[description] + false + + + true + 1 + = + true + product[status] + false + + + true + ${configurable_product_name} Meta Title Edited + = + true + product[meta_title] + false + + + true + ${configurable_product_name} Meta Keyword Edited + = + true + product[meta_keyword] + false + + + true + ${configurable_product_name} Meta Description Edited + = + true + product[meta_description] + false + + + true + 1 + = + true + product[website_ids][] + false + + + true + ${special_price_new} + = + true + product[special_price] + false + + + true + + = + true + product[special_from_date] + false + + + true + + = + true + product[special_to_date] + false + + + true + + = + true + product[cost] + false + + + true + 1 + = + true + product[stock_data][use_config_manage_stock] + false + + + true + 0 + = + true + product[stock_data][min_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_min_qty] + false + + + true + 1 + = + true + product[stock_data][min_sale_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_min_sale_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_max_sale_qty] + false + + + true + 0 + = + true + product[stock_data][is_qty_decimal] + false + + + true + 0 + = + true + product[stock_data][is_decimal_divided] + false + + + true + 0 + = + true + product[stock_data][backorders] + false + + + true + 1 + = + true + product[stock_data][use_config_backorders] + false + + + true + 1 + = + true + product[stock_data][notify_stock_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_notify_stock_qty] + false + + + true + 0 + = + true + product[stock_data][enable_qty_increments] + false + + + true + 0 + = + true + product[stock_data][qty_increments] + false + + + true + 1 + = + true + product[stock_data][use_config_qty_increments] + false + + + true + 1 + = + true + product[stock_data][is_in_stock] + false + + + true + + = + true + product[custom_design] + false + + + true + + = + true + product[custom_design_from] + false + + + true + + = + true + product[custom_design_to] + false + + + true + + = + true + product[custom_layout_update] + false + + + true + + = + true + product[page_layout] + false + + + true + container2 + = + true + product[options_container] + false + + + true + ${configurable_attribute_id} + = + true + product[configurable_variation] + false + + + true + ${configurable_product_name} + = + true + product[url_key] + + + true + 1 + = + true + product[use_config_gift_message_available] + + + true + 1 + = + true + product[use_config_gift_wrapping_available] + + + true + 4 + = + true + product[visibility] + + + true + 1 + = + true + product[product_has_weight] + true + + + true + 50 + = + true + product[stock_data][qty] + false + + + true + configurable + = + true + product[stock_data][type_id] + false + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/validate/id/${configurable_product_id}/ + POST + true + false + true + false + false + + + + + false + + + try { + int attributesCount = Integer.parseInt(vars.get("configurable_attribute_ids_matchNr")); + for (int i = 1; i <= attributesCount; i++) { + attributeId = vars.get("configurable_attribute_ids_" + i.toString()); + attributeCode = vars.get("configurable_attribute_codes_" + i.toString()); + attributeLabel = vars.get("configurable_attribute_labels_" + i.toString()); + ctx.getCurrentSampler().addArgument("attributes[" + (i - 1).toString() + "]", attributeId); + ctx.getCurrentSampler().addArgument("attribute_codes[" + (i - 1).toString() + "]", attributeCode); + ctx.getCurrentSampler().addArgument("product[" + attributeCode + "]", attributeId); + ctx.getCurrentSampler().addArgument("product[configurable_attributes_data][" + attributeId + "][attribute_id]", attributeId); + ctx.getCurrentSampler().addArgument("product[configurable_attributes_data][" + attributeId + "][position]", (i - 1).toString()); + ctx.getCurrentSampler().addArgument("product[configurable_attributes_data][" + attributeId + "][code]", attributeCode); + ctx.getCurrentSampler().addArgument("product[configurable_attributes_data][" + attributeId + "][label]", attributeLabel); + + int valuesCount = Integer.parseInt(vars.get("attribute_" + attributeId + "_values_matchNr")); + for (int j = 1; j <= valuesCount; j++) { + attributeValue = vars.get("attribute_" + attributeId + "_values_" + j.toString()); + ctx.getCurrentSampler().addArgument( + "product[configurable_attributes_data][" + attributeId + "][values][" + attributeValue + "][include]", + "1" + ); + ctx.getCurrentSampler().addArgument( + "product[configurable_attributes_data][" + attributeId + "][values][" + attributeValue + "][value_index]", + attributeValue + ); + } + } + ctx.getCurrentSampler().addArgument("associated_product_ids_serialized", vars.get("associated_products_ids").toString()); + } catch (Exception e) { + log.error("error???", e); + } + + + + + {"error":false} + + Assertion.response_data + false + 2 + + + + + + + + true + true + = + true + ajax + false + + + true + true + = + true + isAjax + false + + + true + ${admin_form_key} + = + true + form_key + false + + + true + ${configurable_product_name} + = + true + product[name] + false + + + true + ${configurable_product_sku} + = + true + product[sku] + false + + + true + ${price_new} + = + true + product[price] + false + + + true + 2 + = + true + product[tax_class_id]admin + false + + + true + 1 + = + true + product[quantity_and_stock_status][is_in_stock] + false + + + true + 3 + = + true + product[weight] + false + + + true + ${configurable_product_category_id} + = + true + product[category_ids][] + false + + + true + ${category_additional} + = + true + product[category_ids][] + false + + + true + <p>Configurable product description ${configurable_product_id} Edited</p> + = + true + product[description] + false + + + true + 1 + = + true + product[status] + false + + + true + ${configurable_product_name} Meta Title Edited + = + true + product[meta_title] + false + + + true + ${configurable_product_name} Meta Keyword Edited + = + true + product[meta_keyword] + false + + + true + ${configurable_product_name} Meta Description Edited + = + true + product[meta_description] + false + + + true + 1 + = + true + product[website_ids][] + false + + + true + ${special_price_new} + = + true + product[special_price] + false + + + true + + = + true + product[special_from_date] + false + + + true + + = + true + product[special_to_date] + false + + + true + + = + true + product[cost] + false + + + true + 1 + = + true + product[stock_data][use_config_manage_stock] + false + + + true + 0 + = + true + product[stock_data][min_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_min_qty] + false + + + true + 1 + = + true + product[stock_data][min_sale_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_min_sale_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_max_sale_qty] + false + + + true + 0 + = + true + product[stock_data][is_qty_decimal] + false + + + true + 0 + = + true + product[stock_data][is_decimal_divided] + false + + + true + 0 + = + true + product[stock_data][backorders] + false + + + true + 1 + = + true + product[stock_data][use_config_backorders] + false + + + true + 1 + = + true + product[stock_data][notify_stock_qty] + false + + + true + 1 + = + true + product[stock_data][use_config_notify_stock_qty] + false + + + true + 0 + = + true + product[stock_data][enable_qty_increments] + false + + + true + 0 + = + true + product[stock_data][qty_increments] + false + + + true + 1 + = + true + product[stock_data][use_config_qty_increments] + false + + + true + 1 + = + true + product[stock_data][is_in_stock] + false + + + true + + = + true + product[custom_design] + false + + + true + + = + true + product[custom_design_from] + false + + + true + + = + true + product[custom_design_to] + false + + + true + + = + true + product[custom_layout_update] + false + + + true + + = + true + product[page_layout] + false + + + true + container2 + = + true + product[options_container] + false + + + true + ${configurable_attribute_id} + = + true + product[configurable_variation] + false + + + true + ${configurable_product_name} + = + true + product[url_key] + + + true + 1 + = + true + product[use_config_gift_message_available] + + + true + 1 + = + true + product[use_config_gift_wrapping_available] + + + true + 4 + = + true + product[visibility] + + + true + 1 + = + true + product[product_has_weight] + true + + + true + 50 + = + true + product[stock_data][qty] + false + + + true + configurable + = + true + product[stock_data][type_id] + false + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/save/id/${configurable_product_id}/back/edit/active_tab/product-details/ + POST + true + false + true + false + false + + + + + false + + + try { + int attributesCount = Integer.parseInt(vars.get("configurable_attribute_ids_matchNr")); + for (int i = 1; i <= attributesCount; i++) { + attributeId = vars.get("configurable_attribute_ids_" + i.toString()); + attributeCode = vars.get("configurable_attribute_codes_" + i.toString()); + attributeLabel = vars.get("configurable_attribute_labels_" + i.toString()); + ctx.getCurrentSampler().addArgument("attributes[" + (i - 1).toString() + "]", attributeId); + ctx.getCurrentSampler().addArgument("attribute_codes[" + (i - 1).toString() + "]", attributeCode); + ctx.getCurrentSampler().addArgument("product[" + attributeCode + "]", attributeId); + ctx.getCurrentSampler().addArgument("product[configurable_attributes_data][" + attributeId + "][attribute_id]", attributeId); + ctx.getCurrentSampler().addArgument("product[configurable_attributes_data][" + attributeId + "][position]", (i - 1).toString()); + ctx.getCurrentSampler().addArgument("product[configurable_attributes_data][" + attributeId + "][code]", attributeCode); + ctx.getCurrentSampler().addArgument("product[configurable_attributes_data][" + attributeId + "][label]", attributeLabel); + + int valuesCount = Integer.parseInt(vars.get("attribute_" + attributeId + "_values_matchNr")); + for (int j = 1; j <= valuesCount; j++) { + attributeValue = vars.get("attribute_" + attributeId + "_values_" + j.toString()); + ctx.getCurrentSampler().addArgument( + "product[configurable_attributes_data][" + attributeId + "][values][" + attributeValue + "][include]", + "1" + ); + ctx.getCurrentSampler().addArgument( + "product[configurable_attributes_data][" + attributeId + "][values][" + attributeValue + "][value_index]", + attributeValue + ); + } + } + ctx.getCurrentSampler().addArgument("associated_product_ids_serialized", vars.get("associated_products_ids").toString()); + } catch (Exception e) { + log.error("error???", e); + } + + + + + You saved the product + + Assertion.response_data + false + 2 + if have trouble see messages-message-error + + + + + + + + + + 1 + false + 1 + ${adminProductCreationPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Admin Create Product"); + + true + + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + mpaf/tool/fragments/ce/admin_login/admin_retrieve_form_key.jmx + + + + + mpaf/tool/fragments/ce/admin_create_product/get_related_product_id.jmx + import org.apache.jmeter.samplers.SampleResult; +import java.util.Random; +Random random = new Random(); +if (${seedForRandom} > 0) { + random.setSeed(${seedForRandom}); +} +relatedIndex = random.nextInt(props.get("simple_products_list").size()); +vars.put("related_product_id", props.get("simple_products_list").get(relatedIndex).get("id")); + + + true + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + + + Content-Type + application/json + + + Accept + */* + + + mpaf/tool/fragments/ce/api/header_manager_before_token.jmx + + + + true + + + + false + {"username":"${admin_user}","password":"${admin_password}"} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/V1/integration/admin/token + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/admin_token_retrieval.jmx + + + admin_token + $ + + + BODY + + + + + ^[a-z0-9-]+$ + + Assertion.response_data + false + 1 + variable + admin_token + + + + + + + + Authorization + Bearer ${admin_token} + + + mpaf/tool/fragments/ce/api/header_manager.jmx + + + + + + + false + mysize,mycolor + = + true + searchCriteria[filterGroups][0][filters][0][value] + + + false + attribute_code + = + true + searchCriteria[filterGroups][0][filters][0][field] + + + false + in + = + true + searchCriteria[filterGroups][0][filters][0][condition_type] + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/products/attributes + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_product/get_product_attributes.jmx + + + product_attributes + $.items + + + BODY + + + + javascript + + + + +var attributesData = JSON.parse(vars.get("product_attributes")), +maxOptions = 2; + +attributes = []; +for (i in attributesData) { + if (i >= 2) { + break; + } + var data = attributesData[i], + attribute = { + "id": data.attribute_id, + "code": data.attribute_code, + "label": data.default_frontend_label, + "options": [] + }; + + var processedOptions = 0; + for (optionN in data.options) { + var option = data.options[optionN]; + if (parseInt(option.value) > 0 && processedOptions < maxOptions) { + processedOptions++; + attribute.options.push(option); + } + } + attributes.push(attribute); +} + +vars.putObject("product_attributes", attributes); + + + + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product_set/index/filter/${attribute_set_filter} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_product/configurable_setup_attribute_set.jmx + + + + false + attribute_set_id + catalog\/product_set\/edit\/id\/([\d]+)\/"[\D\d]*Attribute Set 1 + $1$ + + 1 + + + + false + + + import org.apache.commons.codec.binary.Base64; + +byte[] encodedBytes = Base64.encodeBase64("set_name=Attribute Set 1".getBytes()); +vars.put("attribute_set_filter", new String(encodedBytes)); + + + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + import org.apache.jmeter.samplers.SampleResult; +import java.util.Random; +Random random = new Random(); +if (${seedForRandom} > 0) { + random.setSeed(${seedForRandom}); +} +number = random.nextInt(props.get("simple_products_list").size()); +simpleList = props.get("simple_products_list").get(number); +vars.put("simple_product_1_id", simpleList.get("id")); +vars.put("simple_product_1_name", simpleList.get("title")); + +do { + number1 = random.nextInt(props.get("simple_products_list").size()); +} while(number == number1); +simpleList = props.get("simple_products_list").get(number1); +vars.put("simple_product_2_id", simpleList.get("id")); +vars.put("simple_product_2_name", simpleList.get("title")); + +number2 = random.nextInt(props.get("configurable_products_list").size()); +configurableList = props.get("configurable_products_list").get(number2); +vars.put("configurable_product_1_id", configurableList.get("id")); +vars.put("configurable_product_1_url_key", configurableList.get("url_key")); +vars.put("configurable_product_1_name", configurableList.get("title")); + +//Additional category to be added +//int categoryId = Integer.parseInt(vars.get("simple_product_category_id")); +//vars.put("category_additional", (categoryId+1).toString()); +//New price +vars.put("price_new", "9999"); +//New special price +vars.put("special_price_new", "8888"); +//New quantity +vars.put("quantity_new", "100600"); +vars.put("configurable_sku", "Configurable Product - ${__time(YMD)}-${__threadNum}-${__Random(1,1000000)}"); + + + + + true + mpaf/tool/fragments/ce/admin_create_product/setup.jmx + + + + mpaf/tool/fragments/ce/admin_create_product/create_bundle_product.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/ + GET + true + false + true + false + false + + + + + + records found + + Assertion.response_data + false + 2 + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/new/set/4/type/bundle/ + GET + true + false + true + false + false + + + + + + New Product + + Assertion.response_data + false + 2 + + + + + + + + true + true + = + true + ajax + false + + + true + true + = + true + isAjax + false + + + true + ${admin_form_key} + = + true + form_key + false + + + true + Bundle Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[name] + false + + + true + Bundle Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[sku] + false + + + true + 42 + = + true + product[price] + + + true + 2 + = + true + product[tax_class_id] + + + true + 111 + = + true + product[quantity_and_stock_status][qty] + + + true + 1 + = + true + product[quantity_and_stock_status][is_in_stock] + + + true + 1.0000 + = + true + product[weight] + + + true + 1 + = + true + product[product_has_weight] + true + + + true + 2 + = + true + product[category_ids][] + + + true + <p>Full bundle product description ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)}</p> + = + true + product[description] + + + true + <p>Short bundle product description ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)}</p> + = + true + product[short_description] + + + true + 1 + = + true + product[status] + + + true + + = + true + product[configurable_variations] + + + true + 1 + = + true + affect_configurable_product_attributes + + + true + + = + true + product[image] + + + true + + = + true + product[small_image] + + + true + + = + true + product[thumbnail] + + + true + bundle-product-${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[url_key] + + + true + Bundle Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Title + = + true + product[meta_title] + + + true + Bundle Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Keyword + = + true + product[meta_keyword] + + + true + Bundle Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Description + = + true + product[meta_description] + + + true + 1 + = + true + product[website_ids][] + + + true + 99 + = + true + product[special_price] + + + true + 1 + = + true + product[stock_data][notify_stock_qty] + + + true + + = + true + product[special_from_date] + + + true + + = + true + product[special_to_date] + + + true + + = + true + product[cost] + + + true + 0 + = + true + product[tier_price][0][website_id] + + + true + 32000 + = + true + product[tier_price][0][cust_group] + + + true + 100 + = + true + product[tier_price][0][price_qty] + + + true + 90 + = + true + product[tier_price][0][price] + + + true + + = + true + product[tier_price][0][delete] + + + true + 0 + = + true + product[tier_price][1][website_id] + + + true + 1 + = + true + product[tier_price][1][cust_group] + + + true + 101 + = + true + product[tier_price][1][price_qty] + + + true + 99 + = + true + product[tier_price][1][price] + + + true + + = + true + product[tier_price][1][delete] + + + true + 1 + = + true + product[stock_data][use_config_manage_stock] + + + true + 100500 + = + true + product[stock_data][original_inventory_qty] + + + true + 100500 + = + true + product[stock_data][qty] + + + true + 0 + = + true + product[stock_data][min_qty] + + + true + 1 + = + true + product[stock_data][use_config_min_qty] + + + true + 1 + = + true + product[stock_data][min_sale_qty] + + + true + 1 + = + true + product[stock_data][use_config_min_sale_qty] + + + true + 10000 + = + true + product[stock_data][max_sale_qty] + + + true + 1 + = + true + product[stock_data][use_config_max_sale_qty] + + + true + 0 + = + true + product[stock_data][is_qty_decimal] + + + true + 0 + = + true + product[stock_data][is_decimal_divided] + + + true + 0 + = + true + product[stock_data][backorders] + + + true + 1 + = + true + product[stock_data][use_config_backorders] + + + true + 1 + = + true + product[stock_data][use_config_notify_stock_qty] + + + true + 0 + = + true + product[stock_data][enable_qty_increments] + + + true + 0 + = + true + product[stock_data][qty_increments] + + + true + 1 + = + true + product[stock_data][use_config_qty_increments] + + + true + 1 + = + true + product[stock_data][is_in_stock] + + + true + + = + true + product[custom_design] + + + true + + = + true + product[custom_design_from] + + + true + + = + true + product[custom_design_to] + + + true + + = + true + product[custom_layout_update] + + + true + + = + true + product[page_layout] + + + true + container2 + = + true + product[options_container] + + + true + + = + true + new-variations-attribute-set-id + + + true + 0 + = + true + product[shipment_type] + + + true + option title one + = + true + bundle_options[bundle_options][0][title] + + + true + + = + true + bundle_options[bundle_options][0][option_id] + + + true + + = + true + bundle_options[bundle_options][0][delete] + + + true + select + = + true + bundle_options[bundle_options][0][type] + + + true + 1 + = + true + bundle_options[bundle_options][0][required] + + + true + 0 + = + true + bundle_options[bundle_options][0][position] + + + true + + = + true + bundle_options[bundle_options][0][bundle_selections][0][selection_id] + + + true + + = + true + bundle_options[bundle_options][0][bundle_selections][0][option_id] + + + true + ${simple_product_1_id} + = + true + bundle_options[bundle_options][0][bundle_selections][0][product_id] + + + true + + = + true + bundle_options[bundle_options][0][bundle_selections][0][delete] + + + true + 25 + = + true + bundle_options[bundle_options][0][bundle_selections][0][selection_price_value] + + + true + 1 + = + true + bundle_options[bundle_options][0][bundle_selections][0][selection_price_type] + + + true + 1 + = + true + bundle_options[bundle_options][0][bundle_selections][0][selection_qty] + + + true + 1 + = + true + bundle_options[bundle_options][0][bundle_selections][0][selection_can_change_qty] + + + true + 0 + = + true + bundle_options[bundle_options][0][bundle_selections][0][position] + + + true + + = + true + bundle_options[bundle_options][0][bundle_selections][1][selection_id] + + + true + + = + true + bundle_options[bundle_options][0][bundle_selections][1][option_id] + + + true + ${simple_product_2_id} + = + true + bundle_options[bundle_options][0][bundle_selections][1][product_id] + + + true + + = + true + bundle_options[bundle_options][0][bundle_selections][1][delete] + + + true + 10.99 + = + true + bundle_options[bundle_options][0][bundle_selections][1][selection_price_value] + + + true + 0 + = + true + bundle_options[bundle_options][0][bundle_selections][1][selection_price_type] + + + true + 1 + = + true + bundle_options[bundle_options][0][bundle_selections][1][selection_qty] + + + true + 1 + = + true + bundle_options[bundle_options][0][bundle_selections][1][selection_can_change_qty] + + + true + 1 + = + true + bundle_options[bundle_options][0][bundle_selections][1][position] + + + true + option title two + = + true + bundle_options[bundle_options][1][title] + + + true + + = + true + bundle_options[bundle_options][1][option_id] + + + true + + = + true + bundle_options[bundle_options][1][delete] + + + true + select + = + true + bundle_options[bundle_options][1][type] + + + true + 1 + = + true + bundle_options[bundle_options][1][required] + + + true + 1 + = + true + bundle_options[bundle_options][1][position] + + + true + + = + true + bundle_options[bundle_options][1][bundle_selections][0][selection_id] + true + + + true + + = + true + bundle_options[bundle_options][1][bundle_selections][0][option_id] + true + + + true + ${simple_product_1_id} + = + true + bundle_options[bundle_options][1][bundle_selections][0][product_id] + true + + + true + + = + true + bundle_options[bundle_options][1][bundle_selections][0][delete] + true + + + true + 5.00 + = + true + bundle_options[bundle_options][1][bundle_selections][0][selection_price_value] + true + + + true + 0 + = + true + bundle_options[bundle_options][1][bundle_selections][0][selection_price_type] + true + + + true + 1 + = + true + bundle_options[bundle_options][1][bundle_selections][0][selection_qty] + true + + + true + 1 + = + true + bundle_options[bundle_options][1][bundle_selections][0][selection_can_change_qty] + true + + + true + 0 + = + true + bundle_options[bundle_options][1][bundle_selections][0][position] + true + + + true + + = + true + bundle_options[bundle_options][1][bundle_selections][1][selection_id] + true + + + true + + = + true + bundle_options[bundle_options][1][bundle_selections][1][option_id] + true + + + true + ${simple_product_2_id} + = + true + bundle_options[bundle_options][1][bundle_selections][1][product_id] + true + + + true + + = + true + bundle_options[bundle_options][1][bundle_selections][1][delete] + true + + + true + 7.00 + = + true + bundle_options[bundle_options][1][bundle_selections][1][selection_price_value] + true + + + true + 0 + = + true + bundle_options[bundle_options][1][bundle_selections][1][selection_price_type] + true + + + true + 1 + = + true + bundle_options[bundle_options][1][bundle_selections][1][selection_qty] + true + + + true + 1 + = + true + bundle_options[bundle_options][1][bundle_selections][1][selection_can_change_qty] + true + + + true + 1 + = + true + bundle_options[bundle_options][1][bundle_selections][1][position] + true + + + true + 2 + = + true + affect_bundle_product_selections + true + + + true + ${related_product_id} + = + true + links[related][0][id] + + + true + 1 + = + true + links[related][0][position] + + + true + ${related_product_id} + = + true + links[upsell][0][id] + + + true + 1 + = + true + links[upsell][0][position] + + + true + ${related_product_id} + = + true + links[crosssell][0][id] + + + true + 1 + = + true + links[crosssell][0][position] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/validate/set/4/ + POST + true + false + true + false + false + + + + + + {"error":false} + + Assertion.response_data + false + 2 + + + + + + + + true + true + = + true + ajax + false + + + true + true + = + true + isAjax + false + + + true + ${admin_form_key} + = + true + form_key + false + + + true + Bundle Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[name] + false + + + true + Bundle Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[sku] + false + + + true + 42 + = + true + product[price] + + + true + 2 + = + true + product[tax_class_id] + + + true + 111 + = + true + product[quantity_and_stock_status][qty] + + + true + 1 + = + true + product[quantity_and_stock_status][is_in_stock] + + + true + 1.0000 + = + true + product[weight] + + + true + 1 + = + true + product[product_has_weight] + true + + + true + 2 + = + true + product[category_ids][] + + + true + <p>Full bundle product Description ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)}</p> + = + true + product[description] + + + true + <p>Short bundle product description ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)}</p> + = + true + product[short_description] + + + true + 1 + = + true + product[status] + + + true + + = + true + product[configurable_variations] + + + true + 1 + = + true + affect_configurable_product_attributes + + + true + + = + true + product[image] + + + true + + = + true + product[small_image] + + + true + + = + true + product[thumbnail] + + + true + bundle-product-${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[url_key] + + + true + Bundle Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Title + = + true + product[meta_title] + + + true + Bundle Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Keyword + = + true + product[meta_keyword] + + + true + Bundle Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Description + = + true + product[meta_description] + + + true + 1 + = + true + product[website_ids][] + + + true + 99 + = + true + product[special_price] + + + true + + = + true + product[special_from_date] + + + true + + = + true + product[special_to_date] + + + true + + = + true + product[cost] + + + true + 0 + = + true + product[tier_price][0][website_id] + + + true + 32000 + = + true + product[tier_price][0][cust_group] + + + true + 100 + = + true + product[tier_price][0][price_qty] + + + true + 90 + = + true + product[tier_price][0][price] + + + true + + = + true + product[tier_price][0][delete] + + + true + 0 + = + true + product[tier_price][1][website_id] + + + true + 1 + = + true + product[tier_price][1][cust_group] + + + true + 101 + = + true + product[tier_price][1][price_qty] + + + true + 99 + = + true + product[tier_price][1][price] + + + true + + = + true + product[tier_price][1][delete] + + + true + 1 + = + true + product[stock_data][use_config_manage_stock] + + + true + 100500 + = + true + product[stock_data][original_inventory_qty] + + + true + 100500 + = + true + product[stock_data][qty] + + + true + 0 + = + true + product[stock_data][min_qty] + + + true + 1 + = + true + product[stock_data][use_config_min_qty] + + + true + 1 + = + true + product[stock_data][min_sale_qty] + + + true + 1 + = + true + product[stock_data][use_config_min_sale_qty] + + + true + 10000 + = + true + product[stock_data][max_sale_qty] + + + true + 1 + = + true + product[stock_data][use_config_max_sale_qty] + + + true + 0 + = + true + product[stock_data][is_qty_decimal] + + + true + 0 + = + true + product[stock_data][is_decimal_divided] + + + true + 0 + = + true + product[stock_data][backorders] + + + true + 1 + = + true + product[stock_data][use_config_backorders] + + + true + 1 + = + true + product[stock_data][notify_stock_qty] + + + true + 1 + = + true + product[stock_data][use_config_notify_stock_qty] + + + true + 0 + = + true + product[stock_data][enable_qty_increments] + + + true + 0 + = + true + product[stock_data][qty_increments] + + + true + 1 + = + true + product[stock_data][use_config_qty_increments] + + + true + 1 + = + true + product[stock_data][is_in_stock] + + + true + + = + true + product[custom_design] + + + true + + = + true + product[custom_design_from] + + + true + + = + true + product[custom_design_to] + + + true + + = + true + product[custom_layout_update] + + + true + + = + true + product[page_layout] + + + true + container2 + = + true + product[options_container] + + + true + + = + true + new-variations-attribute-set-id + + + true + 0 + = + true + product[shipment_type] + false + + + true + option title one + = + true + bundle_options[bundle_options][0][title] + false + + + true + + = + true + bundle_options[bundle_options][0][option_id] + false + + + true + + = + true + bundle_options[bundle_options][0][delete] + false + + + true + select + = + true + bundle_options[bundle_options][0][type] + false + + + true + 1 + = + true + bundle_options[bundle_options][0][required] + false + + + true + 0 + = + true + bundle_options[bundle_options][0][position] + false + + + true + + = + true + bundle_options[bundle_options][0][bundle_selections][0][selection_id] + false + + + true + + = + true + bundle_options[bundle_options][0][bundle_selections][0][option_id] + false + + + true + ${simple_product_1_id} + = + true + bundle_options[bundle_options][0][bundle_selections][0][product_id] + false + + + true + + = + true + bundle_options[bundle_options][0][bundle_selections][0][delete] + false + + + true + 25 + = + true + bundle_options[bundle_options][0][bundle_selections][0][selection_price_value] + false + + + true + 1 + = + true + bundle_options[bundle_options][0][bundle_selections][0][selection_price_type] + false + + + true + 1 + = + true + bundle_options[bundle_options][0][bundle_selections][0][selection_qty] + false + + + true + 1 + = + true + bundle_options[bundle_options][0][bundle_selections][0][selection_can_change_qty] + false + + + true + 0 + = + true + bundle_options[bundle_options][0][bundle_selections][0][position] + false + + + true + + = + true + bundle_options[bundle_options][0][bundle_selections][1][selection_id] + false + + + true + + = + true + bundle_options[bundle_options][0][bundle_selections][1][option_id] + false + + + true + ${simple_product_2_id} + = + true + bundle_options[bundle_options][0][bundle_selections][1][product_id] + false + + + true + + = + true + bundle_options[bundle_options][0][bundle_selections][1][delete] + false + + + true + 10.99 + = + true + bundle_options[bundle_options][0][bundle_selections][1][selection_price_value] + false + + + true + 0 + = + true + bundle_options[bundle_options][0][bundle_selections][1][selection_price_type] + false + + + true + 1 + = + true + bundle_options[bundle_options][0][bundle_selections][1][selection_qty] + false + + + true + 1 + = + true + bundle_options[bundle_options][0][bundle_selections][1][selection_can_change_qty] + false + + + true + 1 + = + true + bundle_options[bundle_options][0][bundle_selections][1][position] + false + + + true + option title two + = + true + bundle_options[bundle_options][1][title] + false + + + true + + = + true + bundle_options[bundle_options][1][option_id] + false + + + true + + = + true + bundle_options[bundle_options][1][delete] + false + + + true + select + = + true + bundle_options[bundle_options][1][type] + false + + + true + 1 + = + true + bundle_options[bundle_options][1][required] + false + + + true + 1 + = + true + bundle_options[bundle_options][1][position] + false + + + true + + = + true + bundle_options[bundle_options][1][bundle_selections][0][selection_id] + false + + + true + + = + true + bundle_options[bundle_options][1][bundle_selections][0][option_id] + false + + + true + ${simple_product_1_id} + = + true + bundle_options[bundle_options][1][bundle_selections][0][product_id] + false + + + true + + = + true + bundle_options[bundle_options][1][bundle_selections][0][delete] + false + + + true + 5.00 + = + true + bundle_options[bundle_options][1][bundle_selections][0][selection_price_value] + false + + + true + 0 + = + true + bundle_options[bundle_options][1][bundle_selections][0][selection_price_type] + false + + + true + 1 + = + true + bundle_options[bundle_options][1][bundle_selections][0][selection_qty] + false + + + true + 1 + = + true + bundle_options[bundle_options][1][bundle_selections][0][selection_can_change_qty] + false + + + true + 0 + = + true + bundle_options[bundle_options][1][bundle_selections][0][position] + false + + + true + + = + true + bundle_options[bundle_options][1][bundle_selections][1][selection_id] + false + + + true + + = + true + bundle_options[bundle_options][1][bundle_selections][1][option_id] + false + + + true + ${simple_product_2_id} + = + true + bundle_options[bundle_options][1][bundle_selections][1][product_id] + false + + + true + + = + true + bundle_options[bundle_options][1][bundle_selections][1][delete] + false + + + true + 7.00 + = + true + bundle_options[bundle_options][1][bundle_selections][1][selection_price_value] + false + + + true + 0 + = + true + bundle_options[bundle_options][1][bundle_selections][1][selection_price_type] + false + + + true + 1 + = + true + bundle_options[bundle_options][1][bundle_selections][1][selection_qty] + false + + + true + 1 + = + true + bundle_options[bundle_options][1][bundle_selections][1][selection_can_change_qty] + false + + + true + 1 + = + true + bundle_options[bundle_options][1][bundle_selections][1][position] + false + + + true + 2 + = + true + affect_bundle_product_selections + false + + + true + ${related_product_id} + = + true + links[related][0][id] + + + true + 1 + = + true + links[related][0][position] + + + true + ${related_product_id} + = + true + links[upsell][0][id] + + + true + 1 + = + true + links[upsell][0][position] + + + true + ${related_product_id} + = + true + links[crosssell][0][id] + + + true + 1 + = + true + links[crosssell][0][position] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/save/set/4/type/bundle/back/edit/active_tab/product-details/ + POST + true + false + true + false + false + + + + + + You saved the product + option title one + option title two + ${simple_product_2_name} + ${simple_product_1_name} + + + Assertion.response_data + false + 2 + + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_product/open_catalog_grid.jmx + + + + records found + + Assertion.response_data + false + 2 + + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/new/set/${attribute_set_id}/type/configurable/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_product/new_configurable.jmx + + + + New Product + + Assertion.response_data + false + 2 + + + + + + + + + true + true + = + true + ajax + false + + + true + true + = + true + isAjax + false + + + true + 1 + = + true + affect_configurable_product_attributes + true + + + true + ${admin_form_key} + = + true + form_key + true + + + true + ${attribute_set_id} + = + true + new-variations-attribute-set-id + true + + + true + 1 + = + true + product[affect_product_custom_options] + true + + + true + ${attribute_set_id} + = + true + product[attribute_set_id] + true + + + true + 4 + = + true + product[category_ids][0] + true + + + true + + = + true + product[custom_layout_update] + true + + + true + + = + true + product[description] + true + + + true + 0 + = + true + product[gift_message_available] + true + + + true + 1 + = + true + product[gift_wrapping_available] + true + + + true + + = + true + product[gift_wrapping_price] + true + + + true + + = + true + product[image] + true + + + true + 2 + = + true + product[is_returnable] + true + + + true + ${configurable_sku} - Meta Description + = + true + product[meta_description] + true + + + true + ${configurable_sku} - Meta Keyword + = + true + product[meta_keyword] + true + + + true + ${configurable_sku} - Meta Title + = + true + product[meta_title] + true + + + true + ${configurable_sku} + = + true + product[name] + true + + + true + container2 + = + true + product[options_container] + true + + + true + ${price_new} + = + true + product[price] + true + + + true + 1 + = + true + product[product_has_weight] + true + + + true + 1 + = + true + product[quantity_and_stock_status][is_in_stock] + true + + + true + 1000 + = + true + product[quantity_and_stock_status][qty] + true + + + true + + = + true + product[short_description] + true + + + true + ${configurable_sku} + = + true + product[sku] + true + + + true + + = + true + product[small_image] + true + + + true + ${special_price_new} + = + true + product[special_price] + true + + + true + 1 + = + true + product[status] + true + + + true + 0 + = + true + product[stock_data][backorders] + true + + + true + 1 + = + true + product[stock_data][deferred_stock_update] + true + + + true + 0 + = + true + product[stock_data][enable_qty_increments] + true + + + true + 0 + = + true + product[stock_data][is_decimal_divided] + true + + + true + 0 + = + true + product[stock_data][is_qty_decimal] + true + + + true + 1 + = + true + product[stock_data][manage_stock] + true + + + true + 10000 + = + true + product[stock_data][max_sale_qty] + true + + + true + 0 + = + true + product[stock_data][min_qty] + true + + + true + 1 + = + true + product[stock_data][min_sale_qty] + true + + + true + 1 + = + true + product[stock_data][notify_stock_qty] + true + + + true + 1 + = + true + product[stock_data][qty_increments] + true + + + true + 1 + = + true + product[stock_data][use_config_backorders] + true + + + true + 1 + = + true + product[stock_data][use_config_deferred_stock_update] + true + + + true + 1 + = + true + product[stock_data][use_config_enable_qty_increments] + true + + + true + 1 + = + true + product[stock_data][use_config_manage_stock] + true + + + true + 1 + = + true + product[stock_data][use_config_max_sale_qty] + true + + + true + 1 + = + true + product[stock_data][use_config_min_qty] + true + + + true + 1 + = + true + product[stock_data][use_config_min_sale_qty] + true + + + true + 1 + = + true + product[stock_data][use_config_notify_stock_qty] + true + + + true + 1 + = + true + product[stock_data][use_config_qty_increments] + true + + + true + 2 + = + true + product[tax_class_id] + true + + + true + + = + true + product[thumbnail] + true + + + true + + = + true + product[url_key] + true + + + true + 1 + = + true + product[use_config_gift_message_available] + true + + + true + 1 + = + true + product[use_config_gift_wrapping_available] + true + + + true + 1 + = + true + product[use_config_is_returnable] + true + + + true + 4 + = + true + product[visibility] + true + + + true + 1 + = + true + product[website_ids][1] + true + + + true + ${related_product_id} + = + true + links[related][0][id] + + + true + 1 + = + true + links[related][0][position] + + + true + ${related_product_id} + = + true + links[upsell][0][id] + + + true + 1 + = + true + links[upsell][0][position] + + + true + ${related_product_id} + = + true + links[crosssell][0][id] + + + true + 1 + = + true + links[crosssell][0][position] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/validate/set/${attribute_set_id}/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_product/configurable_validate.jmx + + + + {"error":false} + + Assertion.response_data + false + 2 + + + + + javascript + + + + +attributes = vars.getObject("product_attributes"); + +for (i in attributes) { + var attribute = attributes[i]; + sampler.addArgument("attribute_codes[" + i + "]", attribute.code); + sampler.addArgument("attributes[" + i + "]", attribute.id); + sampler.addArgument("product[" + attribute.code + "]", attribute.options[0].value); + addConfigurableAttributeData(attribute); +} + +addConfigurableMatrix(attributes); + +function addConfigurableAttributeData(attribute) { + var attributeId = attribute.id; + + sampler.addArgument("product[configurable_attributes_data][" + attributeId + "][attribute_id]", attributeId); + sampler.addArgument("product[configurable_attributes_data][" + attributeId + "][code]", attribute.code); + sampler.addArgument("product[configurable_attributes_data][" + attributeId + "][label]", attribute.label); + sampler.addArgument("product[configurable_attributes_data][" + attributeId + "][position]", 0); + attribute.options.forEach(function (option, index) { + sampler.addArgument("product[configurable_attributes_data][" + attributeId + "][values][" + option.value + "][include]", index); + sampler.addArgument("product[configurable_attributes_data][" + attributeId + "][values][" + option.value + "][value_index]", option.value); + }); +} + +/** + * Build 4 simple products for Configurable + */ +function addConfigurableMatrix(attributes) { + + var attribute1 = attributes[0], + attribute2 = attributes[1], + productIndex = 1, + products = []; + var variationNames = []; + attribute1.options.forEach(function (option1) { + attribute2.options.forEach(function (option2) { + var productAttributes = {}, + namePart = option1.label + "+" + option2.label, + variationKey = option1.value + "-" + option2.value; + productAttributes[attribute1.code] = option1.value; + productAttributes[attribute2.code] = option2.value; + + variationNames.push(namePart + " - " + vars.get("configurable_sku")); + var product = { + "id": null, + "name": namePart + " - " + vars.get("configurable_sku"), + "sku": namePart + " - " + vars.get("configurable_sku"), + "status": 1, + "price": "100", + "price_currency": "$", + "price_string": "$100", + "weight": "6", + "qty": "50", + "variationKey": variationKey, + "configurable_attribute": JSON.stringify(productAttributes), + "thumbnail_image": "", + "media_gallery": {"images": {}}, + "image": [], + "was_changed": true, + "canEdit": 1, + "newProduct": 1, + "record_id": productIndex + }; + productIndex++; + products.push(product); + }); + }); + + sampler.addArgument("product[configurable-matrix-serialized]", JSON.stringify(products)); + vars.putObject("configurable_variations_assertion", variationNames); +} + + mpaf/tool/fragments/ce/admin_create_product/configurable_prepare_data.jmx + + + + + + + + true + true + = + true + ajax + false + + + true + true + = + true + isAjax + false + + + true + 1 + = + true + affect_configurable_product_attributes + true + + + true + ${admin_form_key} + = + true + form_key + true + + + true + ${attribute_set_id} + = + true + new-variations-attribute-set-id + true + + + true + 1 + = + true + product[affect_product_custom_options] + true + + + true + ${attribute_set_id} + = + true + product[attribute_set_id] + true + + + true + 4 + = + true + product[category_ids][0] + true + + + true + + = + true + product[custom_layout_update] + true + + + true + + = + true + product[description] + true + + + true + 0 + = + true + product[gift_message_available] + true + + + true + 1 + = + true + product[gift_wrapping_available] + true + + + true + + = + true + product[gift_wrapping_price] + true + + + true + + = + true + product[image] + true + + + true + 2 + = + true + product[is_returnable] + true + + + true + ${configurable_sku} - Meta Description + = + true + product[meta_description] + true + + + true + ${configurable_sku} - Meta Keyword + = + true + product[meta_keyword] + true + + + true + ${configurable_sku} - Meta Title + = + true + product[meta_title] + true + + + true + ${configurable_sku} + = + true + product[name] + true + + + true + container2 + = + true + product[options_container] + true + + + true + ${price_new} + = + true + product[price] + true + + + true + 1 + = + true + product[product_has_weight] + true + + + true + 1 + = + true + product[quantity_and_stock_status][is_in_stock] + true + + + true + 1000 + = + true + product[quantity_and_stock_status][qty] + true + + + true + + = + true + product[short_description] + true + + + true + ${configurable_sku} + = + true + product[sku] + true + + + true + + = + true + product[small_image] + true + + + true + ${special_price_new} + = + true + product[special_price] + true + + + true + 1 + = + true + product[status] + true + + + true + 0 + = + true + product[stock_data][backorders] + true + + + true + 1 + = + true + product[stock_data][deferred_stock_update] + true + + + true + 0 + = + true + product[stock_data][enable_qty_increments] + true + + + true + 0 + = + true + product[stock_data][is_decimal_divided] + true + + + true + 0 + = + true + product[stock_data][is_qty_decimal] + true + + + true + 1 + = + true + product[stock_data][manage_stock] + true + + + true + 10000 + = + true + product[stock_data][max_sale_qty] + true + + + true + 0 + = + true + product[stock_data][min_qty] + true + + + true + 1 + = + true + product[stock_data][min_sale_qty] + true + + + true + 1 + = + true + product[stock_data][notify_stock_qty] + true + + + true + 1 + = + true + product[stock_data][qty_increments] + true + + + true + 1 + = + true + product[stock_data][use_config_backorders] + true + + + true + 1 + = + true + product[stock_data][use_config_deferred_stock_update] + true + + + true + 1 + = + true + product[stock_data][use_config_enable_qty_increments] + true + + + true + 1 + = + true + product[stock_data][use_config_manage_stock] + true + + + true + 1 + = + true + product[stock_data][use_config_max_sale_qty] + true + + + true + 1 + = + true + product[stock_data][use_config_min_qty] + true + + + true + 1 + = + true + product[stock_data][use_config_min_sale_qty] + true + + + true + 1 + = + true + product[stock_data][use_config_notify_stock_qty] + true + + + true + 1 + = + true + product[stock_data][use_config_qty_increments] + true + + + true + 2 + = + true + product[tax_class_id] + true + + + true + + = + true + product[thumbnail] + true + + + true + + = + true + product[url_key] + true + + + true + 1 + = + true + product[use_config_gift_message_available] + true + + + true + 1 + = + true + product[use_config_gift_wrapping_available] + true + + + true + 1 + = + true + product[use_config_is_returnable] + true + + + true + 4 + = + true + product[visibility] + true + + + true + 1 + = + true + product[website_ids][1] + true + + + true + ${related_product_id} + = + true + links[related][0][id] + + + true + 1 + = + true + links[related][0][position] + + + true + ${related_product_id} + = + true + links[upsell][0][id] + + + true + 1 + = + true + links[upsell][0][position] + + + true + ${related_product_id} + = + true + links[crosssell][0][id] + + + true + 1 + = + true + links[crosssell][0][position] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/save/set/${attribute_set_id}/type/configurable/back/edit/active_tab/product-details/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_product/configurable_save.jmx + + + + You saved the product + + Assertion.response_data + false + 2 + + + + javascript + + + + +var configurableVariations = vars.getObject("configurable_variations_assertion"), +response = SampleResult.getResponseDataAsString(); + +configurableVariations.forEach(function (variation) { + if (response.indexOf(variation) == -1) { + AssertionResult.setFailureMessage("Cannot find variation \"" + variation + "\""); + AssertionResult.setFailure(true); + } +}); + + + + + + javascript + + + + +attributes = vars.getObject("product_attributes"); + +for (i in attributes) { + var attribute = attributes[i]; + sampler.addArgument("attribute_codes[" + i + "]", attribute.code); + sampler.addArgument("attributes[" + i + "]", attribute.id); + sampler.addArgument("product[" + attribute.code + "]", attribute.options[0].value); + addConfigurableAttributeData(attribute); +} + +addConfigurableMatrix(attributes); + +function addConfigurableAttributeData(attribute) { + var attributeId = attribute.id; + + sampler.addArgument("product[configurable_attributes_data][" + attributeId + "][attribute_id]", attributeId); + sampler.addArgument("product[configurable_attributes_data][" + attributeId + "][code]", attribute.code); + sampler.addArgument("product[configurable_attributes_data][" + attributeId + "][label]", attribute.label); + sampler.addArgument("product[configurable_attributes_data][" + attributeId + "][position]", 0); + attribute.options.forEach(function (option, index) { + sampler.addArgument("product[configurable_attributes_data][" + attributeId + "][values][" + option.value + "][include]", index); + sampler.addArgument("product[configurable_attributes_data][" + attributeId + "][values][" + option.value + "][value_index]", option.value); + }); +} + +/** + * Build 4 simple products for Configurable + */ +function addConfigurableMatrix(attributes) { + + var attribute1 = attributes[0], + attribute2 = attributes[1], + productIndex = 1, + products = []; + var variationNames = []; + attribute1.options.forEach(function (option1) { + attribute2.options.forEach(function (option2) { + var productAttributes = {}, + namePart = option1.label + "+" + option2.label, + variationKey = option1.value + "-" + option2.value; + productAttributes[attribute1.code] = option1.value; + productAttributes[attribute2.code] = option2.value; + + variationNames.push(namePart + " - " + vars.get("configurable_sku")); + var product = { + "id": null, + "name": namePart + " - " + vars.get("configurable_sku"), + "sku": namePart + " - " + vars.get("configurable_sku"), + "status": 1, + "price": "100", + "price_currency": "$", + "price_string": "$100", + "weight": "6", + "qty": "50", + "variationKey": variationKey, + "configurable_attribute": JSON.stringify(productAttributes), + "thumbnail_image": "", + "media_gallery": {"images": {}}, + "image": [], + "was_changed": true, + "canEdit": 1, + "newProduct": 1, + "record_id": productIndex + }; + productIndex++; + products.push(product); + }); + }); + + sampler.addArgument("product[configurable-matrix-serialized]", JSON.stringify(products)); + vars.putObject("configurable_variations_assertion", variationNames); +} + + mpaf/tool/fragments/ce/admin_create_product/configurable_prepare_data.jmx + + + + + + mpaf/tool/fragments/ce/admin_create_product/create_downloadable_product.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/ + GET + true + false + true + false + false + + + + + + records found + + Assertion.response_data + false + 2 + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/new/set/4/type/downloadable/ + GET + true + false + true + false + false + + + + + + New Product + + Assertion.response_data + false + 2 + + + + + + + + ${files_folder}downloadable_original.txt + links + text/plain + + + + + + + true + ${admin_form_key} + = + true + form_key + false + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/downloadable_file/upload/type/links/?isAjax=true + POST + false + false + true + true + false + + + + + original_file + $.file + + + BODY + + + + + + + + ${files_folder}downloadable_sample.txt + samples + text/plain + + + + + + + true + ${admin_form_key} + = + true + form_key + false + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/downloadable_file/upload/type/samples/?isAjax=true + POST + false + false + true + true + false + + + + + sample_file + $.file + + + BODY + + + + + + + + true + true + = + true + ajax + false + + + true + true + = + true + isAjax + false + + + true + ${admin_form_key} + = + true + form_key + false + + + true + Downloadable Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[name] + false + + + true + SKU ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[sku] + false + + + true + 123 + = + true + product[price] + + + true + 2 + = + true + product[tax_class_id] + + + true + 111 + = + true + product[quantity_and_stock_status][qty] + + + true + 1 + = + true + product[quantity_and_stock_status][is_in_stock] + + + true + 1.0000 + = + true + product[weight] + + + true + 2 + = + true + product[category_ids][] + + + true + <p>Full downloadable product description ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)}</p> + = + true + product[description] + + + true + <p>Short downloadable product description ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)}</p> + = + true + product[short_description] + + + true + 1 + = + true + product[status] + + + true + + = + true + product[image] + + + true + + = + true + product[small_image] + + + true + + = + true + product[thumbnail] + + + true + downloadable-product-${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[url_key] + + + true + Downloadable Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Title + = + true + product[meta_title] + + + true + Downloadable Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Keyword + = + true + product[meta_keyword] + + + true + Downloadable Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Description + = + true + product[meta_description] + + + true + 1 + = + true + product[website_ids][] + + + true + 99 + = + true + product[special_price] + + + true + 1 + = + true + product[stock_data][notify_stock_qty] + + + true + + = + true + product[special_from_date] + + + true + + = + true + product[special_to_date] + + + true + + = + true + product[cost] + + + true + 0 + = + true + product[tier_price][0][website_id] + + + true + 32000 + = + true + product[tier_price][0][cust_group] + + + true + 100 + = + true + product[tier_price][0][price_qty] + + + true + 90 + = + true + product[tier_price][0][price] + + + true + + = + true + product[tier_price][0][delete] + + + true + 0 + = + true + product[tier_price][1][website_id] + + + true + 1 + = + true + product[tier_price][1][cust_group] + + + true + 101 + = + true + product[tier_price][1][price_qty] + + + true + 99 + = + true + product[tier_price][1][price] + + + true + + = + true + product[tier_price][1][delete] + + + true + 1 + = + true + product[stock_data][use_config_manage_stock] + + + true + 100500 + = + true + product[stock_data][original_inventory_qty] + + + true + 100500 + = + true + product[stock_data][qty] + + + true + 0 + = + true + product[stock_data][min_qty] + + + true + 1 + = + true + product[stock_data][use_config_min_qty] + + + true + 1 + = + true + product[stock_data][min_sale_qty] + + + true + 1 + = + true + product[stock_data][use_config_min_sale_qty] + + + true + 10000 + = + true + product[stock_data][max_sale_qty] + + + true + 1 + = + true + product[stock_data][use_config_max_sale_qty] + + + true + 0 + = + true + product[stock_data][is_qty_decimal] + + + true + 0 + = + true + product[stock_data][is_decimal_divided] + + + true + 0 + = + true + product[stock_data][backorders] + + + true + 1 + = + true + product[stock_data][use_config_backorders] + + + true + 1 + = + true + product[stock_data][use_config_notify_stock_qty] + + + true + 0 + = + true + product[stock_data][enable_qty_increments] + + + true + 0 + = + true + product[stock_data][qty_increments] + + + true + 1 + = + true + product[stock_data][use_config_qty_increments] + + + true + 1 + = + true + product[stock_data][is_in_stock] + + + true + + = + true + product[custom_design] + + + true + + = + true + product[custom_design_from] + + + true + + = + true + product[custom_design_to] + + + true + + = + true + product[custom_layout_update] + + + true + + = + true + product[page_layout] + + + true + container2 + = + true + product[options_container] + + + true + on + = + true + is_downloadable + + + true + Links + = + true + product[links_title] + + + true + 0 + = + true + product[links_purchased_separately] + + + true + ${original_file} + = + true + downloadable[link][0][file][0][file] + false + + + true + downloadable_original.txt + = + true + downloadable[link][0][file][0][name] + false + + + true + 13 + = + true + downloadable[link][0][file][0][size] + false + + + true + new + = + true + downloadable[link][0][file][0][status] + false + + + true + 1 + = + true + downloadable[link][0][is_shareable] + + + true + 0 + = + true + downloadable[link][0][is_unlimited] + + + true + + = + true + downloadable[link][0][link_url] + + + true + 0 + = + true + downloadable[link][0][number_of_downloads] + true + + + true + 120 + = + true + downloadable[link][0][price] + true + + + true + 0 + = + true + downloadable[link][0][record_id] + true + + + true + file + = + true + downloadable[link][0][sample][type] + + + true + + = + true + downloadable[link][0][sample][url] + + + true + 1 + = + true + downloadable[link][0][sort_order] + + + true + Original Link + = + true + downloadable[link][0][title] + + + true + file + = + true + downloadable[link][0][type] + + + true + ${sample_file} + = + true + downloadable[sample][0][file][0][file] + true + + + true + downloadable_sample.txt + = + true + downloadable[sample][0][file][0][name] + true + + + true + 14 + = + true + downloadable[sample][0][file][0][size] + true + + + true + new + = + true + downloadable[sample][0][file][0][status] + true + + + true + 0 + = + true + downloadable[sample][0][record_id] + true + + + true + + = + true + downloadable[sample][0][sample_url] + true + + + true + 1 + = + true + downloadable[sample][0][sort_order] + true + + + true + Sample Link + = + true + downloadable[sample][0][title] + true + + + true + file + = + true + downloadable[sample][0][type] + true + + + true + 1 + = + true + affect_configurable_product_attributes + false + + + true + 4 + = + true + new-variations-attribute-set-id + false + + + true + + = + true + product[configurable_variation] + false + + + true + ${related_product_id} + = + true + links[related][0][id] + + + true + 1 + = + true + links[related][0][position] + + + true + ${related_product_id} + = + true + links[upsell][0][id] + + + true + 1 + = + true + links[upsell][0][position] + + + true + ${related_product_id} + = + true + links[crosssell][0][id] + + + true + 1 + = + true + links[crosssell][0][position] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/validate/set/4/type/downloadable/ + POST + true + false + true + false + false + + + + + + {"error":false} + + Assertion.response_data + false + 2 + + + + + + + + true + true + = + true + ajax + false + + + true + true + = + true + isAjax + false + + + true + ${admin_form_key} + = + true + form_key + false + + + true + Downloadable Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[name] + false + + + true + SKU ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[sku] + false + + + true + 123 + = + true + product[price] + + + true + 2 + = + true + product[tax_class_id] + + + true + 111 + = + true + product[quantity_and_stock_status][qty] + + + true + 1 + = + true + product[quantity_and_stock_status][is_in_stock] + + + true + 1.0000 + = + true + product[weight] + + + true + 2 + = + true + product[category_ids][] + + + true + <p>Full downloadable product description ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)}</p> + = + true + product[description] + + + true + <p>Short downloadable product description ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)}</p> + = + true + product[short_description] + false + + + true + 1 + = + true + product[status] + + + true + + = + true + product[image] + + + true + + = + true + product[small_image] + + + true + + = + true + product[thumbnail] + + + true + downloadable-product-${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[url_key] + + + true + Downloadable Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Title + = + true + product[meta_title] + + + true + Downloadable Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Keyword + = + true + product[meta_keyword] + + + true + Downloadable Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Description + = + true + product[meta_description] + + + true + 1 + = + true + product[website_ids][] + + + true + 99 + = + true + product[special_price] + + + true + + = + true + product[special_from_date] + + + true + + = + true + product[special_to_date] + + + true + + = + true + product[cost] + + + true + 0 + = + true + product[tier_price][0][website_id] + + + true + 32000 + = + true + product[tier_price][0][cust_group] + + + true + 100 + = + true + product[tier_price][0][price_qty] + + + true + 90 + = + true + product[tier_price][0][price] + + + true + + = + true + product[tier_price][0][delete] + + + true + 0 + = + true + product[tier_price][1][website_id] + + + true + 1 + = + true + product[tier_price][1][cust_group] + + + true + 101 + = + true + product[tier_price][1][price_qty] + + + true + 99 + = + true + product[tier_price][1][price] + + + true + + = + true + product[tier_price][1][delete] + + + true + 1 + = + true + product[stock_data][use_config_manage_stock] + + + true + 100500 + = + true + product[stock_data][original_inventory_qty] + + + true + 100500 + = + true + product[stock_data][qty] + + + true + 0 + = + true + product[stock_data][min_qty] + + + true + 1 + = + true + product[stock_data][use_config_min_qty] + + + true + 1 + = + true + product[stock_data][min_sale_qty] + + + true + 1 + = + true + product[stock_data][use_config_min_sale_qty] + + + true + 10000 + = + true + product[stock_data][max_sale_qty] + + + true + 1 + = + true + product[stock_data][use_config_max_sale_qty] + + + true + 0 + = + true + product[stock_data][is_qty_decimal] + + + true + 0 + = + true + product[stock_data][is_decimal_divided] + + + true + 0 + = + true + product[stock_data][backorders] + + + true + 1 + = + true + product[stock_data][use_config_backorders] + + + true + 1 + = + true + product[stock_data][notify_stock_qty] + + + true + 1 + = + true + product[stock_data][use_config_notify_stock_qty] + + + true + 0 + = + true + product[stock_data][enable_qty_increments] + + + true + 0 + = + true + product[stock_data][qty_increments] + + + true + 1 + = + true + product[stock_data][use_config_qty_increments] + + + true + 1 + = + true + product[stock_data][is_in_stock] + + + true + + = + true + product[custom_design] + + + true + + = + true + product[custom_design_from] + + + true + + = + true + product[custom_design_to] + + + true + + = + true + product[custom_layout_update] + + + true + + = + true + product[page_layout] + + + true + container2 + = + true + product[options_container] + + + true + ${original_file} + = + true + downloadable[link][0][file][0][file] + false + + + true + downloadable_original.txt + = + true + downloadable[link][0][file][0][name] + false + + + true + 13 + = + true + downloadable[link][0][file][0][size] + false + + + true + new + = + true + downloadable[link][0][file][0][status] + false + + + true + 1 + = + true + downloadable[link][0][is_shareable] + true + + + true + 0 + = + true + downloadable[link][0][is_unlimited] + true + + + true + + = + true + downloadable[link][0][link_url] + true + + + true + 0 + = + true + downloadable[link][0][number_of_downloads] + false + + + true + 120 + = + true + downloadable[link][0][price] + false + + + true + 0 + = + true + downloadable[link][0][record_id] + false + + + true + file + = + true + downloadable[link][0][sample][type] + true + + + true + + = + true + downloadable[link][0][sample][url] + true + + + true + 1 + = + true + downloadable[link][0][sort_order] + true + + + true + Original Link + = + true + downloadable[link][0][title] + true + + + true + file + = + true + downloadable[link][0][type] + true + + + true + ${sample_file} + = + true + downloadable[sample][0][file][0][file] + true + + + true + downloadable_sample.txt + = + true + downloadable[sample][0][file][0][name] + true + + + true + 14 + = + true + downloadable[sample][0][file][0][size] + true + + + true + new + = + true + downloadable[sample][0][file][0][status] + true + + + true + 0 + = + true + downloadable[sample][0][record_id] + true + + + true + + = + true + downloadable[sample][0][sample_url] + true + + + true + 1 + = + true + downloadable[sample][0][sort_order] + true + + + true + Sample Link + = + true + downloadable[sample][0][title] + true + + + true + file + = + true + downloadable[sample][0][type] + true + + + true + 1 + = + true + affect_configurable_product_attributes + false + + + true + 4 + = + true + new-variations-attribute-set-id + false + + + true + + = + true + product[configurable_variation] + false + + + true + ${related_product_id} + = + true + links[related][0][id] + + + true + 1 + = + true + links[related][0][position] + + + true + ${related_product_id} + = + true + links[upsell][0][id] + + + true + 1 + = + true + links[upsell][0][position] + + + true + ${related_product_id} + = + true + links[crosssell][0][id] + + + true + 1 + = + true + links[crosssell][0][position] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/save/set/4/type/downloadable/back/edit/active_tab/product-details/ + POST + true + false + true + false + false + + + + + + You saved the product + + Assertion.response_data + false + 2 + + + + + violation + + Assertion.response_data + false + 6 + + + + + + + mpaf/tool/fragments/ce/admin_create_product/create_simple_product.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/ + GET + true + false + true + false + false + + + + + + records found + + Assertion.response_data + false + 2 + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/new/set/4/type/simple/ + GET + true + false + true + false + false + + + + + + New Product + + Assertion.response_data + false + 2 + + + + + + + + true + true + = + true + ajax + false + + + true + true + = + true + isAjax + false + + + true + ${admin_form_key} + = + true + form_key + false + + + true + Simple Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[name] + false + + + true + SKU ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[sku] + false + + + true + 123 + = + true + product[price] + + + true + 2 + = + true + product[tax_class_id] + + + true + 111 + = + true + product[quantity_and_stock_status][qty] + + + true + 1 + = + true + product[quantity_and_stock_status][is_in_stock] + + + true + 1.0000 + = + true + product[weight] + + + true + 1 + = + true + product[product_has_weight] + true + + + true + 2 + = + true + product[category_ids][] + + + true + <p>Full simple product description ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)}</p> + = + true + product[description] + + + true + <p>Short simple product description ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)}</p> + = + true + product[short_description] + + + true + 1 + = + true + product[status] + + + true + + = + true + product[image] + + + true + + = + true + product[small_image] + + + true + + = + true + product[thumbnail] + + + true + simple-product-${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[url_key] + + + true + Simple Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Title + = + true + product[meta_title] + + + true + Simple Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Keyword + = + true + product[meta_keyword] + + + true + Simple Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Description + = + true + product[meta_description] + + + true + 1 + = + true + product[website_ids][] + + + true + 99 + = + true + product[special_price] + + + true + 1 + = + true + product[stock_data][notify_stock_qty] + + + true + + = + true + product[special_from_date] + + + true + + = + true + product[special_to_date] + + + true + + = + true + product[cost] + + + true + 0 + = + true + product[tier_price][0][website_id] + + + true + 32000 + = + true + product[tier_price][0][cust_group] + + + true + 100 + = + true + product[tier_price][0][price_qty] + + + true + 90 + = + true + product[tier_price][0][price] + + + true + + = + true + product[tier_price][0][delete] + + + true + 0 + = + true + product[tier_price][1][website_id] + + + true + 1 + = + true + product[tier_price][1][cust_group] + + + true + 101 + = + true + product[tier_price][1][price_qty] + + + true + 99 + = + true + product[tier_price][1][price] + + + true + + = + true + product[tier_price][1][delete] + + + true + 1 + = + true + product[stock_data][use_config_manage_stock] + + + true + 100500 + = + true + product[stock_data][original_inventory_qty] + + + true + 100500 + = + true + product[stock_data][qty] + + + true + 0 + = + true + product[stock_data][min_qty] + + + true + 1 + = + true + product[stock_data][use_config_min_qty] + + + true + 1 + = + true + product[stock_data][min_sale_qty] + + + true + 1 + = + true + product[stock_data][use_config_min_sale_qty] + + + true + 10000 + = + true + product[stock_data][max_sale_qty] + + + true + 1 + = + true + product[stock_data][use_config_max_sale_qty] + + + true + 0 + = + true + product[stock_data][is_qty_decimal] + + + true + 0 + = + true + product[stock_data][is_decimal_divided] + + + true + 0 + = + true + product[stock_data][backorders] + + + true + 1 + = + true + product[stock_data][use_config_backorders] + + + true + 1 + = + true + product[stock_data][use_config_notify_stock_qty] + + + true + 0 + = + true + product[stock_data][enable_qty_increments] + + + true + 0 + = + true + product[stock_data][qty_increments] + + + true + 1 + = + true + product[stock_data][use_config_qty_increments] + + + true + 1 + = + true + product[stock_data][is_in_stock] + + + true + + = + true + product[custom_design] + + + true + + = + true + product[custom_design_from] + + + true + + = + true + product[custom_design_to] + + + true + + = + true + product[custom_layout_update] + + + true + + = + true + product[page_layout] + + + true + container2 + = + true + product[options_container] + + + true + + = + true + product[options][1][is_delete] + false + + + true + 1 + = + true + product[options][1][is_require] + false + + + true + select + = + true + product[options][1][previous_group] + false + + + true + drop_down + = + true + product[options][1][previous_type] + false + + + true + 0 + = + true + product[options][1][sort_order] + false + + + true + Product Option Title One + = + true + product[options][1][title] + false + + + true + drop_down + = + true + product[options][1][type] + false + + + true + + = + true + product[options][1][values][1][is_delete] + false + + + true + 200 + = + true + product[options][1][values][1][price] + false + + + true + fixed + = + true + product[options][1][values][1][price_type] + false + + + true + sku-one + = + true + product[options][1][values][1][sku] + false + + + true + 0 + = + true + product[options][1][values][1][sort_order] + false + + + true + Row Title + = + true + product[options][1][values][1][title] + false + + + true + + = + true + product[options][2][is_delete] + false + + + true + 1 + = + true + product[options][2][is_require] + false + + + true + 250 + = + true + product[options][2][max_characters] + false + + + true + text + = + true + product[options][2][previous_group] + false + + + true + field + = + true + product[options][2][previous_type] + false + + + true + 500 + = + true + product[options][2][price] + false + + + true + fixed + = + true + product[options][2][price_type] + false + + + true + sku-two + = + true + product[options][2][sku] + false + + + true + 1 + = + true + product[options][2][sort_order] + false + + + true + Field Title + = + true + product[options][2][title] + false + + + true + field + = + true + product[options][2][type] + false + + + true + 1 + = + true + affect_configurable_product_attributes + true + + + true + 4 + = + true + new-variations-attribute-set-id + true + + + true + + = + true + product[configurable_variation] + true + + + true + ${related_product_id} + = + true + links[related][0][id] + + + true + 1 + = + true + links[related][0][position] + + + true + ${related_product_id} + = + true + links[upsell][0][id] + + + true + 1 + = + true + links[upsell][0][position] + + + true + ${related_product_id} + = + true + links[crosssell][0][id] + + + true + 1 + = + true + links[crosssell][0][position] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/validate/set/4/ + POST + true + false + true + false + false + + + + + + {"error":false} + + Assertion.response_data + false + 2 + + + + + + + + true + true + = + true + ajax + false + + + true + true + = + true + isAjax + false + + + true + ${admin_form_key} + = + true + form_key + false + + + true + Simple Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[name] + false + + + true + SKU ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[sku] + false + + + true + 123 + = + true + product[price] + + + true + 2 + = + true + product[tax_class_id] + + + true + 111 + = + true + product[quantity_and_stock_status][qty] + + + true + 1 + = + true + product[quantity_and_stock_status][is_in_stock] + + + true + 1.0000 + = + true + product[weight] + + + true + 1 + = + true + product[product_has_weight] + true + + + true + 2 + = + true + product[category_ids][] + + + true + <p>Full simple product Description ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)}</p> + = + true + product[description] + + + true + <p>Short simple product description ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)}</p> + = + true + product[short_description] + + + true + 1 + = + true + product[status] + + + true + + = + true + product[image] + + + true + + = + true + product[small_image] + + + true + + = + true + product[thumbnail] + + + true + simple-product-${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + product[url_key] + + + true + Simple Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Title + = + true + product[meta_title] + + + true + Simple Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Keyword + = + true + product[meta_keyword] + + + true + Simple Product ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} Meta Description + = + true + product[meta_description] + + + true + 1 + = + true + product[website_ids][] + + + true + 99 + = + true + product[special_price] + + + true + + = + true + product[special_from_date] + + + true + + = + true + product[special_to_date] + + + true + + = + true + product[cost] + + + true + 0 + = + true + product[tier_price][0][website_id] + + + true + 32000 + = + true + product[tier_price][0][cust_group] + + + true + 100 + = + true + product[tier_price][0][price_qty] + + + true + 90 + = + true + product[tier_price][0][price] + + + true + + = + true + product[tier_price][0][delete] + + + true + 0 + = + true + product[tier_price][1][website_id] + + + true + 1 + = + true + product[tier_price][1][cust_group] + + + true + 101 + = + true + product[tier_price][1][price_qty] + + + true + 99 + = + true + product[tier_price][1][price] + + + true + + = + true + product[tier_price][1][delete] + + + true + 1 + = + true + product[stock_data][use_config_manage_stock] + + + true + 100500 + = + true + product[stock_data][original_inventory_qty] + + + true + 100500 + = + true + product[stock_data][qty] + + + true + 0 + = + true + product[stock_data][min_qty] + + + true + 1 + = + true + product[stock_data][use_config_min_qty] + + + true + 1 + = + true + product[stock_data][min_sale_qty] + + + true + 1 + = + true + product[stock_data][use_config_min_sale_qty] + + + true + 10000 + = + true + product[stock_data][max_sale_qty] + + + true + 1 + = + true + product[stock_data][use_config_max_sale_qty] + + + true + 0 + = + true + product[stock_data][is_qty_decimal] + + + true + 0 + = + true + product[stock_data][is_decimal_divided] + + + true + 0 + = + true + product[stock_data][backorders] + + + true + 1 + = + true + product[stock_data][use_config_backorders] + + + true + 1 + = + true + product[stock_data][notify_stock_qty] + + + true + 1 + = + true + product[stock_data][use_config_notify_stock_qty] + + + true + 0 + = + true + product[stock_data][enable_qty_increments] + + + true + 0 + = + true + product[stock_data][qty_increments] + + + true + 1 + = + true + product[stock_data][use_config_qty_increments] + + + true + 1 + = + true + product[stock_data][is_in_stock] + + + true + + = + true + product[custom_design] + + + true + + = + true + product[custom_design_from] + + + true + + = + true + product[custom_design_to] + + + true + + = + true + product[custom_layout_update] + + + true + + = + true + product[page_layout] + + + true + container2 + = + true + product[options_container] + + + true + + = + true + product[options][1][is_delete] + true + + + true + 1 + = + true + product[options][1][is_require] + + + true + select + = + true + product[options][1][previous_group] + false + + + true + drop_down + = + true + product[options][1][previous_type] + false + + + true + 0 + = + true + product[options][1][sort_order] + false + + + true + Product Option Title One + = + true + product[options][1][title] + + + true + drop_down + = + true + product[options][1][type] + + + true + + = + true + product[options][1][values][1][is_delete] + false + + + true + 200 + = + true + product[options][1][values][1][price] + + + true + fixed + = + true + product[options][1][values][1][price_type] + + + true + sku-one + = + true + product[options][1][values][1][sku] + + + true + 0 + = + true + product[options][1][values][1][sort_order] + + + true + Row Title + = + true + product[options][1][values][1][title] + + + true + + = + true + product[options][2][is_delete] + false + + + true + 1 + = + true + product[options][2][is_require] + + + true + 250 + = + true + product[options][2][max_characters] + + + true + text + = + true + product[options][2][previous_group] + + + true + field + = + true + product[options][2][previous_type] + + + true + 500 + = + true + product[options][2][price] + + + true + fixed + = + true + product[options][2][price_type] + + + true + sku-two + = + true + product[options][2][sku] + + + true + 1 + = + true + product[options][2][sort_order] + + + true + Field Title + = + true + product[options][2][title] + + + true + field + = + true + product[options][2][type] + + + true + 1 + = + true + affect_configurable_product_attributes + true + + + true + 4 + = + true + new-variations-attribute-set-id + true + + + true + + = + true + product[configurable_variation] + true + + + true + ${related_product_id} + = + true + links[related][0][id] + + + true + 1 + = + true + links[related][0][position] + + + true + ${related_product_id} + = + true + links[upsell][0][id] + + + true + 1 + = + true + links[upsell][0][position] + + + true + ${related_product_id} + = + true + links[crosssell][0][id] + + + true + 1 + = + true + links[crosssell][0][position] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product/save/set/4/type/simple/back/edit/active_tab/product-details/ + POST + true + false + true + false + false + + + + + + You saved the product + + Assertion.response_data + false + 2 + + + + + violation + + Assertion.response_data + false + 6 + + + + + + + + + + 1 + false + 1 + ${adminCategoryManagementPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Admin Category Management"); + + true + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + mpaf/tool/fragments/ce/admin_login/admin_retrieve_form_key.jmx + + + + + mpaf/tool/fragments/ce/setup/setup_admin_category_management.jmx + + + + props.remove("admin_category_ids_list"); + + + false + + + + + + + + Content-Type + application/json + + + Accept + */* + + + + + + true + + + + false + {"username":"${admin_user}","password":"${admin_password}"} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/V1/integration/admin/token + POST + true + false + true + false + false + + + + + admin_token + $ + + + BODY + + + + + ^[a-z0-9-]+$ + + Assertion.response_data + false + 1 + variable + admin_token + + + + + + + Authorization + Bearer ${admin_token} + + + + + + + + + true + children_count + = + true + searchCriteria[filterGroups][0][filters][0][field] + + + true + 0 + = + true + searchCriteria[filterGroups][0][filters][0][value] + + + true + level + = + true + searchCriteria[filterGroups][1][filters][0][field] + + + true + 2 + = + true + searchCriteria[filterGroups][1][filters][0][value] + + + true + gt + = + true + searchCriteria[filterGroups][1][filters][0][conditionType] + + + true + ${adminCategoryCount} + = + true + searchCriteria[pageSize] + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/categories + GET + true + false + true + false + false + + + + + false + category_list_id + \{\"id\":(\d+), + $1$ + + -1 + + + + + category_list_id + category_id + true + + + + import java.util.ArrayList; + + adminCategoryIdsList = props.get("admin_category_ids_list"); + // If it is first iteration of cycle then recreate categories ids list + if (adminCategoryIdsList == null) { + adminCategoryIdsList = new ArrayList(); + props.put("admin_category_ids_list", adminCategoryIdsList); + } + adminCategoryIdsList.add(vars.get("category_id")); + + + false + + + + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + + + mpaf/tool/fragments/ce/admin_category_management/admin_category_management.jmx + import org.apache.jmeter.samplers.SampleResult; +import java.util.ArrayList; +import java.util.Random; +Random random = new Random(); +if (${seedForRandom} > 0) { +random.setSeed(${seedForRandom}); +} +number = random.nextInt(props.get("simple_products_list").size()); +simpleList = props.get("simple_products_list").get(number); +vars.put("simple_product_1_url_key", simpleList.get("url_key")); +vars.put("simple_product_1_name", simpleList.get("title")); +vars.put("simple_product_1_id", simpleList.get("id")); + +do { +number1 = random.nextInt(props.get("simple_products_list").size()); +} while(number == number1); +simpleList = props.get("simple_products_list").get(number1); +vars.put("simple_product_2_url_key", simpleList.get("url_key")); +vars.put("simple_product_2_name", simpleList.get("title")); +vars.put("simple_product_2_id", simpleList.get("id")); + +do { +number2 = random.nextInt(props.get("simple_products_list").size()); +} while(number2 == number1 || number2 == number); +simpleList = props.get("simple_products_list").get(number2); +vars.put("simple_product_3_url_key", simpleList.get("url_key")); +vars.put("simple_product_3_name", simpleList.get("title")); +vars.put("simple_product_3_id", simpleList.get("id")); + +do { +number3 = random.nextInt(props.get("simple_products_list").size()); +} while(number3 == number2 || number3 == number1 || number3 == number); +simpleList = props.get("simple_products_list").get(number3); +vars.put("simple_product_4_url_key", simpleList.get("url_key")); +vars.put("simple_product_4_name", simpleList.get("title")); +vars.put("simple_product_4_id", simpleList.get("id")); + +do { +number4 = random.nextInt(props.get("simple_products_list").size()); +} while(number4 == number3 || number4 == number2 || number4 == number1 || number4 == number); +simpleList = props.get("simple_products_list").get(number4); +vars.put("simple_product_5_url_key", simpleList.get("url_key")); +vars.put("simple_product_5_name", simpleList.get("title")); +vars.put("simple_product_5_id", simpleList.get("id")); + +categoryIndex = random.nextInt(props.get("admin_category_ids_list").size()); +vars.put("parent_category_id", props.get("admin_category_ids_list").get(categoryIndex)); +do { +categoryIndexNew = random.nextInt(props.get("admin_category_ids_list").size()); +} while(categoryIndex == categoryIndexNew); +vars.put("new_parent_category_id", props.get("admin_category_ids_list").get(categoryIndexNew)); + + + true + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/category/ + GET + true + false + true + false + false + + + + + + + Accept-Language + en-US,en;q=0.5 + + + Accept + text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 + + + User-Agent + Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 + + + Accept-Encoding + gzip, deflate + + + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/category/edit/id/${parent_category_id}/ + GET + true + false + true + false + false + + + + + + + Accept-Language + en-US,en;q=0.5 + + + Accept + text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 + + + User-Agent + Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 + + + Accept-Encoding + gzip, deflate + + + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/category/add/store/0/parent/${parent_category_id} + GET + true + false + true + false + false + + + + + + <title>New Category + + Assertion.response_data + false + 2 + + + + + + + + true + + = + true + id + + + true + ${parent_category_id} + = + true + parent + + + true + + = + true + path + + + true + + = + true + store_id + + + true + 0 + = + true + is_active + + + true + 0 + = + true + include_in_menu + + + true + 1 + = + true + is_anchor + + + true + true + = + true + use_config[available_sort_by] + + + true + true + = + true + use_config[default_sort_by] + + + true + true + = + true + use_config[filter_price_range] + + + true + false + = + true + use_default[url_key] + + + true + 0 + = + true + url_key_create_redirect + + + true + 0 + = + true + custom_use_parent_settings + + + true + 0 + = + true + custom_apply_to_products + + + true + Admin Category Management ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + name + + + true + admin-category-management-${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + url_key + + + true + + = + true + meta_title + + + true + + = + true + description + + + true + PRODUCTS + = + true + display_mode + + + true + position + = + true + default_sort_by + + + true + + = + true + meta_keywords + + + true + + = + true + meta_description + + + true + + = + true + custom_layout_update + + + false + {"${simple_product_1_id}":"","${simple_product_2_id}":"","${simple_product_3_id}":"","${simple_product_4_id}":"","${simple_product_5_id}":""} + = + true + category_products + + + true + ${admin_form_key} + = + true + form_key + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/category/save/ + POST + true + false + true + false + false + + + + + URL + admin_category_id + /catalog/category/edit/id/(\d+)/ + $1$ + + 1 + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_category_id + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/category/edit/id/${admin_category_id}/ + GET + true + false + true + false + false + + + + + + + Accept-Language + en-US,en;q=0.5 + + + Accept + text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 + + + User-Agent + Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 + + + Accept-Encoding + gzip, deflate + + + + + + false + admin_category_entity_id + "entity_id":"([^"]+)" + $1$ + + 1 + + + + false + admin_category_attribute_set_id + "attribute_set_id":"([^"]+)" + $1$ + + 1 + + + + false + admin_category_parent_id + "parent_id":"([^"]+)" + $1$ + + 1 + + + + false + admin_category_created_at + "created_at":"([^"]+)" + $1$ + + 1 + + + + false + admin_category_updated_at + "updated_at":"([^"]+)" + $1$ + + 1 + + + + false + admin_category_path + "entity_id":(.+)"path":"([^\"]+)" + $2$ + + 1 + + + + false + admin_category_level + "level":"([^"]+)" + $1$ + + 1 + + + + false + admin_category_name + "entity_id":(.+)"name":"([^"]+)" + $2$ + + 1 + + + + false + admin_category_url_key + "url_key":"([^"]+)" + $1$ + + 1 + + + + false + admin_category_url_path + "url_path":"([^"]+)" + $1$ + + 1 + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_category_entity_id + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_category_attribute_set_id + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_category_parent_id + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_category_created_at + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_category_updated_at + + + + + ^[\d\\\/]+$ + + Assertion.response_data + false + 1 + variable + admin_category_path + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_category_level + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_category_name + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_category_url_key + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_category_url_path + + + + + ${simple_product_1_name} + ${simple_product_2_name} + ${simple_product_3_name} + ${simple_product_4_name} + ${simple_product_5_name} + + Assertion.response_data + false + 2 + + + + + + + + true + ${admin_category_id} + = + true + id + + + true + ${admin_form_key} + = + true + form_key + + + true + append + = + true + point + + + true + ${new_parent_category_id} + = + true + pid + + + true + ${parent_category_id} + = + true + paid + + + true + 0 + = + true + aid + + + true + true + = + true + isAjax + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/category/move/ + POST + true + false + true + false + false + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/category/delete/id/${admin_category_id}/ + GET + true + false + true + false + false + + + + + + You deleted the category. + + Assertion.response_data + false + 2 + + + + + 1 + 0 + ${__javaScript(Math.round(${adminCategoryManagementDelay}*1000))} + + + + + + + + + 1 + false + 1 + ${adminPromotionRulesPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Admin Promotion Rules"); + + true + + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + mpaf/tool/fragments/ce/admin_login/admin_retrieve_form_key.jmx + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + mpaf/tool/fragments/ce/admin_promotions_management/admin_promotions_management.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales_rule/promo_quote/ + GET + true + false + true + false + false + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales_rule/promo_quote/new + GET + true + false + true + false + false + + + + + + + + true + true + = + true + isAjax + + + true + ${admin_form_key} + = + true + form_key + true + + + true + 1--1 + = + true + id + + + true + Magento\SalesRule\Model\Rule\Condition\Address|base_subtotal + = + true + type + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales_rule/promo_quote/newConditionHtml/form/sales_rule_formrule_conditions_fieldset_/form_namespace/sales_rule_form + POST + true + false + true + false + false + + + + + + + + true + Rule Name ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + name + + + true + 0 + = + true + is_active + + + true + 0 + = + true + use_auto_generation + + + true + 1 + = + true + is_rss + + + true + 0 + = + true + apply_to_shipping + + + true + 0 + = + true + stop_rules_processing + + + true + + = + true + coupon_code + + + true + + = + true + uses_per_coupon + + + true + + = + true + uses_per_customer + + + true + + = + true + sort_order + + + true + 5 + = + true + discount_amount + + + true + 0 + = + true + discount_qty + + + true + + = + true + discount_step + + + true + + = + true + reward_points_delta + + + true + + = + true + store_labels[0] + + + true + Rule Description ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + description + + + true + 1 + = + true + coupon_type + + + true + cart_fixed + = + true + simple_action + + + true + 1 + = + true + website_ids[0] + + + true + 0 + = + true + customer_group_ids[0] + + + true + + = + true + from_date + + + true + + = + true + to_date + + + true + Magento\SalesRule\Model\Rule\Condition\Combine + = + true + rule[conditions][1][type] + + + true + all + = + true + rule[conditions][1][aggregator] + + + true + 1 + = + true + rule[conditions][1][value] + + + true + Magento\SalesRule\Model\Rule\Condition\Address + = + true + rule[conditions][1--1][type] + + + true + base_subtotal + = + true + rule[conditions][1--1][attribute] + + + true + >= + = + true + rule[conditions][1--1][operator] + + + true + 100 + = + true + rule[conditions][1--1][value] + + + true + + = + true + rule[conditions][1][new_chlid] + + + true + Magento\SalesRule\Model\Rule\Condition\Product\Combine + = + true + rule[actions][1][type] + + + true + all + = + true + rule[actions][1][aggregator] + + + true + 1 + = + true + rule[actions][1][value] + + + true + + = + true + rule[actions][1][new_child] + + + true + + = + true + store_labels[1] + + + true + + = + true + store_labels[2] + + + true + + = + true + related_banners + + + true + ${admin_form_key} + = + true + form_key + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales_rule/promo_quote/save/ + POST + true + false + true + false + false + + + + + + You saved the rule. + + Assertion.response_data + false + 16 + + + + + 1 + 0 + ${__javaScript(Math.round(${adminPromotionsManagementDelay}*1000))} + + + + + + + + + 1 + false + 1 + ${adminEditOrderPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Admin Edit Order"); + + true + + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + mpaf/tool/fragments/ce/admin_login/admin_retrieve_form_key.jmx + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_process_returns/orders_page.jmx + + + + Create New Order + + Assertion.response_data + false + 2 + + + + + + + + + true + sales_order_grid + = + true + namespace + + + true + + = + true + search + + + true + true + = + true + filters[placeholder] + + + true + 200 + = + true + paging[pageSize] + + + true + 1 + = + true + paging[current] + + + true + increment_id + = + true + sorting[field] + + + true + desc + = + true + sorting[direction] + + + true + true + = + true + isAjax + + + true + ${admin_form_key} + = + true + form_key + false + + + true + pending + = + true + filters[status] + true + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_process_returns/open_orders.jmx + + + + totalRecords + + Assertion.response_data + false + 2 + + + + + + + + + true + ${admin_form_key} + = + true + form_key + + + true + sales_order_grid + = + true + namespace + true + + + true + + = + true + search + true + + + true + true + = + true + filters[placeholder] + true + + + true + 200 + = + true + paging[pageSize] + true + + + true + 1 + = + true + paging[current] + true + + + true + increment_id + = + true + sorting[field] + true + + + true + asc + = + true + sorting[direction] + true + + + true + true + = + true + isAjax + true + + + true + pending + = + true + filters[status] + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_process_returns/search_orders.jmx + + + + totalRecords + + Assertion.response_data + false + 2 + + + + false + order_numbers + \"increment_id\":\"(\d+)\"\, + $1$ + + -1 + simple_products + + + + false + order_ids + \"entity_id\":\"(\d+)\"\, + $1$ + + -1 + simple_products + + + + + + mpaf/tool/fragments/ce/admin_create_process_returns/setup.jmx + + import java.util.ArrayList; + import java.util.HashMap; + import org.apache.jmeter.protocol.http.util.Base64Encoder; + import java.util.Random; + + // get count of "order_numbers" variable defined in "Search Pending Orders Limit" + int ordersCount = Integer.parseInt(vars.get("order_numbers_matchNr")); + + + int clusterLength; + int threadsNumber = ctx.getThreadGroup().getNumThreads(); + if (threadsNumber == 0) { + //Number of orders for one thread + clusterLength = ordersCount; + } else { + clusterLength = Math.round(ordersCount / threadsNumber); + if (clusterLength == 0) { + clusterLength = 1; + } + } + + //Current thread number starts from 0 + int currentThreadNum = ctx.getThreadNum(); + + //Index of the current product from the cluster + Random random = new Random(); + int iterator = random.nextInt(clusterLength); + if (iterator == 0) { + iterator = 1; + } + + int i = clusterLength * currentThreadNum + iterator; + + orderNumber = vars.get("order_numbers_" + i.toString()); + orderId = vars.get("order_ids_" + i.toString()); + vars.put("order_number", orderNumber); + vars.put("order_id", orderId); + + + + + false + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order/view/order_id/${order_id}/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_process_returns/open_order.jmx + + + + #${order_number} + + Assertion.response_data + false + 2 + + + + false + order_status + <span id="order_status">([^<]+)</span> + $1$ + + 1 + simple_products + + + + + + "${order_status}" == "Pending" + false + mpaf/tool/fragments/ce/admin_edit_order/if_controller.jmx + + + + + + true + pending + = + true + history[status] + false + + + true + Some text + = + true + history[comment] + + + true + ${admin_form_key} + = + true + form_key + false + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order/addComment/order_id/${order_id}/?isAjax=true + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_edit_order/add_comment.jmx + + + + Not Notified + + Assertion.response_data + false + 2 + + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order_invoice/start/order_id/${order_id}/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_process_returns/invoice_start.jmx + + + + Invoice Totals + + Assertion.response_data + false + 2 + + + + false + item_ids + <div id="order_item_(\d+)_title"\s*class="product-title"> + $1$ + + -1 + simple_products + + + + + + + + + true + ${admin_form_key} + = + true + form_key + false + + + true + 1 + = + true + invoice[items][${item_ids_1}] + + + true + 1 + = + true + invoice[items][${item_ids_2}] + + + true + Invoiced + = + true + invoice[comment_text] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order_invoice/save/order_id/${order_id}/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_process_returns/invoice_submit.jmx + + + + The invoice has been created + + Assertion.response_data + false + 2 + + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/order_shipment/start/order_id/${order_id}/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_edit_order/shipment_start.jmx + + + + New Shipment + + Assertion.response_data + false + 2 + + + + + + + + + true + ${admin_form_key} + = + true + form_key + false + + + true + 1 + = + true + shipment[items][${item_ids_1}] + + + true + 1 + = + true + shipment[items][${item_ids_2}] + + + true + Shipped + = + true + shipment[comment_text] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/order_shipment/save/order_id/${order_id}/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_edit_order/shipment_submit.jmx + + + + The shipment has been created + + Assertion.response_data + false + 2 + + + + + + + + + + 1 + false + 1 + ${adminCustomerManagementPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Admin Customer Management"); + + true + + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + mpaf/tool/fragments/ce/admin_login/admin_retrieve_form_key.jmx + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + mpaf/tool/fragments/ce/admin_customer_management/admin_customer_management.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/customer/index + GET + true + false + true + false + false + + + + + + + Accept-Language + en-US,en;q=0.5 + + + Accept + text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 + + + User-Agent + Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 + + + Accept-Encoding + gzip, deflate + + + + + + + + + + true + customer_listing + = + true + namespace + + + true + + = + true + search + + + true + true + = + true + filters[placeholder] + + + true + 20 + = + true + paging[pageSize] + + + true + 1 + = + true + paging[current] + + + true + entity_id + = + true + sorting[field] + + + true + asc + = + true + sorting[direction] + + + true + true + = + true + isAjax + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + + + + + + X-Requested-With + XMLHttpRequest + + + + + + + + + + true + customer_listing + = + true + namespace + + + true + Lastname + = + true + search + + + true + true + = + true + filters[placeholder] + + + true + 20 + = + true + paging[pageSize] + + + true + 1 + = + true + paging[current] + + + true + entity_id + = + true + sorting[field] + + + true + asc + = + true + sorting[direction] + + + true + true + = + true + isAjax + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + + + + + + X-Requested-With + XMLHttpRequest + + + + + + false + customer_edit_url_path + actions":\{"edit":\{"href":"(?:http|https):\\/\\/(.*?)\\/customer\\/index\\/edit\\/id\\/(\d+)\\/", + /customer/index/edit/id/$2$/ + + 0 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + customer_edit_url_path + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}${customer_edit_url_path} + GET + true + false + true + false + false + + + + + + Customer Information + + Assertion.response_data + false + 2 + + + + false + admin_customer_entity_id + "entity_id":"(\d+)" + $1$ + + 1 + + + + false + admin_customer_website_id + "website_id":"(\d+)" + $1$ + + 1 + + + + false + admin_customer_firstname + "firstname":"([^"]+)" + $1$ + + 1 + + + + false + admin_customer_lastname + "lastname":"([^"]+)" + $1$ + + 1 + + + + false + admin_customer_email + "email":"([^\@]+@[^.]+.[^"]+)" + $1$ + + 1 + + + + false + admin_customer_group_id + "group_id":"(\d+)" + $1$ + + 1 + + + + false + admin_customer_store_id + "store_id":"(\d+)" + $1$ + + 1 + + + + false + admin_customer_created_at + "created_at":"([^"]+)" + $1$ + + 1 + + + + false + admin_customer_updated_at + "updated_at":"([^"]+)" + $1$ + + 1 + + + + false + admin_customer_is_active + "is_active":"(\d+)" + $1$ + + 1 + + + + false + admin_customer_disable_auto_group_change + "disable_auto_group_change":"(\d+)" + $1$ + + 1 + + + + false + admin_customer_created_in + "created_in":"([^"]+)" + $1$ + + 1 + + + + false + admin_customer_dob + "dob":"(\d+)-(\d+)-(\d+)" + $2$/$3$/$1$ + + 1 + + + + false + admin_customer_default_billing + "default_billing":"(\d+)" + $1$ + + 1 + + + + false + admin_customer_default_shipping + "default_shipping":"(\d+)" + $1$ + + 1 + + + + false + admin_customer_gender + "gender":"(\d+)" + $1$ + + 1 + + + + false + admin_customer_failures_num + "failures_num":"(\d+)" + $1$ + + 1 + + + + false + admin_customer_address_entity_id + "address":\{"\d+":{"entity_id":"(\d+)".+?"parent_id":"${admin_customer_entity_id}" + $1$ + + 1 + + + + false + admin_customer_address_created_at + "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"created_at":"([^"]+)" + $1$ + + 1 + + + + false + admin_customer_address_updated_at + "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"updated_at":"([^"]+)" + $1$ + + 1 + + + + false + admin_customer_address_is_active + "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"is_active":"(\d+)" + $1$ + + 1 + + + + false + admin_customer_address_city + "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"city":"([^"]+)" + $1$ + + 1 + + + + false + admin_customer_address_country_id + "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"country_id":"([^"]+)" + $1$ + + 1 + + + + false + admin_customer_address_firstname + "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"firstname":"([^"]+)" + $1$ + + 1 + + + + false + admin_customer_address_lastname + "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"lastname":"([^"]+)" + $1$ + + 1 + + + + false + admin_customer_address_postcode + "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"postcode":"([^"]+)" + $1$ + + 1 + + + + false + admin_customer_address_region + "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"region":"([^"]+)" + $1$ + + 1 + + + + false + admin_customer_address_region_id + "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"region_id":"([^"]+)" + $1$ + + 1 + + + + false + admin_customer_address_street + "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"street":\["([^"]+)"\] + $1$ + + 1 + + + + false + admin_customer_address_telephone + "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"telephone":"([^"]+)" + $1$ + + 1 + + + + false + admin_customer_address_customer_id + "address":\{"\d+":{.+?"parent_id":"${admin_customer_entity_id}".+?"customer_id":"([^"]+)" + $1$ + + 1 + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_customer_entity_id + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_customer_website_id + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_firstname + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_lastname + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_email + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_customer_group_id + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_customer_store_id + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_created_at + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_updated_at + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_customer_is_active + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_customer_disable_auto_group_change + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_created_in + + + + + ^\d+/\d+/\d+$ + + Assertion.response_data + false + 1 + variable + admin_customer_dob + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_customer_default_billing + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_customer_default_shipping + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_customer_gender + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_customer_failures_num + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_customer_address_entity_id + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_address_created_at + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_address_updated_at + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_customer_address_is_active + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_address_city + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_address_country_id + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_address_firstname + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_address_lastname + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_address_postcode + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_address_region + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_customer_address_region_id + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_address_street + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_customer_address_telephone + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + admin_customer_address_customer_id + + + + + + Accept-Language + en-US,en;q=0.5 + + + Accept + text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 + + + User-Agent + Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 + + + Accept-Encoding + gzip, deflate + + + + + + + + + + true + true + = + true + isAjax + + + true + ${admin_customer_entity_id} + = + true + customer[entity_id] + + + true + ${admin_customer_website_id} + = + true + customer[website_id] + + + true + ${admin_customer_email} + = + true + customer[email] + + + true + ${admin_customer_group_id} + = + true + customer[group_id] + + + true + ${admin_customer_store_id} + = + true + customer[store_id] + + + true + ${admin_customer_created_at} + = + true + customer[created_at] + + + true + ${admin_customer_updated_at} + = + true + customer[updated_at] + + + true + ${admin_customer_is_active} + = + true + customer[is_active] + + + true + ${admin_customer_disable_auto_group_change} + = + true + customer[disable_auto_group_change] + + + true + ${admin_customer_created_in} + = + true + customer[created_in] + + + true + + = + true + customer[prefix] + + + true + ${admin_customer_firstname} 1 + = + true + customer[firstname] + + + true + + = + true + customer[middlename] + + + true + ${admin_customer_lastname} 1 + = + true + customer[lastname] + + + true + + = + true + customer[suffix] + + + true + ${admin_customer_dob} + = + true + customer[dob] + + + true + ${admin_customer_default_billing} + = + true + customer[default_billing] + + + true + ${admin_customer_default_shipping} + = + true + customer[default_shipping] + + + true + + = + true + customer[taxvat] + + + true + ${admin_customer_gender} + = + true + customer[gender] + + + true + ${admin_customer_failures_num} + = + true + customer[failures_num] + + + true + ${admin_customer_store_id} + = + true + customer[sendemail_store_id] + + + true + ${admin_customer_address_entity_id} + = + true + address[${admin_customer_address_entity_id}][entity_id] + + + true + ${admin_customer_address_created_at} + = + true + address[${admin_customer_address_entity_id}][created_at] + + + true + ${admin_customer_address_updated_at} + = + true + address[${admin_customer_address_entity_id}][updated_at] + + + true + ${admin_customer_address_is_active} + = + true + address[${admin_customer_address_entity_id}][is_active] + + + true + ${admin_customer_address_city} + = + true + address[${admin_customer_address_entity_id}][city] + + + true + + = + true + address[${admin_customer_address_entity_id}][company] + + + true + ${admin_customer_address_country_id} + = + true + address[${admin_customer_address_entity_id}][country_id] + + + true + ${admin_customer_address_firstname} + = + true + address[${admin_customer_address_entity_id}][firstname] + + + true + ${admin_customer_address_lastname} + = + true + address[${admin_customer_address_entity_id}][lastname] + + + true + + = + true + address[${admin_customer_address_entity_id}][middlename] + + + true + ${admin_customer_address_postcode} + = + true + address[${admin_customer_address_entity_id}][postcode] + + + true + + = + true + address[${admin_customer_address_entity_id}][prefix] + + + true + ${admin_customer_address_region} + = + true + address[${admin_customer_address_entity_id}][region] + + + true + ${admin_customer_address_region_id} + = + true + address[${admin_customer_address_entity_id}][region_id] + + + true + ${admin_customer_address_street} + = + true + address[${admin_customer_address_entity_id}][street][0] + + + true + + = + true + address[${admin_customer_address_entity_id}][street][1] + + + true + + = + true + address[${admin_customer_address_entity_id}][suffix] + + + true + ${admin_customer_address_telephone} + = + true + address[${admin_customer_address_entity_id}][telephone] + + + true + + = + true + address[${admin_customer_address_entity_id}][vat_id] + + + true + ${admin_customer_address_customer_id} + = + true + address[${admin_customer_address_entity_id}][customer_id] + + + true + true + = + true + address[${admin_customer_address_entity_id}][default_billing] + + + true + true + = + true + address[${admin_customer_address_entity_id}][default_shipping] + + + true + + = + true + address[new_0][prefix] + + + true + John + = + true + address[new_0][firstname] + + + true + + = + true + address[new_0][middlename] + + + true + Doe + = + true + address[new_0][lastname] + + + true + + = + true + address[new_0][suffix] + + + true + Test Company + = + true + address[new_0][company] + + + true + Folsom + = + true + address[new_0][city] + + + true + 95630 + = + true + address[new_0][postcode] + + + true + 1234567890 + = + true + address[new_0][telephone] + + + true + + = + true + address[new_0][vat_id] + + + true + false + = + true + address[new_0][default_billing] + + + true + false + = + true + address[new_0][default_shipping] + + + true + 123 Main + = + true + address[new_0][street][0] + + + true + + = + true + address[new_0][street][1] + + + true + + = + true + address[new_0][region] + + + true + US + = + true + address[new_0][country_id] + + + true + 12 + = + true + address[new_0][region_id] + + + true + ${admin_form_key} + = + true + form_key + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/customer/index/validate/ + POST + true + false + true + false + false + + + + + + 200 + + Assertion.response_code + false + 16 + + + + + + + + true + true + = + true + isAjax + + + true + ${admin_customer_entity_id} + = + true + customer[entity_id] + + + true + ${admin_customer_website_id} + = + true + customer[website_id] + + + true + ${admin_customer_email} + = + true + customer[email] + + + true + ${admin_customer_group_id} + = + true + customer[group_id] + + + true + ${admin_customer_store_id} + = + true + customer[store_id] + + + true + ${admin_customer_created_at} + = + true + customer[created_at] + + + true + ${admin_customer_updated_at} + = + true + customer[updated_at] + + + true + ${admin_customer_is_active} + = + true + customer[is_active] + + + true + ${admin_customer_disable_auto_group_change} + = + true + customer[disable_auto_group_change] + + + true + ${admin_customer_created_in} + = + true + customer[created_in] + + + true + + = + true + customer[prefix] + + + true + ${admin_customer_firstname} 1 + = + true + customer[firstname] + + + true + + = + true + customer[middlename] + + + true + ${admin_customer_lastname} 1 + = + true + customer[lastname] + + + true + + = + true + customer[suffix] + + + true + ${admin_customer_dob} + = + true + customer[dob] + + + true + ${admin_customer_default_billing} + = + true + customer[default_billing] + + + true + ${admin_customer_default_shipping} + = + true + customer[default_shipping] + + + true + + = + true + customer[taxvat] + + + true + ${admin_customer_gender} + = + true + customer[gender] + + + true + ${admin_customer_failures_num} + = + true + customer[failures_num] + + + true + ${admin_customer_store_id} + = + true + customer[sendemail_store_id] + + + true + ${admin_customer_address_entity_id} + = + true + address[${admin_customer_address_entity_id}][entity_id] + + + + true + ${admin_customer_address_created_at} + = + true + address[${admin_customer_address_entity_id}][created_at] + + + true + ${admin_customer_address_updated_at} + = + true + address[${admin_customer_address_entity_id}][updated_at] + + + true + ${admin_customer_address_is_active} + = + true + address[${admin_customer_address_entity_id}][is_active] + + + true + ${admin_customer_address_city} + = + true + address[${admin_customer_address_entity_id}][city] + + + true + + = + true + address[${admin_customer_address_entity_id}][company] + + + true + ${admin_customer_address_country_id} + = + true + address[${admin_customer_address_entity_id}][country_id] + + + true + ${admin_customer_address_firstname} + = + true + address[${admin_customer_address_entity_id}][firstname] + + + true + ${admin_customer_address_lastname} + = + true + address[${admin_customer_address_entity_id}][lastname] + + + true + + = + true + address[${admin_customer_address_entity_id}][middlename] + + + true + ${admin_customer_address_postcode} + = + true + address[${admin_customer_address_entity_id}][postcode] + + + true + + = + true + address[${admin_customer_address_entity_id}][prefix] + + + true + ${admin_customer_address_region} + = + true + address[${admin_customer_address_entity_id}][region] + + + true + ${admin_customer_address_region_id} + = + true + address[${admin_customer_address_entity_id}][region_id] + + + true + ${admin_customer_address_street} + = + true + address[${admin_customer_address_entity_id}][street][0] + + + true + + = + true + address[${admin_customer_address_entity_id}][street][1] + + + true + + = + true + address[${admin_customer_address_entity_id}][suffix] + + + true + ${admin_customer_address_telephone} + = + true + address[${admin_customer_address_entity_id}][telephone] + + + true + + = + true + address[${admin_customer_address_entity_id}][vat_id] + + + true + ${admin_customer_address_customer_id} + = + true + address[${admin_customer_address_entity_id}][customer_id] + + + true + true + = + true + address[${admin_customer_address_entity_id}][default_billing] + + + true + true + = + true + address[${admin_customer_address_entity_id}][default_shipping] + + + true + + = + true + address[new_0][prefix] + + + true + John + = + true + address[new_0][firstname] + + + true + + = + true + address[new_0][middlename] + + + true + Doe + = + true + address[new_0][lastname] + + + true + + = + true + address[new_0][suffix] + + + true + Test Company + = + true + address[new_0][company] + + + true + Folsom + = + true + address[new_0][city] + + + true + 95630 + = + true + address[new_0][postcode] + + + true + 1234567890 + = + true + address[new_0][telephone] + + + true + + = + true + address[new_0][vat_id] + + + true + false + = + true + address[new_0][default_billing] + + + true + false + = + true + address[new_0][default_shipping] + + + true + 123 Main + = + true + address[new_0][street][0] + + + true + + = + true + address[new_0][street][1] + + + true + + = + true + address[new_0][region] + + + true + US + = + true + address[new_0][country_id] + + + true + 12 + = + true + address[new_0][region_id] + + + true + ${admin_form_key} + = + true + form_key + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/customer/index/save/ + POST + true + false + true + true + false + + + + + + You saved the customer. + + Assertion.response_data + false + 2 + + + + + 1 + 0 + ${__javaScript(Math.round(${adminCustomerManagementDelay}*1000))} + + + + + + + + + 1 + false + 1 + ${adminCMSManagementPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Admin CMS Management"); + + true + + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + mpaf/tool/fragments/ce/admin_login/admin_retrieve_form_key.jmx + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + mpaf/tool/fragments/ce/admin_cms_management/admin_cms_management.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/cms/page/ + GET + true + false + true + false + false + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/cms/page/new + GET + true + false + true + false + false + + + + + + + + true + <p>CMS Content ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)}</p> + = + true + content + + + true + + = + true + content_heading + + + true + ${admin_form_key} + = + true + form_key + + + true + + = + true + identifier + + + true + 1 + = + true + is_active + + + true + + = + true + layout_update_xml + + + true + + = + true + meta_description + + + true + + = + true + meta_keywords + + + true + + = + true + meta_title + + + false + {} + = + true + nodes_data + + + true + + = + true + node_ids + + + true + + = + true + page_id + + + true + 1column + = + true + page_layout + + + true + 0 + = + true + store_id[0] + + + true + CMS Title ${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)} + = + true + title + + + true + 0 + = + true + website_root + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/cms/page/save/ + POST + true + false + true + false + false + + + + + + You saved the page. + + Assertion.response_data + false + 16 + + + + + 1 + 0 + ${__javaScript(Math.round(${adminCMSManagementDelay}*1000))} + + + + + + + + + 1 + false + 1 + ${adminAccountManagementPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Admin Account management"); + + true + + + + + + + 30 + ${host} + / + false + 0 + true + true + + + ${form_key} + ${host} + ${base_path} + false + 0 + true + true + + + true + mpaf/tool/fragments/ce/http_cookie_manager.jmx + + + + mpaf/tool/fragments/ce/get_customer_email.jmx + import org.apache.jmeter.samplers.SampleResult; + +String siterator = vars.get("customer_emails_index"); +int iterator; +if(siterator == null){ + iterator = 0; + vars.put("customer_emails_index", "0"); +} else { + iterator = Integer.parseInt(siterator); + iterator ++; + vars.put("customer_emails_index", iterator.toString()); +} + +emails_list = props.get("customer_emails_list"); + +threadsNumber = ctx.getThreadGroup().getNumThreads(); +emailsCount = emails_list.size(); +if (threadsNumber > emailsCount) { + log.error(" There are not enough customers for this scenario."); +} else { + clusterLength = Math.round(emailsCount / threadsNumber); + threadNum = ctx.getThreadNum(); + emails_index = clusterLength * threadNum + iterator; + maxLimit = clusterLength * (threadNum + 1); + if (emails_index >= maxLimit) { + iterator = 0; + emails_index = clusterLength * threadNum + iterator; + vars.put("customer_emails_index", iterator.toString()); + } +} +vars.put("customer_email", emails_list.get(emails_index)); + + + true + + + + + + + + + + + + ${request_protocol} + + ${base_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/open_home_page.jmx + + + + <title>Home page</title> + + Assertion.response_data + false + 2 + + + + + + + + + + + + + ${request_protocol} + + ${base_path}customer/account/login/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/open_login_page.jmx + + + + <title>Customer Login</title> + + Assertion.response_data + false + 2 + + + + + + + + + true + ${form_key} + = + true + form_key + + + true + ${customer_email} + = + true + login[username] + + + true + ${customer_password} + = + true + login[password] + + + true + + = + true + send + + + + + + + + ${request_protocol} + + ${base_path}customer/account/loginPost/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/common/login.jmx + + + + <title>My Account</title> + + Assertion.response_data + false + 2 + + + + false + addressId + customer/address/edit/id/([^'"]+)/ + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + addressId + + + + + + + + true + + = + true + sections + + + true + false + = + true + update_section_id + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ + + + + + + + + ${request_protocol} + + ${base_path}customer/section/load/ + GET + true + false + true + false + false + + + + + + + + + + + + + ${request_protocol} + + ${base_path}sales/order/history/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/account_management/my_orders.jmx + + + + <title>My Orders</title> + + Assertion.response_data + false + 2 + + + + false + orderId + sales/order/view/order_id/(\d+)/ + $1$ + NOT_FOUND + 1 + + + + + + mpaf/tool/fragments/ce/account_management/if_orders.jmx + "${orderId}" != "NOT_FOUND" + false + + + + + + + + + + + ${request_protocol} + + ${base_path}sales/order/view/order_id/${orderId} + GET + true + false + true + false + false + + + + + + <title>Order # + + Assertion.response_data + false + 2 + + + + false + shipment_tab + sales/order/shipment/order_id/(\d+)..Order Shipments + $1$ + NOT_FOUND + 1 + + + + + May not have shipped + "${shipment_tab}" != "NOT_FOUND" + false + + + + + + + + + + + ${request_protocol} + + ${base_path}sales/order/shipment/order_id/${orderId} + GET + true + false + true + false + false + + + + + + Track this shipment + + Assertion.response_data + false + 2 + + + + false + popupLink + popupWindow": {"windowURL":"([^'"]+)", + $1$ + + 1 + + + + + + + + + + + + ${request_protocol} + + ${popupLink} + GET + true + false + true + false + false + + + + + + <title>Tracking Information</title> + + Assertion.response_data + false + 2 + + + + + + + + + + + + + + + ${request_protocol} + + ${base_path}downloadable/customer/products + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/account_management/my_downloadable_products.jmx + + + + <title>My Downloadable Products</title> + + Assertion.response_data + false + 2 + + + + false + orderId + sales/order/view/order_id/(\d+)/ + $1$ + NOT_FOUND + 1 + + + + false + linkId + downloadable/download/link/id/(\d+)/ + $1$ + + 1 + + + + + + mpaf/tool/fragments/ce/account_management/if_downloadables.jmx + "${orderId}" != "NOT_FOUND" + false + + + + + + + + + + + ${request_protocol} + + ${base_path}sales/order/view/order_id/${orderId} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/account_management/view_downloadable_products.jmx + + + + <title>Order # + + Assertion.response_data + false + 2 + + + + + + + + + + + + + ${request_protocol} + + ${base_path}downloadable/download/link/id/${linkId} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/account_management/download_product.jmx + + + + + + + + + + + + ${request_protocol} + + ${base_path}wishlist + GET + true + false + true + false + false + + + + + + <title>My Wish List</title> + + Assertion.response_data + false + 2 + + + + false + wishlistId + wishlist/index/update/wishlist_id/([^'"]+)/ + $1$ + + 1 + mpaf/tool/fragments/ce/account_management/my_wish_list.jmx + + + + false + buttonTitle + Update Wish List + FOUND + NOT_FOUND + 1 + + + + + + mpaf/tool/fragments/ce/account_management/if_wishlist.jmx + "${buttonTitle}" === "FOUND" + false + + + + + + + + + + + ${request_protocol} + + ${base_path}wishlist/index/share/wishlist_id/${wishlistId}/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/account_management/share_wish_list.jmx + + + + <title>Wish List Sharing</title> + + Assertion.response_data + false + 2 + + + + + + + + + true + ${form_key} + = + true + form_key + true + + + true + ${customer_email} + = + true + emails + + + true + [TEST] See my wishlist!!! + = + true + message + + + + + + + + ${request_protocol} + + ${base_path}wishlist/index/send/wishlist_id/${wishlistId}/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/account_management/send_wish_list.jmx + + + + <title>My Wish List</title> + + Assertion.response_data + false + 2 + + + + + + + + + + + + + + ${request_protocol} + + ${base_path}customer/account/logout/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/logout.jmx + + + + You are signed out. + + Assertion.response_data + false + 2 + + + + + + + + 1 + false + 1 + ${browseProductGridPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Browse Product Grid"); + + true + + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + + vars.put("gridEntityType" , "Product"); + + pagesCount = parseInt(vars.get("products_page_size")) || 20; + vars.put("grid_entity_page_size" , pagesCount); + vars.put("grid_namespace" , "product_listing"); + vars.put("grid_admin_browse_filter_text" , vars.get("admin_browse_product_filter_text")); + vars.put("grid_filter_field", "name"); + + // set sort fields and sort directions + vars.put("grid_sort_field_1", "name"); + vars.put("grid_sort_field_2", "price"); + vars.put("grid_sort_field_3", "attribute_set_id"); + vars.put("grid_sort_order_1", "asc"); + vars.put("grid_sort_order_2", "desc"); + + javascript + mpaf/tool/fragments/ce/admin_browse_products_grid/setup.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + + + + + true + ${grid_namespace} + = + true + namespace + true + + + true + + = + true + search + true + + + true + true + = + true + filters[placeholder] + true + + + true + ${grid_entity_page_size} + = + true + paging[pageSize] + true + + + true + 1 + = + true + paging[current] + true + + + true + entity_id + = + true + sorting[field] + true + + + true + asc + = + true + sorting[direction] + true + + + true + true + = + true + isAjax + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_grid_browsing/set_pages_count.jmx + + + $.totalRecords + 0 + true + false + true + + + + entity_total_records + $.totalRecords + + + BODY + + + + + + + + var pageSize = parseInt(vars.get("grid_entity_page_size")) || 20; + var totalsRecord = parseInt(vars.get("entity_total_records")); + var pageCount = Math.round(totalsRecord/pageSize); + + vars.put("grid_pages_count", pageCount); + + javascript + + + + + + + + + true + ${grid_namespace} + = + true + namespace + true + + + true + + = + true + search + true + + + true + ${grid_admin_browse_filter_text} + = + true + filters[placeholder] + true + + + true + ${grid_entity_page_size} + = + true + paging[pageSize] + true + + + true + 1 + = + true + paging[current] + true + + + true + entity_id + = + true + sorting[field] + true + + + true + asc + = + true + sorting[direction] + true + + + true + true + = + true + isAjax + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_grid_browsing/set_filtered_pages_count.jmx + + + $.totalRecords + 0 + true + false + true + true + + + + entity_total_records + $.totalRecords + + + BODY + + + + + + + var pageSize = parseInt(vars.get("grid_entity_page_size")) || 20; +var totalsRecord = parseInt(vars.get("entity_total_records")); +var pageCount = Math.round(totalsRecord/pageSize); + +vars.put("grid_pages_count_filtered", pageCount); + + javascript + + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + 1 + ${grid_pages_count} + 1 + page_number + + true + false + mpaf/tool/fragments/ce/admin_grid_browsing/select_page_number.jmx + + + + + + + true + ${grid_namespace} + = + true + namespace + true + + + true + + = + true + search + true + + + true + true + = + true + filters[placeholder] + true + + + true + ${grid_entity_page_size} + = + true + paging[pageSize] + true + + + true + ${page_number} + = + true + paging[current] + true + + + true + entity_id + = + true + sorting[field] + true + + + true + asc + = + true + sorting[direction] + true + + + true + true + = + true + isAjax + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_grid_browsing/admin_browse_grid.jmx + + + + \"totalRecords\":[^0]\d* + + Assertion.response_data + false + 2 + + + + + + 1 + ${grid_pages_count_filtered} + 1 + page_number + + true + false + mpaf/tool/fragments/ce/admin_grid_browsing/select_filtered_page_number.jmx + + + + mpaf/tool/fragments/ce/admin_grid_browsing/admin_browse_grid_sort_and_filter.jmx + + + + grid_sort_field + grid_sort_field + true + 0 + 3 + + + + grid_sort_order + grid_sort_order + true + 0 + 2 + + + + + + + true + ${grid_namespace} + = + true + namespace + false + + + true + ${grid_admin_browse_filter_text} + = + true + filters[${grid_filter_field}] + false + + + true + true + = + true + filters[placeholder] + false + + + true + ${grid_entity_page_size} + = + true + paging[pageSize] + false + + + true + ${page_number} + = + true + paging[current] + false + + + true + ${grid_sort_field} + = + true + sorting[field] + false + + + true + ${grid_sort_order} + = + true + sorting[direction] + false + + + true + true + = + true + isAjax + false + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + + + + + \"totalRecords\":[^0]\d* + + Assertion.response_data + false + 2 + + + + + + + + + + + + 1 + false + 1 + ${browseOrderGridPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Browse Order Grid"); + + true + + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + + vars.put("gridEntityType" , "Order"); + + pagesCount = parseInt(vars.get("orders_page_size")) || 20; + vars.put("grid_entity_page_size" , pagesCount); + vars.put("grid_namespace" , "sales_order_grid"); + vars.put("grid_admin_browse_filter_text" , vars.get("admin_browse_orders_filter_text")); + vars.put("grid_filter_field", "status"); + + // set sort fields and sort directions + vars.put("grid_sort_field_1", "increment_id"); + vars.put("grid_sort_field_2", "created_at"); + vars.put("grid_sort_field_3", "billing_name"); + vars.put("grid_sort_order_1", "asc"); + vars.put("grid_sort_order_2", "desc"); + + javascript + mpaf/tool/fragments/ce/admin_browse_orders_grid/setup.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + + + + + true + ${grid_namespace} + = + true + namespace + true + + + true + + = + true + search + true + + + true + true + = + true + filters[placeholder] + true + + + true + ${grid_entity_page_size} + = + true + paging[pageSize] + true + + + true + 1 + = + true + paging[current] + true + + + true + entity_id + = + true + sorting[field] + true + + + true + asc + = + true + sorting[direction] + true + + + true + true + = + true + isAjax + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_grid_browsing/set_pages_count.jmx + + + $.totalRecords + 0 + true + false + true + + + + entity_total_records + $.totalRecords + + + BODY + + + + + + + + var pageSize = parseInt(vars.get("grid_entity_page_size")) || 20; + var totalsRecord = parseInt(vars.get("entity_total_records")); + var pageCount = Math.round(totalsRecord/pageSize); + + vars.put("grid_pages_count", pageCount); + + javascript + + + + + + + + + true + ${grid_namespace} + = + true + namespace + true + + + true + + = + true + search + true + + + true + ${grid_admin_browse_filter_text} + = + true + filters[placeholder] + true + + + true + ${grid_entity_page_size} + = + true + paging[pageSize] + true + + + true + 1 + = + true + paging[current] + true + + + true + entity_id + = + true + sorting[field] + true + + + true + asc + = + true + sorting[direction] + true + + + true + true + = + true + isAjax + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_grid_browsing/set_filtered_pages_count.jmx + + + $.totalRecords + 0 + true + false + true + true + + + + entity_total_records + $.totalRecords + + + BODY + + + + + + + var pageSize = parseInt(vars.get("grid_entity_page_size")) || 20; +var totalsRecord = parseInt(vars.get("entity_total_records")); +var pageCount = Math.round(totalsRecord/pageSize); + +vars.put("grid_pages_count_filtered", pageCount); + + javascript + + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + 1 + ${grid_pages_count} + 1 + page_number + + true + false + mpaf/tool/fragments/ce/admin_grid_browsing/select_page_number.jmx + + + + + + + true + ${grid_namespace} + = + true + namespace + true + + + true + + = + true + search + true + + + true + true + = + true + filters[placeholder] + true + + + true + ${grid_entity_page_size} + = + true + paging[pageSize] + true + + + true + ${page_number} + = + true + paging[current] + true + + + true + entity_id + = + true + sorting[field] + true + + + true + asc + = + true + sorting[direction] + true + + + true + true + = + true + isAjax + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_grid_browsing/admin_browse_grid.jmx + + + + \"totalRecords\":[^0]\d* + + Assertion.response_data + false + 2 + + + + + + 1 + ${grid_pages_count_filtered} + 1 + page_number + + true + false + mpaf/tool/fragments/ce/admin_grid_browsing/select_filtered_page_number.jmx + + + + mpaf/tool/fragments/ce/admin_grid_browsing/admin_browse_grid_sort_and_filter.jmx + + + + grid_sort_field + grid_sort_field + true + 0 + 3 + + + + grid_sort_order + grid_sort_order + true + 0 + 2 + + + + + + + true + ${grid_namespace} + = + true + namespace + false + + + true + ${grid_admin_browse_filter_text} + = + true + filters[${grid_filter_field}] + false + + + true + true + = + true + filters[placeholder] + false + + + true + ${grid_entity_page_size} + = + true + paging[pageSize] + false + + + true + ${page_number} + = + true + paging[current] + false + + + true + ${grid_sort_field} + = + true + sorting[field] + false + + + true + ${grid_sort_order} + = + true + sorting[direction] + false + + + true + true + = + true + isAjax + false + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + + + + + \"totalRecords\":[^0]\d* + + Assertion.response_data + false + 2 + + + + + + + + + + + + + + continue + + false + ${loops} + + ${csrPoolUsers} + ${ramp_period} + 1505803944000 + 1505803944000 + false + + + mpaf/tool/fragments/_system/thread_group.jmx + + + 1 + false + 1 + ${adminReturnsManagementPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Admin Returns Management"); + + true + + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + mpaf/tool/fragments/ce/admin_login/admin_retrieve_form_key.jmx + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_process_returns/orders_page.jmx + + + + Create New Order + + Assertion.response_data + false + 2 + + + + + + + + + true + sales_order_grid + = + true + namespace + + + true + + = + true + search + + + true + true + = + true + filters[placeholder] + + + true + 200 + = + true + paging[pageSize] + + + true + 1 + = + true + paging[current] + + + true + increment_id + = + true + sorting[field] + + + true + desc + = + true + sorting[direction] + + + true + true + = + true + isAjax + + + true + ${admin_form_key} + = + true + form_key + false + + + true + pending + = + true + filters[status] + true + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_process_returns/open_orders.jmx + + + + totalRecords + + Assertion.response_data + false + 2 + + + + + + + + + true + ${admin_form_key} + = + true + form_key + + + true + sales_order_grid + = + true + namespace + true + + + true + + = + true + search + true + + + true + true + = + true + filters[placeholder] + true + + + true + 200 + = + true + paging[pageSize] + true + + + true + 1 + = + true + paging[current] + true + + + true + increment_id + = + true + sorting[field] + true + + + true + asc + = + true + sorting[direction] + true + + + true + true + = + true + isAjax + true + + + true + pending + = + true + filters[status] + + + true + ${__time()}${__Random(1,1000000)} + = + true + _ + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_process_returns/search_orders.jmx + + + + totalRecords + + Assertion.response_data + false + 2 + + + + false + order_numbers + \"increment_id\":\"(\d+)\"\, + $1$ + + -1 + simple_products + + + + false + order_ids + \"entity_id\":\"(\d+)\"\, + $1$ + + -1 + simple_products + + + + + + mpaf/tool/fragments/ce/admin_create_process_returns/setup.jmx + + import java.util.ArrayList; + import java.util.HashMap; + import org.apache.jmeter.protocol.http.util.Base64Encoder; + import java.util.Random; + + // get count of "order_numbers" variable defined in "Search Pending Orders Limit" + int ordersCount = Integer.parseInt(vars.get("order_numbers_matchNr")); + + + int clusterLength; + int threadsNumber = ctx.getThreadGroup().getNumThreads(); + if (threadsNumber == 0) { + //Number of orders for one thread + clusterLength = ordersCount; + } else { + clusterLength = Math.round(ordersCount / threadsNumber); + if (clusterLength == 0) { + clusterLength = 1; + } + } + + //Current thread number starts from 0 + int currentThreadNum = ctx.getThreadNum(); + + //Index of the current product from the cluster + Random random = new Random(); + int iterator = random.nextInt(clusterLength); + if (iterator == 0) { + iterator = 1; + } + + int i = clusterLength * currentThreadNum + iterator; + + orderNumber = vars.get("order_numbers_" + i.toString()); + orderId = vars.get("order_ids_" + i.toString()); + vars.put("order_number", orderNumber); + vars.put("order_id", orderId); + + + + + false + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order/view/order_id/${order_id}/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_process_returns/open_order.jmx + + + + #${order_number} + + Assertion.response_data + false + 2 + + + + false + order_status + <span id="order_status">([^<]+)</span> + $1$ + + 1 + simple_products + + + + + + "${order_status}" == "Pending" + false + mpaf/tool/fragments/ce/admin_edit_order/if_controller.jmx + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order_invoice/start/order_id/${order_id}/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_process_returns/invoice_start.jmx + + + + Invoice Totals + + Assertion.response_data + false + 2 + + + + false + item_ids + <div id="order_item_(\d+)_title"\s*class="product-title"> + $1$ + + -1 + simple_products + + + + + + + + + true + ${admin_form_key} + = + true + form_key + false + + + true + 1 + = + true + invoice[items][${item_ids_1}] + + + true + 1 + = + true + invoice[items][${item_ids_2}] + + + true + Invoiced + = + true + invoice[comment_text] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order_invoice/save/order_id/${order_id}/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_process_returns/invoice_submit.jmx + + + + The invoice has been created + + Assertion.response_data + false + 2 + + + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order_creditmemo/start/order_id/${order_id}/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_create_process_returns/credit_memo_start.jmx + + + + New Memo + + Assertion.response_data + false + 2 + + + + + + 1 + mpaf/tool/fragments/ce/admin_create_process_returns/credit_memo_submit.jmx + + + + + + true + ${admin_form_key} + = + true + form_key + false + + + true + 1 + = + true + creditmemo[items][${item_ids_1}][qty] + + + true + 1 + = + true + creditmemo[items][${item_ids_2}][qty] + + + true + 1 + = + true + creditmemo[do_offline] + + + true + Credit Memo added + = + true + creditmemo[comment_text] + + + true + 10 + = + true + creditmemo[shipping_amount] + + + true + 0 + = + true + creditmemo[adjustment_positive] + + + true + 0 + = + true + creditmemo[adjustment_negative] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order_creditmemo/save/order_id/${order_id}/ + POST + true + false + true + false + false + + + + + + You created the credit memo + + Assertion.response_data + false + 2 + + + + + + + + true + ${admin_form_key} + = + true + form_key + false + + + true + 1 + = + true + creditmemo[items][${item_ids_1}][qty] + + + true + 1 + = + true + creditmemo[do_offline] + + + true + Credit Memo added + = + true + creditmemo[comment_text] + + + true + 10 + = + true + creditmemo[shipping_amount] + + + true + 0 + = + true + creditmemo[adjustment_positive] + + + true + 0 + = + true + creditmemo[adjustment_negative] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order_creditmemo/save/order_id/${order_id}/ + POST + true + false + true + false + false + + + + + + You created the credit memo + + Assertion.response_data + false + 2 + + + + + + + 1 + 0 + ${__javaScript(Math.round(${adminCreateProcessReturnsDelay}*1000))} + mpaf/tool/fragments/ce/admin_create_process_returns/pause.jmx + + + + + + + + 1 + false + 1 + ${browseCustomerGridPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Browse Customer Grid"); + + true + + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + + vars.put("gridEntityType" , "Customer"); + + pagesCount = parseInt(vars.get("customers_page_size")) || 20; + vars.put("grid_entity_page_size" , pagesCount); + vars.put("grid_namespace" , "customer_listing"); + vars.put("grid_admin_browse_filter_text" , vars.get("admin_browse_customer_filter_text")); + vars.put("grid_filter_field", "name"); + + // set sort fields and sort directions + vars.put("grid_sort_field_1", "name"); + vars.put("grid_sort_field_2", "group_id"); + vars.put("grid_sort_field_3", "billing_country_id"); + vars.put("grid_sort_order_1", "asc"); + vars.put("grid_sort_order_2", "desc"); + + javascript + mpaf/tool/fragments/ce/admin_browse_customers_grid/setup.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + + + + + true + ${grid_namespace} + = + true + namespace + true + + + true + + = + true + search + true + + + true + true + = + true + filters[placeholder] + true + + + true + ${grid_entity_page_size} + = + true + paging[pageSize] + true + + + true + 1 + = + true + paging[current] + true + + + true + entity_id + = + true + sorting[field] + true + + + true + asc + = + true + sorting[direction] + true + + + true + true + = + true + isAjax + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_grid_browsing/set_pages_count.jmx + + + $.totalRecords + 0 + true + false + true + + + + entity_total_records + $.totalRecords + + + BODY + + + + + + + + var pageSize = parseInt(vars.get("grid_entity_page_size")) || 20; + var totalsRecord = parseInt(vars.get("entity_total_records")); + var pageCount = Math.round(totalsRecord/pageSize); + + vars.put("grid_pages_count", pageCount); + + javascript + + + + + + + + + true + ${grid_namespace} + = + true + namespace + true + + + true + + = + true + search + true + + + true + ${grid_admin_browse_filter_text} + = + true + filters[placeholder] + true + + + true + ${grid_entity_page_size} + = + true + paging[pageSize] + true + + + true + 1 + = + true + paging[current] + true + + + true + entity_id + = + true + sorting[field] + true + + + true + asc + = + true + sorting[direction] + true + + + true + true + = + true + isAjax + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_grid_browsing/set_filtered_pages_count.jmx + + + $.totalRecords + 0 + true + false + true + true + + + + entity_total_records + $.totalRecords + + + BODY + + + + + + + var pageSize = parseInt(vars.get("grid_entity_page_size")) || 20; +var totalsRecord = parseInt(vars.get("entity_total_records")); +var pageCount = Math.round(totalsRecord/pageSize); + +vars.put("grid_pages_count_filtered", pageCount); + + javascript + + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + 1 + ${grid_pages_count} + 1 + page_number + + true + false + mpaf/tool/fragments/ce/admin_grid_browsing/select_page_number.jmx + + + + + + + true + ${grid_namespace} + = + true + namespace + true + + + true + + = + true + search + true + + + true + true + = + true + filters[placeholder] + true + + + true + ${grid_entity_page_size} + = + true + paging[pageSize] + true + + + true + ${page_number} + = + true + paging[current] + true + + + true + entity_id + = + true + sorting[field] + true + + + true + asc + = + true + sorting[direction] + true + + + true + true + = + true + isAjax + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_grid_browsing/admin_browse_grid.jmx + + + + \"totalRecords\":[^0]\d* + + Assertion.response_data + false + 2 + + + + + + 1 + ${grid_pages_count_filtered} + 1 + page_number + + true + false + mpaf/tool/fragments/ce/admin_grid_browsing/select_filtered_page_number.jmx + + + + mpaf/tool/fragments/ce/admin_grid_browsing/admin_browse_grid_sort_and_filter.jmx + + + + grid_sort_field + grid_sort_field + true + 0 + 3 + + + + grid_sort_order + grid_sort_order + true + 0 + 2 + + + + + + + true + ${grid_namespace} + = + true + namespace + false + + + true + ${grid_admin_browse_filter_text} + = + true + filters[${grid_filter_field}] + false + + + true + true + = + true + filters[placeholder] + false + + + true + ${grid_entity_page_size} + = + true + paging[pageSize] + false + + + true + ${page_number} + = + true + paging[current] + false + + + true + ${grid_sort_field} + = + true + sorting[field] + false + + + true + ${grid_sort_order} + = + true + sorting[direction] + false + + + true + true + = + true + isAjax + false + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + + + + + \"totalRecords\":[^0]\d* + + Assertion.response_data + false + 2 + + + + + + + + + + + + 1 + false + 1 + ${adminCreateOrderPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Admin Create Order"); + + true + + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + mpaf/tool/fragments/ce/admin_login/admin_retrieve_form_key.jmx + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + + + mpaf/tool/fragments/ce/admin_create_order/admin_create_order.jmx + import org.apache.jmeter.samplers.SampleResult; +import java.util.Random; +Random random = new Random(); +if (${seedForRandom} > 0) { + random.setSeed(${seedForRandom}); +} +number = random.nextInt(props.get("simple_products_list").size()); +simpleList = props.get("simple_products_list").get(number); +vars.put("simple_product_1_url_key", simpleList.get("url_key")); +vars.put("simple_product_1_name", simpleList.get("title")); +vars.put("simple_product_1_id", simpleList.get("id")); + +do { + number1 = random.nextInt(props.get("simple_products_list").size()); +} while(number == number1); +simpleList = props.get("simple_products_list").get(number1); +vars.put("simple_product_2_url_key", simpleList.get("url_key")); +vars.put("simple_product_2_name", simpleList.get("title")); +vars.put("simple_product_2_id", simpleList.get("id")); + +number = random.nextInt(props.get("configurable_products_list").size()); +configurableList = props.get("configurable_products_list").get(number); +vars.put("configurable_product_1_url_key", configurableList.get("url_key")); +vars.put("configurable_product_1_name", configurableList.get("title")); +vars.put("configurable_product_1_id", configurableList.get("id")); +vars.put("configurable_product_1_sku", configurableList.get("sku")); +vars.put("configurable_attribute_id", configurableList.get("attribute_id")); +vars.put("configurable_option_id", configurableList.get("attribute_option_id")); + + +customers_index = 0; +if (!props.containsKey("customer_ids_index")) { + props.put("customer_ids_index", customers_index); +} + +try { + customers_index = props.get("customer_ids_index"); + customers_list = props.get("customer_ids_list"); + + if (customers_index == customers_list.size()) { + customers_index=0; + } + vars.put("customer_id", customers_list.get(customers_index)); + props.put("customer_ids_index", ++customers_index); +} +catch (java.lang.Exception e) { + log.error("Caught Exception in 'Admin Create Order' thread."); + SampleResult.setStopThread(true); +} + + + true + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order_create/start/ + GET + true + false + true + false + false + + Detected the start of a redirect chain + + + + + + + + Content-Type + application/json + + + Accept + */* + + + + + + true + + + + false + {"username":"${admin_user}","password":"${admin_password}"} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/V1/integration/admin/token + POST + true + false + true + false + false + + + + + admin_token + $ + + + BODY + + + + + ^[a-z0-9-]+$ + + Assertion.response_data + false + 1 + variable + admin_token + + + + + + + Authorization + Bearer ${admin_token} + + + + + + + + + + + + + ${request_protocol} + + ${base_path}rest/V1/configurable-products/${configurable_product_1_sku}/options/all + GET + true + false + true + false + false + + + + + attribute_ids + $.[*].attribute_id + NO_VALUE + + BODY + + + + option_values + $.[*].values[0].value_index + NO_VALUE + + BODY + + + + + + + + + true + item[${simple_product_1_id}][qty] + 1 + = + true + + + true + item[${simple_product_2_id}][qty] + 1 + = + true + + + true + item[${configurable_product_1_id}][qty] + 1 + = + true + + + true + customer_id + ${customer_id} + = + true + + + true + store_id + 1 + = + true + + + true + currency_id + + = + true + + + true + form_key + ${admin_form_key} + = + true + + + true + payment[method] + checkmo + = + true + + + true + reset_shipping + 1 + = + true + + + true + json + 1 + = + true + + + true + as_js_varname + iFrameResponse + = + true + + + true + form_key + ${admin_form_key} + = + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order_create/loadBlock/block/search,items,shipping_method,totals,giftmessage,billing_method?isAjax=true + POST + true + false + true + false + false + + Detected the start of a redirect chain + + + + false + + + try { + attribute_ids = vars.get("attribute_ids"); + option_values = vars.get("option_values"); + attribute_ids = attribute_ids.replace("[","").replace("]","").replace("\"", ""); + option_values = option_values.replace("[","").replace("]","").replace("\"", ""); + attribute_ids_array = attribute_ids.split(","); + option_values_array = option_values.split(","); + args = ctx.getCurrentSampler().getArguments(); + it = args.iterator(); + while (it.hasNext()) { + argument = it.next(); + if (argument.getStringValue().contains("${")) { + args.removeArgument(argument.getName()); + } + } + for (int i = 0; i < attribute_ids_array.length; i++) { + + ctx.getCurrentSampler().addArgument("item[" + vars.get("configurable_product_1_id") + "][super_attribute][" + attribute_ids_array[i] + "]", option_values_array[i]); + } +} catch (Exception e) { + log.error("error???", e); +} + + + + + + + + true + collect_shipping_rates + 1 + = + true + + + true + customer_id + ${customer_id} + = + true + + + true + store_id + 1 + = + true + + + true + currency_id + false + = + true + + + true + form_key + ${admin_form_key} + = + true + + + true + payment[method] + checkmo + = + true + + + true + json + true + = + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order_create/loadBlock/block/shipping_method,totals?isAjax=true + POST + true + false + true + false + false + + + + + + shipping_method + Flat Rate + + Assertion.response_data + false + 2 + + + + + + + + true + form_key + ${admin_form_key} + = + true + + + true + limit + 20 + = + true + + + true + entity_id + + = + true + + + true + name + + = + true + + + true + email + + = + true + + + true + Telephone + + = + true + + + true + billing_postcode + + = + true + + + true + billing_country_id + + = + true + + + true + billing_regione + + = + true + + + true + store_name + + = + true + + + true + page + 1 + = + true + + + true + order[currency] + USD + = + true + + + true + sku + + = + true + + + true + qty + + = + true + + + true + limit + 20 + = + true + + + true + entity_id + + = + true + + + true + name + + = + true + + + true + sku + + = + true + + + true + price[from] + + = + true + + + true + price[to] + + = + true + + + true + in_products + + = + true + + + true + page + 1 + = + true + + + true + coupon_code + + = + true + + + true + order[account][group_id] + 1 + = + true + + + true + order[account][email] + user_${customer_id}@example.com + = + true + + + true + order[billing_address][customer_address_id] + + = + true + + + true + order[billing_address][prefix] + + = + true + + + true + order[billing_address][firstname] + Anthony + = + true + + + true + order[billing_address][middlename] + + = + true + + + true + order[billing_address][lastname] + Nealy + = + true + + + true + order[billing_address][suffix] + + = + true + + + true + order[billing_address][company] + + = + true + + + true + order[billing_address][street][0] + 123 Freedom Blvd. #123 + = + true + + + true + order[billing_address][street][1] + + = + true + + + true + order[billing_address][city] + Fayetteville + = + true + + + true + order[billing_address][country_id] + US + = + true + + + true + order[billing_address][region] + + = + true + + + true + order[billing_address][region_id] + 5 + = + true + + + true + order[billing_address][postcode] + 123123 + = + true + + + true + order[billing_address][telephone] + 022-333-4455 + = + true + + + true + order[billing_address][fax] + + = + true + + + true + order[billing_address][vat_id] + + = + true + + + true + shipping_same_as_billing + on + = + true + + + true + payment[method] + checkmo + = + true + + + true + order[shipping_method] + flatrate_flatrate + = + true + + + true + order[comment][customer_note] + + = + true + + + true + order[comment][customer_note_notify] + 1 + = + true + + + true + order[send_confirmation] + 1 + = + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order_create/save/ + POST + true + false + true + true + false + + Detected the start of a redirect chain + + + + false + order_id + ${host}${base_path}${admin_path}/sales/order/index/order_id/(\d+)/ + $1$ + + 1 + + + + false + order_item_1 + order_item_(\d+)_title + $1$ + + 1 + + + + false + order_item_2 + order_item_(\d+)_title + $1$ + + 2 + + + + false + order_item_3 + order_item_(\d+)_title + $1$ + + 3 + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + order_id + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + order_item_1 + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + order_item_2 + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + order_item_3 + + + + + You created the order. + + Assertion.response_data + false + 2 + + + + + + + + true + form_key + ${admin_form_key} + = + true + + + true + invoice[items][${order_item_1}] + 1 + = + true + + + true + invoice[items][${order_item_2}] + 1 + = + true + + + true + invoice[items][${order_item_3}] + 1 + = + true + + + true + invoice[comment_text] + + = + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/sales/order_invoice/save/order_id/${order_id}/ + POST + true + false + true + false + false + + Detected the start of a redirect chain + + + + + The invoice has been created. + + Assertion.response_data + false + 2 + + + + + + + + true + form_key + ${admin_form_key} + = + true + + + true + shipment[items][${order_item_1}] + 1 + = + true + + + true + shipment[items][${order_item_2}] + 1 + = + true + + + true + shipment[items][${order_item_3}] + 1 + = + true + + + true + shipment[comment_text] + + = + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/order_shipment/save/order_id/${order_id}/ + POST + true + false + true + false + false + + Detected the start of a redirect chain + + + + + The shipment has been created. + + Assertion.response_data + false + 2 + + + + + + + + + + + + continue + + false + ${loops} + + ${apiPoolUsers} + ${ramp_period} + 1505803944000 + 1505803944000 + false + + + mpaf/tool/fragments/_system/thread_group.jmx + + + 1 + false + 1 + ${apiBasePercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "API"); + + true + + + + + + + Content-Type + application/json + + + Accept + */* + + + mpaf/tool/fragments/ce/api/header_manager_before_token.jmx + + + + true + + + + false + {"username":"${admin_user}","password":"${admin_password}"} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/V1/integration/admin/token + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/admin_token_retrieval.jmx + + + admin_token + $ + + + BODY + + + + + ^[a-z0-9-]+$ + + Assertion.response_data + false + 1 + variable + admin_token + + + + + + + + Authorization + Bearer ${admin_token} + + + mpaf/tool/fragments/ce/api/header_manager.jmx + + + + 1 + false + 1 + 100 + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "API Create Customer"); + + true + + + + + true + + + + false + { + "customer": { + + "email": "customer_${__time()}-${__threadNum}-${__Random(1,1000000)}@example.com", + "firstname": "test_${__time()}-${__threadNum}-${__Random(1,1000000)}", + "lastname": "Doe" + }, + "password": "test@123" +} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/customers + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/create_customer.jmx + + + customer_id + $.id + + + BODY + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + customer_id + + + + + + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/customers/${customer_id} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/api/check_customer.jmx + + + $.id + ${customer_id} + true + false + false + + + + + + + + 1 + false + 1 + 100 + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "API Product Attribute Management"); + + true + + + + + true + + + + false + { + "attributeSet": { + "attribute_set_name": "new_attribute_set_${__time()}-${__threadNum}-${__Random(1,1000000)}", + "sort_order": 500 + }, + "skeletonId": "4" +} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/products/attribute-sets/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/create_attribute_set.jmx + + + attribute_set_id + $.attribute_set_id + + + BODY + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + attribute_set_id + + + + + + true + + + + false + { + "group": { + "attribute_group_name": "empty_attribute_group_${__time()}-${__threadNum}-${__Random(1,1000000)}", + "attribute_set_id": ${attribute_set_id} + } +} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/products/attribute-sets/groups + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/create_attribute_group.jmx + + + attribute_group_id + $.attribute_group_id + + + BODY + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + attribute_set_id + + + + + + true + + + + false + { + "attribute": { + "attribute_code": "attr_code_${__time()}", + "frontend_labels": [ + { + "store_id": 0, + "label": "front_lbl_${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)}" + } + ], + "default_value": "default value", + "frontend_input": "textarea", + "is_required": true + } +} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/products/attributes/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/create_attribute.jmx + + + attribute_id + $.attribute_id + + + BODY + + + + attribute_code + $.attribute_code + + + BODY + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + attribute_id + + + + + ^[a-z0-9-_]+$ + + Assertion.response_data + false + 1 + variable + attribute_code + + + + + + true + + + + false + { + "attributeSetId": "${attribute_set_id}", + "attributeGroupId": "${attribute_group_id}", + "attributeCode": "${attribute_code}", + "sortOrder": 3 +} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/products/attribute-sets/attributes + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/add_attribute_to_attribute_set.jmx + + + $ + (\d+) + true + false + false + + + + + + + + 1 + false + 1 + 100 + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "API Product Management"); + + true + + + + + true + + + + false + { + "product": { + "sku": "psku-test-${__time()}-${__threadNum}-${__Random(1,1000000)}", + "name": "Product_${__time()}-${__threadNum}-${__Random(1,1000000)}", + "attributeSetId": 4 + } +} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/products + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/create_product_no_custom_attributes.jmx + + + simple_product_id + $.id + + + BODY + + + + simple_product_sku + $.sku + + + BODY + + + + simple_stock_item_id + $.extension_attributes.stock_item.item_id + + + BODY + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + simple_product_id + + + + + ^[a-z0-9-]+$ + + Assertion.response_data + false + 1 + variable + simple_product_sku + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + simple_stock_item_id + + + + + + true + + + + false + { + "stock_item": { + "manage_stock": true, + "is_in_stock": true, + "qty": ${simple_product_id} + } + } + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/products/${simple_product_sku}/stockItems/${simple_stock_item_id} + PUT + true + false + true + false + false + + mpaf/tool/fragments/ce/api/update_product_stock_info.jmx + + + $ + ${simple_stock_item_id} + true + false + false + + + + + + true + + + + true + + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/products/${simple_product_sku} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/api/check_product.jmx + + + $.sku + ${simple_product_sku} + true + false + false + + + + $.id + ${simple_product_id} + true + false + false + + + + $.extension_attributes.stock_item.item_id + ${simple_stock_item_id} + true + false + false + + + + $.extension_attributes.stock_item.qty + ${simple_product_id} + true + false + false + + + + + + true + + + + false + { + "product": { + "sku": "apsku-test-${__time()}-${__threadNum}-${__Random(1,1000000)}", + "name": "Extensible_Product_${__time()}-${__threadNum}-${__Random(1,1000000)}", + "visibility": "4", + "type_id": "simple", + "price": "3.62", + "status": "1", + "attribute_set_id": "4", + "custom_attributes": [ + { + "attribute_code": "cost", + "value": "" + }, + { + "attribute_code": "description", + "value": "Description" + } + ], + "extension_attributes":{ + "stock_item":{ + "manage_stock": true, + "is_in_stock": true, + "qty":"100" + } + } , + "media_gallery_entries": + [{ + "id": null, + "label":"test_label_${__time()}-${__threadNum}-${__Random(1,1000000)}", + "position":1, + "disabled":false, + "media_type":"image", + "types":["image"], + "content":{ + "base64_encoded_data": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABgAGADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iioLy8t9Ps5bu7lWKCIZd26KKaTbshpX0RPRXN/8J/4V/6DVv8Ak3+FH/Cf+Ff+g1b/AJN/hXR9SxP/AD7l9zNPYVf5X9x0lFc3/wAJ/wCFf+g1b/k3+FH/AAn/AIV/6DVv+Tf4UfUsT/z7l9zD2FX+V/cdJRXN/wDCf+Ff+g1b/k3+FH/Cf+Ff+g1b/k3+FH1LE/8APuX3MPYVf5X9x0lFc3/wn/hX/oNW/wCTf4Uf8J/4V/6DVv8Ak3+FH1LE/wDPuX3MPYVf5X9x0lFVdP1G01WyS8sZ1nt3JCyL0ODg/qKtVzyi4u0lZmbTTswrm/H3/Iiav/1x/wDZhXSVzfj7/kRNX/64/wDswrowf+80/wDEvzNKH8WPqj5voorB1zS7OLT7m7SHE5YNu3HqWGeM471+kYutOhSdSEU7Jt3dtF20f6H1FacqcHJK9vO36M3qKzTa6foqPdxwlWxswrFi2T0AJ9aRdVmjkT7XYSW8TsFEm8MAT0yB0qfrcafu1tJeV2l2u7K3zsL2yjpPR+V3+NjTorPn1GVbt7a1s2uJIwDJ84ULnpyaik1SWTTrp47Z0uIQRJGzAFOPvZ70Sx1GLau9L9H03SdrNrsgdeCuu3k+hq0VR0ma4msImuIih2LtYvuLjA+b2zV6uijUVWmprqaQkpxUl1PoP4Xf8iBYf78v/oxq7GuO+F3/ACIFh/vy/wDoxq7GvzTMf98q/wCJ/mfLYn+NP1YVzfj7/kRNX/64/wDswrpK5vx9/wAiJq//AFx/9mFRg/8Aeaf+JfmTQ/ix9UfN9ZniD/kB3H/Af/QhWnTZI45kKSIroeqsMg1+l4mk61GdNfaTX3o+pqw54Sj3Rma/GXsI3BcLFMruU+8F5yR+dUZ4tOeNFOq3tx5jACNZg5J+mK6PrUMdrbxPvjgiR/7yoAa48TgPa1HNW1STvfp2s1+JjVw/PJy017mbe/YTqTB7iWzuQgPmhtocfjwajiupbjTtTieUXCxRsqTKMb8qePwrYlghnAE0UcgHQOoP86ckaRoERFVR/CowKbwU3UclJJO+19brqr203vvoHsJczd7J3/H8PmVNJnhm063WOVHZIkDhTkqcd/yNXajighg3eTFHHu67FAz+VSV2UIShTjGe67G9NOMUpbn0H8Lv+RAsP9+X/wBGNXY1x3wu/wCRAsP9+X/0Y1djX5tmP++Vf8T/ADPl8T/Gn6sK5vx9/wAiJq//AFx/9mFdJXN+Pv8AkRNX/wCuP/swqMH/ALzT/wAS/Mmh/Fj6o+b6KKK/Uj60KKKKACiiigAooooA+g/hd/yIFh/vy/8Aoxq7GuO+F3/IgWH+/L/6Mauxr8wzH/fKv+J/mfKYn+NP1YVzfj7/AJETV/8Arj/7MK6Sub8ff8iJq/8A1x/9mFRg/wDeaf8AiX5k0P4sfVHzfRRRX6kfWhRRRQAUUUUAFFFFAH0H8Lv+RAsP9+X/ANGNXY1x3wu/5ECw/wB+X/0Y1djX5hmP++Vf8T/M+UxP8afqwqC8s7fULOW0u4llglGHRujCp6K5E2ndGKdtUc3/AMIB4V/6Atv+bf40f8IB4V/6Atv+bf410lFdH13E/wDPyX3s09vV/mf3nN/8IB4V/wCgLb/m3+NH/CAeFf8AoC2/5t/jXSUUfXcT/wA/Jfew9vV/mf3nN/8ACAeFf+gLb/m3+NH/AAgHhX/oC2/5t/jXSUUfXcT/AM/Jfew9vV/mf3nN/wDCAeFf+gLb/m3+NH/CAeFf+gLb/m3+NdJRR9dxP/PyX3sPb1f5n95V0/TrTSrJLOxgWC3QkrGvQZOT+pq1RRXPKTk7yd2Zttu7P//Z", + "type": "image/jpeg", + "name": "test_image_${__time(YMDHMS)}-${__threadNum}-${__Random(1,1000000)}.jpeg" + } + } + ] + } +} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/products + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/create_product_with_extensible_data_objects.jmx + + + simple_product_id + $.id + + + BODY + + + + simple_product_sku + $.sku + + + BODY + + + + simple_stock_item_id + $.extension_attributes.stock_item.item_id + + + BODY + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + simple_product_id + + + + + ^[a-z0-9-]+$ + + Assertion.response_data + false + 1 + variable + simple_product_sku + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + simple_stock_item_id + + + + + + true + + + + true + + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/products/${simple_product_sku} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/api/check_product_with_extensible_data_objects.jmx + + + $.sku + ${simple_product_sku} + true + false + false + + + + $.id + ${simple_product_id} + true + false + false + + + + $.extension_attributes.stock_item.item_id + ${simple_stock_item_id} + true + false + false + + + + $.extension_attributes.stock_item.qty + 100 + true + false + false + + + + + + + + 1 + false + 1 + 100 + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "API Process Orders"); + + true + + + + + // Each thread gets an equal number of orders, based on how many orders are available. + + int apiProcessOrders = Integer.parseInt("${apiProcessOrders}"); + if (apiProcessOrders > 0) { + ordersPerThread = apiProcessOrders; + } else { + ordersPerThread = 1; + } + + + threadNum = ${__threadNum}; + vars.put("ordersPerThread", String.valueOf(ordersPerThread)); + vars.put("threadNum", String.valueOf(threadNum)); + + + + + false + mpaf/tool/fragments/ce/api/process_orders/setup.jmx + + + + + + + true + status + = + true + searchCriteria[filterGroups][0][filters][0][field] + + + true + Pending + = + true + searchCriteria[filterGroups][0][filters][0][value] + + + true + ${ordersPerThread} + = + true + searchCriteria[pageSize] + + + true + ${threadNum} + = + true + searchCriteria[current_page] + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/orders + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/api/process_orders/get_orders.jmx + + + entity_ids + $.items[*].entity_id + + + BODY + + + + + + entity_ids + order_id + true + mpaf/tool/fragments/ce/api/process_orders/for_each_order.jmx + + + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/order/${order_id}/invoice + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/process_orders/create_invoice.jmx + + + + "\d+" + + Assertion.response_data + false + 2 + + + + + + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/order/${order_id}/ship + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/process_orders/create_shipment.jmx + + + + "\d+" + + Assertion.response_data + false + 2 + + + + + + + + + 1 + false + 1 + 100 + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "API Catalog Browsing"); + + true + + + + + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/categories + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/api/get_categories.jmx + + + + errors + + Assertion.response_data + false + 6 + variable + + + + + search_category_id + $.id + + + BODY + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + search_category_id + + + + + + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/categories/${search_category_id} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/api/get_category.jmx + + + + errors + + Assertion.response_data + false + 6 + variable + + + + + + + + + + true + 20 + = + true + searchCriteria[page_size] + true + + + true + 1 + = + true + searchCriteria[current_page] + true + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/products + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/api/get_products.jmx + + + + errors + + Assertion.response_data + false + 6 + variable + + + + + + + + + 1 + false + 1 + 100 + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "API Search"); + + true + + + + + + + + true + quick_search_container + = + true + searchCriteria[request_name] + + + true + search_term + = + true + searchCriteria[filter_groups][0][filters][0][field] + + + true + Simple + = + true + searchCriteria[filter_groups][0][filters][0][value] + + + true + 20 + = + true + searchCriteria[page_size] + + + true + 1 + = + true + searchCriteria[current_page] + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/search + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/api/search_for_product_frontend.jmx + + + $.total_count + 0 + true + false + true + + + + search_product_id + $.items[0].id + + + BODY + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + search_product_id + + + + + + + + 1 + false + 1 + 100 + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "API Checkout"); + + true + + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + mpaf/tool/fragments/ce/common/init_random_generator_setup.jmx + +import java.util.Random; + +Random random = new Random(); +if (${seedForRandom} > 0) { + random.setSeed(${seedForRandom} + ${__threadNum}); +} + +vars.putObject("randomIntGenerator", random); + + + + true + + + + + +import java.util.Random; + +Random random = vars.getObject("randomIntGenerator"); +number = random.nextInt(props.get("simple_products_list").size()); +product = props.get("simple_products_list").get(number); + +vars.put("product_url_key", product.get("url_key")); +vars.put("product_id", product.get("id")); +vars.put("product_name", product.get("title")); +vars.put("product_uenc", product.get("uenc")); +vars.put("product_sku", product.get("sku")); + + + + true + mpaf/tool/fragments/ce/product_browsing_and_adding_items_to_the_cart/simple_products_setup.jmx + + + + + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/carts + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/create_quote.jmx + + + quote_id + $ + + + BODY + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + quote_id + + + + + + true + + + + false + { + "cartItem": { + "sku": "${product_sku}", + "qty":"1", + "quote_id":"${quote_id}" + } +} + + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/carts/${quote_id}/items + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/add_product_to_quote_hardwired_sku.jmx + + + + $.sku + ${product_sku} + true + false + false + + + + + + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/carts/${quote_id}/items + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/api/check_product_in_quote_hardwired_sku.jmx + + + $[0].sku + ${product_sku} + true + false + false + + + + + + true + + + + false + { + "storeId": 1 +} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/guest-carts/ + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/create_guest_cart.jmx + + + cart_id + $ + + + BODY + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + cart_id + + + + + + true + + + + false + { + "cartItem": { + "sku": "${product_sku}", + "qty":"1", + "quote_id":"${cart_id}" + } +} + + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/guest-carts/${cart_id}/items + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/add_product_to_guest_cart_hardwired_sku.jmx + + + $.quote_id + ^[a-z0-9-]+$ + true + false + false + + + + + + true + + + + false + { + "sender": "John Doe", + "recipient": "Jane Roe", + "giftMessage": "Gift Message Text" +} + + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/guest-carts/${cart_id}/gift-message + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/add_gift_message_to_guest_cart.jmx + + + $ + true + true + false + false + + + + + + true + + + + false + {"address":{"country_id":"US","postcode":"95630"}} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/guest-carts/${cart_id}/estimate-shipping-methods + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/guest_checkout/checkout_estimate_shipping_methods_with_postal_code.jmx + + + + + Referer + ${base_path}checkout/onepage/ + + + Content-Type + application/json; charset=UTF-8 + + + X-Requested-With + XMLHttpRequest + + + Accept + application/json + + + + + + + "available":true + + Assertion.response_data + false + 2 + + + + + + true + + + + false + {"addressInformation":{"shipping_address":{"countryId":"US","regionId":"12","regionCode":"CA","region":"California","street":["10441 Jefferson Blvd ste 200"],"company":"","telephone":"3109450345","fax":"","postcode":"90232","city":"Culver City","firstname":"Name","lastname":"Lastname"},"shipping_method_code":"flatrate","shipping_carrier_code":"flatrate"}} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/guest-carts/${cart_id}/shipping-information + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/guest_checkout/checkout_billing_shipping_information.jmx + + + + + Referer + ${base_path}checkout/onepage/ + + + Content-Type + application/json; charset=UTF-8 + + + X-Requested-With + XMLHttpRequest + + + Accept + application/json + + + + + + + {"payment_methods": + + Assertion.response_data + false + 2 + + + + + + true + + + + false + {"cartId":"${cart_id}","email":"test@example.com","paymentMethod":{"method":"checkmo","po_number":null,"additional_data":null},"billingAddress":{"countryId":"US","regionId":"12","regionCode":"CA","region":"California","street":["10441 Jefferson Blvd ste 200"],"company":"","telephone":"3109450345","fax":"","postcode":"90232","city":"Culver City","firstname":"Name","lastname":"Lastname","save_in_address_book":0}} + = + + + + + + + + ${request_protocol} + + ${base_path}rest/default/V1/guest-carts/${cart_id}/payment-information + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/api/checkout_payment_info_place_order.jmx + + + + + Referer + ${base_path}checkout/onepage/ + + + Content-Type + application/json; charset=UTF-8 + + + X-Requested-With + XMLHttpRequest + + + Accept + application/json + + + + + + + "[0-9]+" + + Assertion.response_data + false + 2 + + + + order_id + $ + + + BODY + + + + + ^\d+$ + + Assertion.response_data + false + 1 + variable + order_id + + + + + + + + + + + + continue + + false + ${loops} + + ${othersPoolUsers} + ${ramp_period} + 1505803944000 + 1505803944000 + false + + + mpaf/tool/fragments/_system/thread_group.jmx + + + 1 + false + 1 + ${productGridMassActionPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Product Grid Mass Actions"); + + true + + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + mpaf/tool/fragments/ce/admin_login/admin_retrieve_form_key.jmx + + + + + + + + true + ${admin_form_key} + = + true + form_key + + + true + product_listing + = + true + namespace + true + + + true + + = + true + search + true + + + true + true + = + true + filters[placeholder] + true + + + true + 20 + = + true + paging[pageSize] + true + + + true + 1 + = + true + paging[current] + true + + + true + entity_id + = + true + sorting[field] + true + + + true + asc + = + true + sorting[direction] + true + + + true + true + = + true + isAjax + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_browse_products_grid/get_product_pages_count.jmx + + + $.totalRecords + 0 + true + false + true + + + + products_number + $.totalRecords + + + BODY + + + + false + + + var productsPageSize = Integer.parseInt(vars.get("products_page_size")); +var productsTotal = Integer.parseInt(vars.get("products_number")); +var pageCountProducts = Math.round(productsTotal/productsPageSize); + +vars.put("pages_count_product", String.valueOf(pageCountProducts)); + + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + +import java.util.Random; +Random random = new Random(); +if (${seedForRandom} > 0) { + random.setSeed(${seedForRandom}); +} +var productsPageSize = Integer.parseInt(vars.get("products_page_size")); +var totalNumberOfPages = Integer.parseInt(vars.get("pages_count_product")); + +// Randomly select a page. +var randomProductsPage = Math.floor((Math.random() * totalNumberOfPages) + 1); + +// Get the first and last product id on that page. +var lastProductIdOnPage = randomProductsPage * productsPageSize; +var firstProductIdOnPage = lastProductIdOnPage - productsPageSize + 1; + +var randomProductId1 = Math.floor(random.nextInt(productsPageSize)) + firstProductIdOnPage; +var randomProductId2 = Math.floor(random.nextInt(productsPageSize)) + firstProductIdOnPage; +var randomProductId3 = Math.floor(random.nextInt(productsPageSize)) + firstProductIdOnPage; + +vars.put("page_number", String.valueOf(randomProductsPage)); +vars.put("productId1", String.valueOf(randomProductId1)); +vars.put("productId2", String.valueOf(randomProductId2)); +vars.put("productId3", String.valueOf(randomProductId3)); + +var randomQuantity = Math.floor(Math.random() * 1000) + 1; +var randomPrice = Math.floor(Math.random() * 500) + 10; +var randomVisibility = Math.floor(random.nextInt(4)) + 1; + +vars.put("quantity", String.valueOf(randomQuantity)); +vars.put("price", String.valueOf(randomPrice)); +vars.put("visibility", String.valueOf(randomVisibility)); + + + + + + false + mpaf/tool/fragments/ce/admin_browse_products_grid/products_grid_mass_actions/setup.jmx + + + + + + + true + ${admin_form_key} + = + true + form_key + true + + + true + product_listing + = + true + namespace + true + + + true + + = + true + search + true + + + true + true + = + true + filters[placeholder] + true + + + true + ${products_page_size} + = + true + paging[pageSize] + true + + + true + ${page_number} + = + true + paging[current] + true + + + true + entity_id + = + true + sorting[field] + true + + + true + asc + = + true + sorting[direction] + true + + + true + true + = + true + isAjax + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/mui/index/render/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_browse_products_grid/products_grid_mass_actions/display_grid.jmx + + + + totalRecords + + Assertion.response_data + false + 2 + + + + + + + + + true + ${productId1} + = + true + selected[0] + + + true + ${productId2} + = + true + selected[1] + + + true + ${productId3} + = + true + selected[2] + true + + + true + true + = + true + filters[placeholder] + false + + + true + ${admin_form_key} + = + true + form_key + false + + + true + product_listing + = + true + namespace + false + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product_action_attribute/edit + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_browse_products_grid/products_grid_mass_actions/display_update_attributes.jmx + + + + Update Attributes + + Assertion.response_data + false + 2 + + + + + + + + + true + true + = + true + isAjax + true + + + true + ${admin_form_key} + = + true + form_key + true + + + true + 1 + = + true + product[product_has_weight] + true + + + true + 1 + = + true + product[use_config_gift_message_available] + true + + + true + 1 + = + true + product[use_config_gift_wrapping_available] + true + + + true + ${quantity} + = + true + inventory[qty] + true + + + true + ${price} + = + true + attributes[price] + + + true + ${visibility} + = + true + attributes[visibility] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product_action_attribute/validate + POST + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_browse_products_grid/products_grid_mass_actions/change_attributes.jmx + + + + {"error":false} + + Assertion.response_data + false + 2 + + + + + + + + true + true + = + true + isAjax + false + + + true + ${admin_form_key} + = + true + form_key + false + + + true + 1 + = + true + product[product_has_weight] + true + + + true + 1 + = + true + product[use_config_gift_message_available] + + + true + 1 + = + true + product[use_config_gift_wrapping_available] + true + + + true + ${quantity} + = + true + inventory[qty] + + + true + on + = + true + toggle_price + true + + + true + ${price} + = + true + attributes[price] + + + true + on + = + true + toggle_price + true + + + true + ${visibility} + = + true + attributes[visibility] + + + true + on + = + true + toggle_visibility + true + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/catalog/product_action_attribute/save/store/0/active_tab/attributes + POST + true + false + true + true + false + + + + + + were updated. + + Assertion.response_data + false + 2 + + + + + + + + + 1 + false + 1 + ${importProductsPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Import Products"); + + true + + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + vars.put("entity", "catalog_product"); +String behavior = "${adminImportProductBehavior}"; +vars.put("adminImportBehavior", behavior); +String filepath = "${files_folder}${adminImportProductFilePath}"; +vars.put("adminImportFilePath", filepath); + + + true + mpaf/tool/fragments/ce/import_products/setup.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/import/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/import.jmx + + + + Import Settings + + Assertion.response_data + false + 2 + + + + + + + + + true + ${admin_form_key} + = + true + form_key + false + + + true + ${entity} + = + true + entity + + + true + ${adminImportBehavior} + = + true + behavior + + + true + validation-stop-on-errors + = + true + validation_strategy + + + true + 10 + = + true + allowed_error_count + + + true + , + = + true + _import_field_separator + + + true + , + = + true + _import_multiple_value_separator + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/import/validate + POST + true + false + true + false + HttpClient4 + + + + ${adminImportFilePath} + import_file + application/vnd.ms-excel + + + + false + + mpaf/tool/fragments/ce/common/import_validate.jmx + + + + File is valid! To start import process + + Assertion.response_data + false + 16 + + + + + + + + + true + ${admin_form_key} + = + true + form_key + false + + + true + ${entity} + = + true + entity + + + true + ${adminImportBehavior} + = + true + behavior + + + true + validation-stop-on-errors + = + true + validation_strategy + false + + + true + 10 + = + true + allowed_error_count + false + + + true + , + = + true + _import_field_separator + false + + + true + , + = + true + _import_multiple_value_separator + false + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/import/start + POST + true + false + true + false + HttpClient4 + + + + ${adminImportFilePath} + import_file + application/vnd.ms-excel + + + + false + + mpaf/tool/fragments/ce/common/import_save.jmx + + + + Import successfully done + + Assertion.response_data + false + 16 + + + + + + + + + 1 + false + 1 + ${importCustomersPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Import Customers"); + + true + + + + + vars.put("entity", "customer"); +String behavior = "${adminImportCustomerBehavior}"; +vars.put("adminImportBehavior", behavior); +String filepath = "${files_folder}${adminImportCustomerFilePath}"; +vars.put("adminImportFilePath", filepath); + + + true + mpaf/tool/fragments/ce/import_customers/setup.jmx + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/import/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/import.jmx + + + + Import Settings + + Assertion.response_data + false + 2 + + + + + + + + + true + ${admin_form_key} + = + true + form_key + false + + + true + ${entity} + = + true + entity + + + true + ${adminImportBehavior} + = + true + behavior + + + true + validation-stop-on-errors + = + true + validation_strategy + + + true + 10 + = + true + allowed_error_count + + + true + , + = + true + _import_field_separator + + + true + , + = + true + _import_multiple_value_separator + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/import/validate + POST + true + false + true + false + HttpClient4 + + + + ${adminImportFilePath} + import_file + application/vnd.ms-excel + + + + false + + mpaf/tool/fragments/ce/common/import_validate.jmx + + + + File is valid! To start import process + + Assertion.response_data + false + 16 + + + + + + + + + true + ${admin_form_key} + = + true + form_key + false + + + true + ${entity} + = + true + entity + + + true + ${adminImportBehavior} + = + true + behavior + + + true + validation-stop-on-errors + = + true + validation_strategy + false + + + true + 10 + = + true + allowed_error_count + false + + + true + , + = + true + _import_field_separator + false + + + true + , + = + true + _import_multiple_value_separator + false + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/import/start + POST + true + false + true + false + HttpClient4 + + + + ${adminImportFilePath} + import_file + application/vnd.ms-excel + + + + false + + mpaf/tool/fragments/ce/common/import_save.jmx + + + + Import successfully done + + Assertion.response_data + false + 16 + + + + + + + + + 1 + false + 1 + ${exportProductsPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Export Products"); + + true + + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx + + + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path} + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/admin_login/admin_login.jmx + + + + Welcome + <title>Magento Admin</title> + + Assertion.response_data + false + 2 + + + + false + admin_form_key + <input name="form_key" type="hidden" value="([^'"]+)" /> + $1$ + + 1 + + + + + ^.+$ + + Assertion.response_data + false + 1 + variable + admin_form_key + + + + + + + + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} + = + true + login[password] + + + true + ${admin_user} + = + true + login[username] + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/dashboard/ + POST + true + false + true + false + Java + false + + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/export/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/export.jmx + + + + Export Settings + + Assertion.response_data + false + 2 + + + + + + + + + true + form_key + ${admin_form_key} + = + true + + + true + attribute_code + + = + true + + + true + export_filter[allow_message][] + , + = + true + + + true + export_filter[allow_open_amount] + + = + true + + + true + export_filter[category_ids] + 24,25,26,27,28,29,30 + = + true + + + true + export_filter[configurable_variations] + + = + true + + + true + export_filter[cost][] + , + = + true + + + true + export_filter[country_of_manufacture] + + = + true + + + true + export_filter[created_at] + + = + true + + + true + export_filter[custom_design] + + = + true + + + true + export_filter[custom_design_from][] + , + = + true + + + true + export_filter[custom_design_to][] + , + = + true + + + true + export_filter[custom_layout_update] + + = + true + + + true + export_filter[description] + + = + true + + + true + export_filter[email_template] + + = + true + + + true + export_filter[gallery] + + = + true + + + true + export_filter[gift_message_available] + + = + true + + + true + export_filter[gift_wrapping_available] + + = + true + + + true + export_filter[gift_wrapping_price][] + , + = + true + + + true + export_filter[group_price][] + , + = + true + + + true + export_filter[has_options] + + = + true + + + true + export_filter[image] + + = + true + + + true + export_filter[image_label] + + = + true + + + true + export_filter[is_redeemable][] + , + = + true + + + true + export_filter[is_returnable] + + = + true + + + true + export_filter[lifetime][] + , + = + true + + + true + export_filter[links_exist][] + , + = + true + + + true + export_filter[links_purchased_separately][] + , + = + true + + + true + export_filter[links_title] + + = + true + + + true + export_filter[media_gallery] + + = + true + + + true + export_filter[meta_description] + + = + true + + + true + export_filter[meta_keyword] + + = + true + + + true + export_filter[meta_title] + + = + true + + + true + export_filter[minimal_price][] + , + = + true + + + true + export_filter[msrp][] + , + = + true + + + true + export_filter[msrp_display_actual_price_type] + + = + true + + + true + export_filter[name] + + = + true + + + true + export_filter[news_from_date][] + , + = + true + + + true + export_filter[news_to_date][] + , + = + true + + + true + export_filter[old_id][] + , + = + true + + + true + export_filter[open_amount_max][] + , + = + true + + + true + export_filter[open_amount_min][] + , + = + true + + + true + export_filter[options_container] + + = + true + + + true + export_filter[page_layout] + + = + true + + + true + export_filter[price][] + , + = + true + + + true + export_filter[price_type][] + , + = + true + + + true + export_filter[price_view] + + = + true + + + true + export_filter[quantity_and_stock_status] + + = + true + + + true + export_filter[related_tgtr_position_behavior][] + , + = + true + + + true + export_filter[related_tgtr_position_limit][] + , + = + true + + + true + export_filter[required_options] + + = + true + + + true + export_filter[samples_title] + + = + true + + + true + export_filter[shipment_type][] + , + = + true + + + true + export_filter[short_description] + + = + true + + + true + export_filter[sku] + + = + true + + + true + export_filter[sku_type][] + , + = + true + + + true + export_filter[small_image] + + = + true + + + true + export_filter[small_image_label] + + = + true + + + true + export_filter[special_from_date][] + , + = + true + + + true + export_filter[special_price][] + , + = + true + + + true + export_filter[special_to_date][] + , + = + true + + + true + export_filter[status] + + = + true + + + true + export_filter[tax_class_id] + = true - product - - false + + true + export_filter[thumbnail] = true - related_product - - false - 1 + + true + export_filter[thumbnail_label] + = true - qty - - false - ${form_key} + + true + export_filter[tier_price][] + , = true - form_key - - - - - - - - - ${base_path}checkout/cart/add/uenc/${simple_product_2_uenc}/product/${simple_product_2_id}/ - POST - true - false - true - false - false - - - - - - - X-Requested-With - XMLHttpRequest - - - - - - - - - - + true - cart,messages + export_filter[updated_at] + = true - sections - true - + true - true + export_filter[upsell_tgtr_position_behavior][] + , = true - update_section_id - true - - false - ${__time(yyyy-MM-dd'T'HH:mm:ss.SSSZ)} + + true + export_filter[upsell_tgtr_position_limit][] + , = true - _ - true - - - - - - - - - ${base_path}customer/section/load/ - GET - true - false - true - false - false - - - - - - - X-Requested-With - XMLHttpRequest - - - - - - - - You added ${simple_product_2_name} to your shopping cart. - - Assertion.response_data - false - 2 - - - - - This product is out of stock. - - Assertion.response_data - false - 6 - - - - - \"summary_count\":2 - - Assertion.response_data - false - 2 - - - - - - ${think_time_delay_offset} - ${think_time_deviation} - - - - - - - - - - - - - - ${base_path}${configurable_product_1_url_key}${url_suffix} - GET - true - false - true - false - false - - - - - - <title>${configurable_product_1_name} - <span>In stock</span> - - Assertion.response_data - false - 2 - - - - - - ${think_time_delay_offset} - ${think_time_deviation} - - - - - - - - false - ${configurable_product_1_id} + + true + export_filter[url_key] + = true - product - - false + + true + export_filter[url_path] = true - related_product - - false - 1 + + true + export_filter[use_config_allow_message][] + , = true - qty - - false - ${configurable_option_id} + + true + export_filter[use_config_email_template][] + , = true - super_attribute[${configurable_attribute_id}] - - false - ${configurable_option_id_2} + + true + export_filter[use_config_is_redeemable][] + , = true - super_attribute[${configurable_attribute_id_2}] - - false - ${form_key} + + true + export_filter[use_config_lifetime][] + , = true - form_key - - - - - - - - - ${base_path}checkout/cart/add/uenc/${configurable_product_1_uenc}/product/${configurable_product_1_id}/ - POST - true - false - true - false - false - - - - - - - X-Requested-With - XMLHttpRequest - - - - - - - - - - + true - cart,messages + export_filter[visibility] + = true - sections - true - + true - true + export_filter[weight][] + , = true - update_section_id - true - - false - ${__time(yyyy-MM-dd'T'HH:mm:ss.SSSZ)} + + true + export_filter[weight_type][] + , + = + true + + + true + frontend_label + = true - _ - true @@ -5359,64 +33164,122 @@ vars.put("loadType", "Customer"); - + ${request_protocol} - ${base_path}customer/section/load/ - GET + ${base_path}${admin_path}/admin/export/export/entity/catalog_product/file_format/csv + POST true false true false false - + mpaf/tool/fragments/ce/export_products/export_products.jmx - - - - X-Requested-With - XMLHttpRequest - - - - - - - - You added ${configurable_product_1_name} to your shopping cart. - - Assertion.response_data - false - 2 - - - - - We don't have as many &quot;${configurable_product_1_name}&quot; as you requested. - - Assertion.response_data - false - 6 - - - \"summary_count\":3 + Simple Product 1 Assertion.response_data false - 2 + 16 + + + - - ${think_time_delay_offset} - ${think_time_deviation} - + + 1 + false + 1 + ${exportCustomersPercentage} + mpaf/tool/fragments/_system/scenario_controller_tmpl.jmx + + + +var testLabel = "${testLabel}" ? " (${testLabel})" : ""; +if (testLabel + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' +) { + if (sampler.getName().indexOf(testLabel) == -1) { + sampler.setName(sampler.getName() + testLabel); + } +} else if (sampler.getName().indexOf("SetUp - ") == -1) { + sampler.setName("SetUp - " + sampler.getName()); +} + + javascript + mpaf/tool/fragments/_system/setup_label.jmx + + + + vars.put("testLabel", "Export Customers"); + + true + + + + + + function getFormKeyFromResponse() + { + var url = prev.getUrlAsString(), + responseCode = prev.getResponseCode(), + formKey = null; + searchPattern = /var FORM_KEY = '(.+)'/; + if (responseCode == "200" && url) { + response = prev.getResponseDataAsString(); + formKey = response && response.match(searchPattern) ? response.match(searchPattern)[1] : null; + } + return formKey; + } + + formKey = vars.get("form_key_storage"); + + currentFormKey = getFormKeyFromResponse(); + + if (currentFormKey != null && currentFormKey != formKey) { + vars.put("form_key_storage", currentFormKey); + } + + javascript + mpaf/tool/fragments/ce/admin/handle_admin_form_key.jmx + + + + formKey = vars.get("form_key_storage"); + if (formKey + && sampler.getClass().getName() == 'org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy' + && sampler.getMethod() == "POST") + { + arguments = sampler.getArguments(); + for (i=0; i<arguments.getArgumentCount(); i++) + { + argument = arguments.getArgument(i); + if (argument.getName() == 'form_key' && argument.getValue() != formKey) { + log.info("admin form key updated: " + argument.getValue() + " => " + formKey); + argument.setValue(formKey); + } + } + } + + javascript + + + + + + false + mpaf/tool/fragments/ce/http_cookie_manager_without_clear_each_iteration.jmx - + + mpaf/tool/fragments/ce/once_only_controller.jmx + + + @@ -5424,9 +33287,9 @@ vars.put("loadType", "Customer"); - + ${request_protocol} - ${base_path}checkout/ + ${base_path}${admin_path} GET true false @@ -5434,73 +33297,27 @@ vars.put("loadType", "Customer"); false false - + mpaf/tool/fragments/ce/admin_login/admin_login.jmx - + - <title>Checkout</title> + Welcome + <title>Magento Admin</title> Assertion.response_data false 2 - - - <title>Shopping Cart</title> - - Assertion.response_data - false - 6 - - - - false - cart_id - "quoteData":{"entity_id":"([^'"]+)", - $1$ - - 1 - - false - form_key + admin_form_key <input name="form_key" type="hidden" value="([^'"]+)" /> $1$ 1 - - false - address_id - "default_billing":"([^'"]+)", - $1$ - - 1 - - - - false - customer_id - "customer_id":([^'",]+), - $1$ - - 1 - - - - - ^.+$ - - Assertion.response_data - false - 1 - variable - cart_id - - ^.+$ @@ -5509,47 +33326,41 @@ vars.put("loadType", "Customer"); false 1 variable - form_key - - - - - [0-9]+$ - - Assertion.response_data - false - 1 - variable - address_id - - - - - [0-9]+$ - - Assertion.response_data - false - 1 - variable - customer_id + admin_form_key - - ${think_time_delay_offset} - ${think_time_deviation} - - - - - true - + + - - false - {"addressId":"${addressId}"} + + true + + = + true + dummy + + + true + ${admin_form_key} + = + true + form_key + + + true + ${admin_password} = + true + login[password] + + + true + ${admin_user} + = + true + login[username] @@ -5557,42 +33368,49 @@ vars.put("loadType", "Customer"); - + ${request_protocol} - ${base_path}rest/default/V1/carts/mine/estimate-shipping-methods-by-address-id + ${base_path}${admin_path}/admin/dashboard/ POST true false true false + Java false + mpaf/tool/fragments/ce/admin_login/admin_login_submit_form.jmx + + + + + mpaf/tool/fragments/ce/simple_controller.jmx + + + + + + + + + + + ${request_protocol} + + ${base_path}${admin_path}/admin/export/ + GET + true + false + true + false + false + + mpaf/tool/fragments/ce/common/export.jmx - - - - Referer - ${base_path}checkout/onepage/ - - - Content-Type - application/json; charset=UTF-8 - - - X-Requested-With - XMLHttpRequest - - - Accept - application/json - - - - - "available":true + Export Settings Assertion.response_data false @@ -5601,175 +33419,251 @@ vars.put("loadType", "Customer"); - - ${think_time_delay_offset} - ${think_time_deviation} - - - - - true - + + - - false - {"addressInformation":{"shipping_address":{"customerAddressId":"${address_id}","countryId":"US","regionId":5,"regionCode":"AR","region":"Arkansas","customerId":"${customer_id}","street":["123 Freedom Blvd. #123"],"telephone":"022-333-4455","postcode":"123123","city":"Fayetteville","firstname":"Anthony","lastname":"Nealy"},"shipping_method_code":"flatrate","shipping_carrier_code":"flatrate"}} + + true + ${admin_form_key} + = + true + form_key + false + + + true + + = + true + attribute_code + true + + + true + + = + true + export_filter[confirmation] + true + + + true + + = + true + export_filter[created_at] + true + + + true + + = + true + export_filter[created_in] + true + + + true + , + = + true + export_filter[default_billing][] + true + + + true + , + = + true + export_filter[default_shipping][] + true + + + true + + = + true + export_filter[disable_auto_group_change] + true + + + true + , + = + true + export_filter[dob][] + true + + + true + + = + true + export_filter[email] + true + + + true + + = + true + export_filter[firstname] + true + + + true + + = + true + export_filter[gender] + true + + + true + + = + true + export_filter[group_id] + true + + + true + + = + true + export_filter[lastname] + true + + + true + + = + true + export_filter[middlename] + true + + + true + + = + true + export_filter[password_hash] + true + + + true + = + true + export_filter[prefix] + true - - - - - - - - - ${base_path}rest/default/V1/carts/mine/shipping-information - POST - true - false - true - false - false - - - - - - - Referer - ${host}${base_path}checkout/onepage + + true + , + = + true + export_filter[reward_update_notification][] + true - - Content-Type - application/json; charset=UTF-8 + + true + , + = + true + export_filter[reward_warning_notification][] + true - - X-Requested-With - XMLHttpRequest + + true + + = + true + export_filter[rp_token] + true - - Accept - application/json + + true + , + = + true + export_filter[rp_token_created_at][] + true - - - - - - {"payment_methods" - - Assertion.response_data - false - 2 - - - - - - ${think_time_delay_offset} - ${think_time_deviation} - - - - - true - - - - false - {"cartId":"${cart_id}","paymentMethod":{"method":"checkmo","po_number":null,"additional_data":null},"billingAddress":{"customerAddressId":"${address_id}","countryId":"US","regionId":5,"regionCode":"AR","region":"Arkansas","customerId":"${customer_id}","street":["123 Freedom Blvd. #123"],"telephone":"022-333-4455","postcode":"123123","city":"Fayetteville","firstname":"Anthony","lastname":"Nealy"}} + + true + = + true + export_filter[store_id] + true - - - - - - - - - ${base_path}rest/default/V1/carts/mine/payment-information - POST - true - false - true - false - false - - - - - - - Referer - ${host}${base_path}checkout/onepage + + true + + = + true + export_filter[suffix] + true - - Content-Type - application/json; charset=UTF-8 + + true + + = + true + export_filter[taxvat] + true - - Accept - application/json + + true + + = + true + export_filter[website_id] + true - - X-Requested-With - XMLHttpRequest + + true + + = + true + frontend_label + true - - - - - "[0-9]+" - - Assertion.response_data - false - 2 - - - - - - ${think_time_delay_offset} - ${think_time_deviation} - - - - - - - + ${request_protocol} - ${base_path}checkout/onepage/success/ - GET + ${base_path}${admin_path}/admin/export/export/entity/customer/file_format/csv + POST true false true false false - + mpaf/tool/fragments/ce/export_customers/export_customers.jmx - + - Thank you for your purchase! - Your order number is + user_1@example.com Assertion.response_data false - 2 + 16 - + + + + + stoptest @@ -5783,7 +33677,7 @@ vars.put("loadType", "Customer"); false - + mpaf/tool/fragments/ce/tear_down.jmx "${dashboard_enabled}" == "1" @@ -5794,28 +33688,28 @@ vars.put("loadType", "Customer"); - false + true ${__property(environment)} = true environment - false + true ${start_time} = true startTime - false + true ${__time(yyyy-MM-dd'T'HH:mm:ss.SSSZ)} = true endTime - false + true ${redis_host} = true @@ -5827,7 +33721,7 @@ vars.put("loadType", "Customer"); - + ${request_protocol} ${base_path}DeploymentEvent.php POST @@ -5869,7 +33763,6 @@ vars.put("loadType", "Customer"); props.remove("category_name"); props.remove("simple_products_list"); props.remove("configurable_products_list"); -props.remove("users"); props.remove("customer_emails_list"); @@ -5878,107 +33771,7 @@ props.remove("customer_emails_list"); - - false - - saveConfig - - - true - true - true - - true - true - true - true - false - true - true - false - false - false - false - false - false - false - false - 0 - true - true - - - - - - - true - true - true - - true - true - true - true - false - true - true - false - false - true - false - false - true - false - false - 0 - true - true - true - true - - - - - - - - false - - saveConfig - - - false - false - false - - false - false - false - false - false - false - false - false - false - false - true - false - false - false - false - 0 - true - true - true - true - - - ${report_save_path}/detailed-urls-report.log - - - - + false saveConfig @@ -6010,8 +33803,8 @@ props.remove("customer_emails_list"); true - ${report_save_path}/summary-report.log - + ${response_time_file_name} + mpaf/tool/fragments/ce/common/aggregate_graph.jmx diff --git a/setup/performance-toolkit/files/downloadable_original.txt b/setup/performance-toolkit/files/downloadable_original.txt new file mode 100644 index 0000000000000..9fbb20e6aa426 --- /dev/null +++ b/setup/performance-toolkit/files/downloadable_original.txt @@ -0,0 +1 @@ +original text \ No newline at end of file diff --git a/setup/performance-toolkit/files/downloadable_sample.txt b/setup/performance-toolkit/files/downloadable_sample.txt new file mode 100644 index 0000000000000..679aa535f6a97 --- /dev/null +++ b/setup/performance-toolkit/files/downloadable_sample.txt @@ -0,0 +1 @@ +sample text \ No newline at end of file diff --git a/setup/performance-toolkit/files/search_terms.csv b/setup/performance-toolkit/files/search_terms.csv new file mode 100644 index 0000000000000..6522526e2e16c --- /dev/null +++ b/setup/performance-toolkit/files/search_terms.csv @@ -0,0 +1,10 @@ +searchTerm,priceTo +Mizuho,1000 +Scotiabank,1000 +Johnson,1000 +Caterpillar,1000 +Eni,1000 +adidas,1000 +Société Générale,1000 +China State Construction,1000 +Deutsche Bank,1000 diff --git a/setup/performance-toolkit/profiles/ce/small.xml b/setup/performance-toolkit/profiles/ce/small.xml index e8905bd9c77de..8ecb4162f4b11 100644 --- a/setup/performance-toolkit/profiles/ce/small.xml +++ b/setup/performance-toolkit/profiles/ce/small.xml @@ -57,6 +57,18 @@ 0 0 + + admin/security/session_lifetime + default + 0 + 7200 + + + admin/security/admin_account_sharing + default + 0 + 1 + carriers/flatrate/active default