diff --git a/.github/workflows/smoke-test-daily.yml b/.github/workflows/smoke-test-daily.yml index c0a7f9bb619..cc4881f8d08 100644 --- a/.github/workflows/smoke-test-daily.yml +++ b/.github/workflows/smoke-test-daily.yml @@ -162,20 +162,6 @@ jobs: pnpm exec playwright test --config=tests/e2e-pw/playwright.config.js update-woocommerce.spec.js continue-on-error: true - - name: Update performance Woo Express test site with E2E test - working-directory: plugins/woocommerce - env: - BASE_URL: ${{ secrets.WX_DAILY_ADMIN_URL }}/ - ADMIN_USER: ${{ secrets.WX_DAILY_ADMIN_USER }} - ADMIN_PASSWORD: ${{ secrets.WX_DAILY_ADMIN_PW }} - CUSTOMER_USER: ${{ secrets.WX_DAILY_ADMIN_USER }} - CUSTOMER_PASSWORD: ${{ secrets.WX_DAILY_ADMIN_PW }} - UPDATE_WC: nightly - DEFAULT_TIMEOUT_OVERRIDE: 120000 - run: | - pnpm exec playwright test --config=tests/e2e-pw/playwright.config.js update-woocommerce.spec.js - continue-on-error: true - - name: Install k6 run: | curl https://github.com/grafana/k6/releases/download/v0.33.0/k6-v0.33.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1 diff --git a/plugins/woocommerce/changelog/fix-revert-add-wx-nightly-perf b/plugins/woocommerce/changelog/fix-revert-add-wx-nightly-perf new file mode 100644 index 00000000000..ec617782aad --- /dev/null +++ b/plugins/woocommerce/changelog/fix-revert-add-wx-nightly-perf @@ -0,0 +1,5 @@ +Significance: patch +Type: add +Comment: Updated perf test and workflow for extra site + + diff --git a/plugins/woocommerce/tests/performance/requests/shopper/my-account-orders.js b/plugins/woocommerce/tests/performance/requests/shopper/my-account-orders.js index 40bb5099353..3ec046b709e 100644 --- a/plugins/woocommerce/tests/performance/requests/shopper/my-account-orders.js +++ b/plugins/woocommerce/tests/performance/requests/shopper/my-account-orders.js @@ -65,7 +65,7 @@ export function myAccountOrders() { check( response, { 'is status 200': ( r ) => r.status === 200, "body contains: 'Orders' title": ( response ) => - response.body.includes( 'class="woocommerce-orders-table' ), + response.body.includes( '>Orders' ), } ); my_account_order_id = findBetween( response.body, @@ -95,7 +95,7 @@ export function myAccountOrders() { check( response, { 'is status 200': ( r ) => r.status === 200, "body contains: 'Order number' title": ( response ) => - response.body.includes( `${ my_account_order_id }` ), } ); } ); diff --git a/plugins/woocommerce/tests/performance/tests/gh-action-daily-wx-requests.js b/plugins/woocommerce/tests/performance/tests/gh-action-daily-wx-requests.js deleted file mode 100644 index 06351837168..00000000000 --- a/plugins/woocommerce/tests/performance/tests/gh-action-daily-wx-requests.js +++ /dev/null @@ -1,285 +0,0 @@ -/** - * Internal dependencies - */ -import { homePage } from '../requests/shopper/home.js'; -import { shopPage } from '../requests/shopper/shop-page.js'; -import { searchProduct } from '../requests/shopper/search-product.js'; -import { singleProduct } from '../requests/shopper/single-product.js'; -import { cart } from '../requests/shopper/cart.js'; -import { cartRemoveItem } from '../requests/shopper/cart-remove-item.js'; -import { checkoutGuest } from '../requests/shopper/checkout-guest.js'; -import { checkoutCustomerLogin } from '../requests/shopper/checkout-customer-login.js'; -import { myAccount } from '../requests/shopper/my-account.js'; -import { myAccountOrders } from '../requests/shopper/my-account-orders.js'; -import { categoryPage } from '../requests/shopper/category-page.js'; -import { myAccountMerchantLogin } from '../requests/merchant/my-account-merchant.js'; -import { products } from '../requests/merchant/products.js'; -import { addProduct } from '../requests/merchant/add-product.js'; -import { coupons } from '../requests/merchant/coupons.js'; -import { orders } from '../requests/merchant/orders.js'; -import { ordersSearch } from '../requests/merchant/orders-search.js'; -import { addOrder } from '../requests/merchant/add-order.js'; -import { ordersAPI } from '../requests/api/orders.js'; -import { homeWCAdmin } from '../requests/merchant/home-wc-admin.js'; - -const shopper_request_threshold = 'p(95)<10000'; -const merchant_request_threshold = 'p(95)<10000'; -const api_request_threshold = 'p(95)<10000'; - -export const options = { - scenarios: { - shopperBrowseSmoke: { - executor: 'per-vu-iterations', - vus: 1, - iterations: 3, - maxDuration: '180s', - exec: 'shopperBrowseFlow', - }, - myAccountSmoke: { - executor: 'per-vu-iterations', - vus: 1, - iterations: 3, - maxDuration: '60s', - startTime: '20s', - exec: 'myAccountFlow', - },/* // Skipped as using Cart Block - cartSmoke: { - executor: 'per-vu-iterations', - vus: 1, - iterations: 3, - maxDuration: '60s', - startTime: '25s', - exec: 'cartFlow', - },*/ - checkoutGuestSmoke: { - executor: 'per-vu-iterations', - vus: 1, - iterations: 3, - maxDuration: '120s', - startTime: '30s', - exec: 'checkoutGuestFlow', - },/* // Skipped due to Empty Cart Login Bug - checkoutCustomerLoginSmoke: { - executor: 'per-vu-iterations', - vus: 1, - iterations: 3, - maxDuration: '120s', - startTime: '40s', - exec: 'checkoutCustomerLoginFlow', - },*/ - allMerchantSmoke: { - executor: 'per-vu-iterations', - vus: 1, - iterations: 3, - maxDuration: '360s', - exec: 'allMerchantFlow', - }, - allAPISmoke: { - executor: 'per-vu-iterations', - vus: 1, - iterations: 3, - maxDuration: '120s', - exec: 'allAPIFlow', - }, - }, - thresholds: { - checks: [ 'rate==1' ], - // Listing individual metrics due to https://github.com/grafana/k6/issues/1321 - 'http_req_duration{name:Shopper - Site Root}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - Shop Page}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - Search Products}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - Category Page}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - Product Page}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - wc-ajax=add_to_cart}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - View Cart}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - Remove Item From Cart}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - wc-ajax=apply_coupon}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - Update Cart}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - View Checkout}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - wc-ajax=update_order_review}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - wc-ajax=checkout}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - Order Received}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - wc-ajax=get_refreshed_fragments}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - Login to Checkout}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - My Account Login Page}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - Login to My Account}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - My Account}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - My Account Orders}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Shopper - My Account Open Order}': [ - `${ shopper_request_threshold }`, - ], - 'http_req_duration{name:Merchant - WP Login Page}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - Login to WP Admin}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - WC-Admin}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - wc-analytics/orders?}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - wc-analytics/products/reviews?}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - wc-analytics/products/low-in-stock?}': - [ `${ merchant_request_threshold }` ], - 'http_req_duration{name:Merchant - All Orders}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - Completed Orders}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - New Order Page}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - Create New Order}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - Open Order}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - Update Existing Order Status}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - Search Orders By Product}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - Search Orders By Customer Email}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - Search Orders By Customer Address}': - [ `${ merchant_request_threshold }` ], - 'http_req_duration{name:Merchant - Filter Orders By Month}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - Filter Orders By Customer}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - All Products}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - Add New Product}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - action=sample-permalink}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - action=heartbeat autosave}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - Update New Product}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - Coupons}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - wc-admin/onboarding/tasks?}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - wc-analytics/admin/notes?}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:Merchant - wc-admin/options?options=woocommerce_ces_tracks_queue}': - [ `${ merchant_request_threshold }` ], - 'http_req_duration{name:Merchant - action=heartbeat}': [ - `${ merchant_request_threshold }`, - ], - 'http_req_duration{name:API - Create Order}': [ - `${ api_request_threshold }`, - ], - 'http_req_duration{name:API - Retrieve Order}': [ - `${ api_request_threshold }`, - ], - 'http_req_duration{name:API - Update Order (Status)}': [ - `${ api_request_threshold }`, - ], - 'http_req_duration{name:API - Delete Order}': [ - `${ api_request_threshold }`, - ], - 'http_req_duration{name:API - Batch Create Orders}': [ - `${ api_request_threshold }`, - ], - 'http_req_duration{name:API - Batch Update (Status) Orders}': [ - `${ api_request_threshold }`, - ], - }, -}; - -export function shopperBrowseFlow() { - homePage(); - shopPage(); - //categoryPage(); - searchProduct(); - singleProduct(); -} -export function checkoutGuestFlow() { - cart(); - checkoutGuest(); -} -export function checkoutCustomerLoginFlow() { - cart(); - checkoutCustomerLogin(); -} -export function myAccountFlow() { - myAccount(); - myAccountOrders(); -} -export function cartFlow() { - cartRemoveItem(); -} -export function allMerchantFlow() { - myAccountMerchantLogin(); - homeWCAdmin( { other: false, products: false, reviews: false } ); - addOrder( { heartbeat: false, other: false } ); - orders( { heartbeat: false, other: false } ); - ordersSearch(); - //addProduct( { heartbeat: false, other: false, permalink: false, update: false } ); - products(); - coupons(); -} - -export function allAPIFlow() { - ordersAPI(); -}