Updated k6 tests based on feedback
This commit is contained in:
parent
e501fa443b
commit
080f966b93
|
@ -38,7 +38,7 @@ export const product_url = __ENV.P_URL || 'beanie';
|
|||
export const product_id = __ENV.P_ID || '13';
|
||||
export const product_search_term = __ENV.P_TERM || 'beanie';
|
||||
|
||||
export const coupon_code = 'testing';
|
||||
export const coupon_code = __ENV.P_COUPON || 'testing';
|
||||
|
||||
export const add_product_title = 'Test Product';
|
||||
export const add_product_regular_price = '12';
|
||||
|
|
|
@ -67,7 +67,7 @@ export {
|
|||
commonRequestHeaders,
|
||||
commonGetRequestHeaders,
|
||||
commonAPIGetRequestHeaders,
|
||||
contentTypeRequestHeader,
|
||||
contentTypeRequestHeader,
|
||||
commonPostRequestHeaders,
|
||||
commonNonStandardHeaders,
|
||||
};
|
||||
|
|
|
@ -153,8 +153,8 @@ export function homeWCAdmin() {
|
|||
);
|
||||
|
||||
response = http.get(
|
||||
`${base_url}/wp-json/wc-analytics/products?page=1&per_page=1&low_in_stock=true&` +
|
||||
`status=publish&_fields%5B0%5D=id&_locale=user`,
|
||||
`${base_url}/wp-json/wc-analytics/products/low-in-stock?page=1&per_page=1&` +
|
||||
`low_in_stock=true&status=publish&_fields%5B0%5D=id&_locale=user`,
|
||||
{
|
||||
headers: requestHeaders,
|
||||
}
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
import { cart } from '../requests/shopper/cart.js';
|
||||
import { checkoutGuest } from '../requests/shopper/checkout-guest.js';
|
||||
|
||||
export let options = {
|
||||
scenarios: {
|
||||
checkoutFlowSpike: {
|
||||
executor: 'ramping-arrival-rate',
|
||||
startRate: 1,
|
||||
timeUnit: '1s',
|
||||
preAllocatedVUs: 1,
|
||||
maxVUs: 4,
|
||||
stages: [
|
||||
{ target: 3, duration: '30s' },
|
||||
{ target: 0, duration: '30s' },
|
||||
],
|
||||
exec: 'checkoutGuestFlow',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export function checkoutGuestFlow() {
|
||||
cart();
|
||||
checkoutGuest();
|
||||
}
|
Loading…
Reference in New Issue