Update daily smoke test to add k6 smoke tests (#33658)
* Add k6 test scenario to the daily smoke test action. * Add blank patch changelog for daily smoke update
This commit is contained in:
parent
23c7046df0
commit
def11b77d9
|
@ -85,6 +85,45 @@ jobs:
|
||||||
${{ env.API_TEST_REPORT_DIR }}/allure-report
|
${{ env.API_TEST_REPORT_DIR }}/allure-report
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
|
- name: Update performance test site with E2E test
|
||||||
|
if: always()
|
||||||
|
working-directory: plugins/woocommerce
|
||||||
|
env:
|
||||||
|
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_PERF_URL }}/
|
||||||
|
SMOKE_TEST_ADMIN_USER: ${{ secrets.SMOKE_TEST_PERF_ADMIN_USER }}
|
||||||
|
SMOKE_TEST_ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_PERF_ADMIN_PASSWORD }}
|
||||||
|
SMOKE_TEST_ADMIN_USER_EMAIL: ${{ secrets.SMOKE_TEST_ADMIN_USER_EMAIL }}
|
||||||
|
SMOKE_TEST_CUSTOMER_USER: ${{ secrets.SMOKE_TEST_CUSTOMER_USER }}
|
||||||
|
SMOKE_TEST_CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_CUSTOMER_PASSWORD }}
|
||||||
|
WC_E2E_SCREENSHOTS: 1
|
||||||
|
E2E_RETEST: 1
|
||||||
|
E2E_RETRY_TIMES: 0
|
||||||
|
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
||||||
|
E2E_SLACK_CHANNEL: ${{ secrets.SMOKE_TEST_SLACK_CHANNEL }}
|
||||||
|
UPDATE_WC: 1
|
||||||
|
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
||||||
|
run: |
|
||||||
|
pnpx wc-e2e test:e2e tests/e2e/specs/smoke-tests/update-woocommerce.js
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Install k6
|
||||||
|
if: always()
|
||||||
|
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
|
||||||
|
|
||||||
|
- name: Run k6 smoke tests
|
||||||
|
if: always()
|
||||||
|
env:
|
||||||
|
URL: ${{ secrets.SMOKE_TEST_PERF_URL }}
|
||||||
|
HOST: ${{ secrets.SMOKE_TEST_PERF_HOST }}
|
||||||
|
A_USER: ${{ secrets.SMOKE_TEST_PERF_ADMIN_USER }}
|
||||||
|
A_PW: ${{ secrets.SMOKE_TEST_PERF_ADMIN_PASSWORD }}
|
||||||
|
C_USER: ${{ secrets.SMOKE_TEST_PERF_ADMIN_USER }}
|
||||||
|
C_PW: ${{ secrets.SMOKE_TEST_PERF_ADMIN_PASSWORD }}
|
||||||
|
P_ID: 274
|
||||||
|
run: |
|
||||||
|
./k6 run plugins/woocommerce/tests/performance/tests/gh-action-daily-ext-requests.js
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build zip for PR
|
name: Build zip for PR
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: update
|
||||||
|
Comment: test related, not included in release
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,135 @@
|
||||||
|
/**
|
||||||
|
* 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 { coupons } from '../requests/merchant/coupons.js';
|
||||||
|
import { myAccount } from '../requests/shopper/my-account.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 { orders } from '../requests/merchant/orders.js';
|
||||||
|
import { ordersSearch } from '../requests/merchant/orders-search.js';
|
||||||
|
import { homeWCAdmin } from '../requests/merchant/home-wc-admin.js';
|
||||||
|
|
||||||
|
export const options = {
|
||||||
|
scenarios: {
|
||||||
|
homePageSmoke: {
|
||||||
|
executor: 'per-vu-iterations',
|
||||||
|
vus: 1,
|
||||||
|
iterations: 3,
|
||||||
|
maxDuration: '60s',
|
||||||
|
exec: 'homePageFlow',
|
||||||
|
},
|
||||||
|
shopPageSmoke: {
|
||||||
|
executor: 'per-vu-iterations',
|
||||||
|
vus: 1,
|
||||||
|
iterations: 3,
|
||||||
|
maxDuration: '60s',
|
||||||
|
startTime: '5s',
|
||||||
|
exec: 'shopPageFlow',
|
||||||
|
},
|
||||||
|
searchProductSmoke: {
|
||||||
|
executor: 'per-vu-iterations',
|
||||||
|
vus: 1,
|
||||||
|
iterations: 3,
|
||||||
|
maxDuration: '60s',
|
||||||
|
startTime: '10s',
|
||||||
|
exec: 'searchProductFlow',
|
||||||
|
},
|
||||||
|
singleProductSmoke: {
|
||||||
|
executor: 'per-vu-iterations',
|
||||||
|
vus: 1,
|
||||||
|
iterations: 3,
|
||||||
|
maxDuration: '60s',
|
||||||
|
startTime: '15s',
|
||||||
|
exec: 'singleProductFlow',
|
||||||
|
},
|
||||||
|
myAccountSmoke: {
|
||||||
|
executor: 'per-vu-iterations',
|
||||||
|
vus: 1,
|
||||||
|
iterations: 3,
|
||||||
|
maxDuration: '60s',
|
||||||
|
startTime: '20s',
|
||||||
|
exec: 'myAccountFlow',
|
||||||
|
},
|
||||||
|
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',
|
||||||
|
},
|
||||||
|
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',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
thresholds: {
|
||||||
|
checks: [ 'rate==1' ],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export function homePageFlow() {
|
||||||
|
homePage();
|
||||||
|
}
|
||||||
|
export function shopPageFlow() {
|
||||||
|
shopPage();
|
||||||
|
}
|
||||||
|
export function searchProductFlow() {
|
||||||
|
searchProduct();
|
||||||
|
}
|
||||||
|
export function singleProductFlow() {
|
||||||
|
singleProduct();
|
||||||
|
categoryPage();
|
||||||
|
}
|
||||||
|
export function checkoutGuestFlow() {
|
||||||
|
cart();
|
||||||
|
checkoutGuest();
|
||||||
|
}
|
||||||
|
export function checkoutCustomerLoginFlow() {
|
||||||
|
cart();
|
||||||
|
checkoutCustomerLogin();
|
||||||
|
}
|
||||||
|
export function myAccountFlow() {
|
||||||
|
myAccount();
|
||||||
|
}
|
||||||
|
export function cartFlow() {
|
||||||
|
cartRemoveItem();
|
||||||
|
}
|
||||||
|
export function allMerchantFlow() {
|
||||||
|
myAccountMerchantLogin();
|
||||||
|
homeWCAdmin();
|
||||||
|
orders();
|
||||||
|
ordersSearch();
|
||||||
|
products();
|
||||||
|
addProduct();
|
||||||
|
coupons();
|
||||||
|
}
|
Loading…
Reference in New Issue