From b7eb0a8c839ee3b720df85d90e43f916b2543eeb Mon Sep 17 00:00:00 2001 From: Nicole van der Hoeven Date: Thu, 28 Oct 2021 18:06:36 +0100 Subject: [PATCH] Initial commit --- .gitignore | 4 + challenge.js | 209 +++++ data/lotsausers.csv | 999 ++++++++++++++++++++++++ data/users.csv | 3 + data/users.json | 8 + endtoendloadtesting/home-login.js | 134 ++++ endtoendloadtesting/users.csv | 3 + flipcoin.js | 55 ++ globalresponsecallback.js | 22 + mot.js | 50 ++ nicolevdh.js | 89 +++ percentages.js | 28 + pokeapi-simplified.js | 63 ++ review-signal.js | 42 + simple.js | 16 + supersimple.js | 5 + test-sample.js | 39 + test-test_k6_io.js | 9 + testdata.js | 69 ++ wyrmwood/homepage.js | 1203 +++++++++++++++++++++++++++++ wyrmwood/wyrmwood.js | 8 + 21 files changed, 3058 insertions(+) create mode 100644 .gitignore create mode 100644 challenge.js create mode 100644 data/lotsausers.csv create mode 100644 data/users.csv create mode 100644 data/users.json create mode 100644 endtoendloadtesting/home-login.js create mode 100644 endtoendloadtesting/users.csv create mode 100644 flipcoin.js create mode 100644 globalresponsecallback.js create mode 100644 mot.js create mode 100644 nicolevdh.js create mode 100644 percentages.js create mode 100644 pokeapi-simplified.js create mode 100644 review-signal.js create mode 100644 simple.js create mode 100644 supersimple.js create mode 100644 test-sample.js create mode 100644 test-test_k6_io.js create mode 100644 testdata.js create mode 100644 wyrmwood/homepage.js create mode 100644 wyrmwood/wyrmwood.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e2da429 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +private +results +xk6-browser +.DS_Store \ No newline at end of file diff --git a/challenge.js b/challenge.js new file mode 100644 index 0000000..bedbcdd --- /dev/null +++ b/challenge.js @@ -0,0 +1,209 @@ +import http from "k6/http"; +import { parseHTML } from "k6/html"; +import { sleep, check } from "k6"; + +let debug = 1; +const domain = "https://challenge.flood.io"; +let stepIDVal = "NOT_FOUND"; +let authTokenVal = "NOT_FOUND"; +let largestOrderSelectedVal = "NOT_FOUND"; +let largestOrderVal = 0; +let challengerOrders = []; +let challengerValues = []; +let oneTimeToken = ''; + +export default function () { + Home(); + Step1_ClickStart(); + Step2_SubmitAge(); + Step3_SubmitHighestOrderValue(); + Step4_ClickNext(); + Step5_SubmitOTT(); +} + +export function Home() { + /************************* + * 01_HomePage + * Visit the homepage. + *************************/ + let res = http.get(domain, { tags: { name: "01_HomePage" } }); + check(res, { + "Home_text verification": (r) => r.body.includes("Ready to take the test?"), + }); + //Extract dynamic variables + let doc = parseHTML(res.body); + + stepIDVal = doc.find('input[name="challenger[step_id]"]').val(); + authTokenVal = doc.find('input[name="authenticity_token"]').val(); + + // console.log('stepIDVal = ', stepIDVal); + // console.log('authTokenVal = ', encodeURIComponent(authTokenVal)); + + if (debug == 0) { + sleep(Math.random() * 5); + } +} + +export function Step1_ClickStart() { + /************************* + * 02_Step1_ClickStart + * Click the start button. + *************************/ + let data = { + authenticity_token: authTokenVal, + "challenger[step_id]": stepIDVal, + "challenger[step_number]": "1", + commit: "Start", + }; + let res = http.post(domain + "/start", data); + check(res, { + "Step1_text verification": (r) => r.body.includes("Step 2"), + }); + + //Extract dynamic variables + let doc = parseHTML(res.body); + stepIDVal = doc.find('input[name="challenger[step_id]"]').val(); + authTokenVal = doc.find('input[name="authenticity_token"]').val(); +} + +export function Step2_SubmitAge() { + /************************* + * 03_Step2_SubmitAge + * From the dropdown menu, select 34 as the age and then click Next. + *************************/ + let data = { + authenticity_token: authTokenVal, + "challenger[step_id]": stepIDVal, + "challenger[step_number]": "2", + "challenger[age]": "34", + commit: "Next", + }; + let res = http.post(domain + "/start", data); + check(res, { + "Step2_text verification": (r) => r.body.includes("Step 3"), + }); + + //Extract dynamic variables + let doc = parseHTML(res.body); + stepIDVal = doc.find('input[name="challenger[step_id]"]').val(); + authTokenVal = doc.find('input[name="authenticity_token"]').val(); + let orderValues = doc + .find('label[class="collection_radio_buttons"]') + .toArray(); + let orderSelectedValues = doc + .find('input[name="challenger[order_selected]"]') + .toArray(); + + //Determine which among the extracted numbers is the largest and save that into a variable. + let i = 0; + let largestOrdinal = 0; //counter variable to get the ordinal for the largest order value + orderValues.forEach(function (element) { + // console.log(element.text()); + if (parseInt(element.text()) > largestOrderVal) { + largestOrderVal = parseInt(element.text()); + // console.log("largestOrderVal = ", largestOrderVal); + largestOrdinal = i; + // console.log("largestOrdinal = ", largestOrdinal); + } + i++; + }); + + //Get the order selected value string corresponding to the largest number. + largestOrderSelectedVal = orderSelectedValues[largestOrdinal].val(); + // console.log("largest selected order value is", largestOrderSelectedVal); +} + +export function Step3_SubmitHighestOrderValue() { + /************************* + * 04_Step3_SubmitHighestOrderValue + * Select the radio buton with the highest number. + * Enter the highest number as a string in the text box. + * Click Next. + *************************/ + + let data = { + authenticity_token: authTokenVal, + "challenger[step_id]": stepIDVal, + "challenger[step_number]": "3", + "challenger[largest_order]": largestOrderVal, + "challenger[order_selected]": largestOrderSelectedVal, + commit: "Next", + }; + let res = http.post(domain + "/start", data); + check(res, { + "Step3_text verification": (r) => r.body.includes("Step 4"), + }); + // Extract dynamic variables + let doc = parseHTML(res.body); + stepIDVal = doc.find('input[name="challenger[step_id]"]').val(); + authTokenVal = doc.find('input[name="authenticity_token"]').val(); + + // Extract dynamic challenger orders and values + let challengerOrderRegex = /name="(challenger\[order_[0-9]+\])" type="hidden" value="([0-9]+)"/g; + let challengerMatch; + while ((challengerMatch = challengerOrderRegex.exec(res.body))) { + // console.log('challengerMatch: ', challengerMatch); + + challengerOrders.push(challengerMatch[1]); // challenger[order_1] + challengerValues.push(challengerMatch[2]); // 1612534938 + } + // console.log('challengerOrders: ', challengerOrders); + // console.log('challengerValues: ', challengerValues); +} + +export function Step4_ClickNext() { + /************************* + * 05_Step4_ClickNext + * Click Next. + *************************/ + // console.log(challengerOrders[0], ":", challengerValues[0]); + let i = 0; + let data = { + authenticity_token: authTokenVal, + "challenger[step_id]": stepIDVal, + "challenger[step_number]": "4", + commit: "Next", + }; + challengerOrders.forEach(function(item){ + data[item] = challengerValues[i]; + i++ + }); + + let res = http.post(domain + "/start", data); + check(res, { + "Step4_text verification": (r) => r.body.includes("Step 5"), + }); + + // Extract dynamic variables + let doc = parseHTML(res.body); + stepIDVal = doc.find('input[name="challenger[step_id]"]').val(); + authTokenVal = doc.find('input[name="authenticity_token"]').val(); + + // Get code + res = http.get(domain + "/code"); + doc = JSON.parse(res.body); + oneTimeToken = doc.code; + // console.log('oneTimeToken =', oneTimeToken); +} + +export function Step5_SubmitOTT() { + /************************* + * 06_Step5_SubmitOTT + * Copy the token. + * Paste the token in the text field. + * Click Next. + *************************/ + let data = { + authenticity_token: authTokenVal, + "challenger[step_id]": stepIDVal, + "challenger[step_number]": "5", + "challenger[one_time_token]": oneTimeToken, + commit: "Next", + }; + + let res = http.post(domain + "/start", data); + check(res, { + "Step5_text verification": (r) => r.body.includes("You're Done"), + }); + console.log(res.body); +} \ No newline at end of file diff --git a/data/lotsausers.csv b/data/lotsausers.csv new file mode 100644 index 0000000..3756dd5 --- /dev/null +++ b/data/lotsausers.csv @@ -0,0 +1,999 @@ +username,password +admin,123 +test_user,1234 +test_user2,1234 +test_user3,1234 +test_user4,1234 +test_user5,1234 +test_user6,1234 +test_user7,1234 +test_user8,1234 +test_user9,1234 +test_user10,1234 +test_user11,1234 +test_user12,1234 +test_user13,1234 +test_user14,1234 +test_user15,1234 +test_user16,1234 +test_user17,1234 +test_user18,1234 +test_user19,1234 +test_user20,1234 +test_user21,1234 +test_user22,1234 +test_user23,1234 +test_user24,1234 +test_user25,1234 +test_user26,1234 +test_user27,1234 +test_user28,1234 +test_user29,1234 +test_user30,1234 +test_user31,1234 +test_user32,1234 +test_user33,1234 +test_user34,1234 +test_user35,1234 +test_user36,1234 +test_user37,1234 +test_user38,1234 +test_user39,1234 +test_user40,1234 +test_user41,1234 +test_user42,1234 +test_user43,1234 +test_user44,1234 +test_user45,1234 +test_user46,1234 +test_user47,1234 +test_user48,1234 +test_user49,1234 +test_user50,1234 +test_user51,1234 +test_user52,1234 +test_user53,1234 +test_user54,1234 +test_user55,1234 +test_user56,1234 +test_user57,1234 +test_user58,1234 +test_user59,1234 +test_user60,1234 +test_user61,1234 +test_user62,1234 +test_user63,1234 +test_user64,1234 +test_user65,1234 +test_user66,1234 +test_user67,1234 +test_user68,1234 +test_user69,1234 +test_user70,1234 +test_user71,1234 +test_user72,1234 +test_user73,1234 +test_user74,1234 +test_user75,1234 +test_user76,1234 +test_user77,1234 +test_user78,1234 +test_user79,1234 +test_user80,1234 +test_user81,1234 +test_user82,1234 +test_user83,1234 +test_user84,1234 +test_user85,1234 +test_user86,1234 +test_user87,1234 +test_user88,1234 +test_user89,1234 +test_user90,1234 +test_user91,1234 +test_user92,1234 +test_user93,1234 +test_user94,1234 +test_user95,1234 +test_user96,1234 +test_user97,1234 +test_user98,1234 +test_user99,1234 +test_user100,1234 +test_user101,1234 +test_user102,1234 +test_user103,1234 +test_user104,1234 +test_user105,1234 +test_user106,1234 +test_user107,1234 +test_user108,1234 +test_user109,1234 +test_user110,1234 +test_user111,1234 +test_user112,1234 +test_user113,1234 +test_user114,1234 +test_user115,1234 +test_user116,1234 +test_user117,1234 +test_user118,1234 +test_user119,1234 +test_user120,1234 +test_user121,1234 +test_user122,1234 +test_user123,1234 +test_user124,1234 +test_user125,1234 +test_user126,1234 +test_user127,1234 +test_user128,1234 +test_user129,1234 +test_user130,1234 +test_user131,1234 +test_user132,1234 +test_user133,1234 +test_user134,1234 +test_user135,1234 +test_user136,1234 +test_user137,1234 +test_user138,1234 +test_user139,1234 +test_user140,1234 +test_user141,1234 +test_user142,1234 +test_user143,1234 +test_user144,1234 +test_user145,1234 +test_user146,1234 +test_user147,1234 +test_user148,1234 +test_user149,1234 +test_user150,1234 +test_user151,1234 +test_user152,1234 +test_user153,1234 +test_user154,1234 +test_user155,1234 +test_user156,1234 +test_user157,1234 +test_user158,1234 +test_user159,1234 +test_user160,1234 +test_user161,1234 +test_user162,1234 +test_user163,1234 +test_user164,1234 +test_user165,1234 +test_user166,1234 +test_user167,1234 +test_user168,1234 +test_user169,1234 +test_user170,1234 +test_user171,1234 +test_user172,1234 +test_user173,1234 +test_user174,1234 +test_user175,1234 +test_user176,1234 +test_user177,1234 +test_user178,1234 +test_user179,1234 +test_user180,1234 +test_user181,1234 +test_user182,1234 +test_user183,1234 +test_user184,1234 +test_user185,1234 +test_user186,1234 +test_user187,1234 +test_user188,1234 +test_user189,1234 +test_user190,1234 +test_user191,1234 +test_user192,1234 +test_user193,1234 +test_user194,1234 +test_user195,1234 +test_user196,1234 +test_user197,1234 +test_user198,1234 +test_user199,1234 +test_user200,1234 +test_user201,1234 +test_user202,1234 +test_user203,1234 +test_user204,1234 +test_user205,1234 +test_user206,1234 +test_user207,1234 +test_user208,1234 +test_user209,1234 +test_user210,1234 +test_user211,1234 +test_user212,1234 +test_user213,1234 +test_user214,1234 +test_user215,1234 +test_user216,1234 +test_user217,1234 +test_user218,1234 +test_user219,1234 +test_user220,1234 +test_user221,1234 +test_user222,1234 +test_user223,1234 +test_user224,1234 +test_user225,1234 +test_user226,1234 +test_user227,1234 +test_user228,1234 +test_user229,1234 +test_user230,1234 +test_user231,1234 +test_user232,1234 +test_user233,1234 +test_user234,1234 +test_user235,1234 +test_user236,1234 +test_user237,1234 +test_user238,1234 +test_user239,1234 +test_user240,1234 +test_user241,1234 +test_user242,1234 +test_user243,1234 +test_user244,1234 +test_user245,1234 +test_user246,1234 +test_user247,1234 +test_user248,1234 +test_user249,1234 +test_user250,1234 +test_user251,1234 +test_user252,1234 +test_user253,1234 +test_user254,1234 +test_user255,1234 +test_user256,1234 +test_user257,1234 +test_user258,1234 +test_user259,1234 +test_user260,1234 +test_user261,1234 +test_user262,1234 +test_user263,1234 +test_user264,1234 +test_user265,1234 +test_user266,1234 +test_user267,1234 +test_user268,1234 +test_user269,1234 +test_user270,1234 +test_user271,1234 +test_user272,1234 +test_user273,1234 +test_user274,1234 +test_user275,1234 +test_user276,1234 +test_user277,1234 +test_user278,1234 +test_user279,1234 +test_user280,1234 +test_user281,1234 +test_user282,1234 +test_user283,1234 +test_user284,1234 +test_user285,1234 +test_user286,1234 +test_user287,1234 +test_user288,1234 +test_user289,1234 +test_user290,1234 +test_user291,1234 +test_user292,1234 +test_user293,1234 +test_user294,1234 +test_user295,1234 +test_user296,1234 +test_user297,1234 +test_user298,1234 +test_user299,1234 +test_user300,1234 +test_user301,1234 +test_user302,1234 +test_user303,1234 +test_user304,1234 +test_user305,1234 +test_user306,1234 +test_user307,1234 +test_user308,1234 +test_user309,1234 +test_user310,1234 +test_user311,1234 +test_user312,1234 +test_user313,1234 +test_user314,1234 +test_user315,1234 +test_user316,1234 +test_user317,1234 +test_user318,1234 +test_user319,1234 +test_user320,1234 +test_user321,1234 +test_user322,1234 +test_user323,1234 +test_user324,1234 +test_user325,1234 +test_user326,1234 +test_user327,1234 +test_user328,1234 +test_user329,1234 +test_user330,1234 +test_user331,1234 +test_user332,1234 +test_user333,1234 +test_user334,1234 +test_user335,1234 +test_user336,1234 +test_user337,1234 +test_user338,1234 +test_user339,1234 +test_user340,1234 +test_user341,1234 +test_user342,1234 +test_user343,1234 +test_user344,1234 +test_user345,1234 +test_user346,1234 +test_user347,1234 +test_user348,1234 +test_user349,1234 +test_user350,1234 +test_user351,1234 +test_user352,1234 +test_user353,1234 +test_user354,1234 +test_user355,1234 +test_user356,1234 +test_user357,1234 +test_user358,1234 +test_user359,1234 +test_user360,1234 +test_user361,1234 +test_user362,1234 +test_user363,1234 +test_user364,1234 +test_user365,1234 +test_user366,1234 +test_user367,1234 +test_user368,1234 +test_user369,1234 +test_user370,1234 +test_user371,1234 +test_user372,1234 +test_user373,1234 +test_user374,1234 +test_user375,1234 +test_user376,1234 +test_user377,1234 +test_user378,1234 +test_user379,1234 +test_user380,1234 +test_user381,1234 +test_user382,1234 +test_user383,1234 +test_user384,1234 +test_user385,1234 +test_user386,1234 +test_user387,1234 +test_user388,1234 +test_user389,1234 +test_user390,1234 +test_user391,1234 +test_user392,1234 +test_user393,1234 +test_user394,1234 +test_user395,1234 +test_user396,1234 +test_user397,1234 +test_user398,1234 +test_user399,1234 +test_user400,1234 +test_user401,1234 +test_user402,1234 +test_user403,1234 +test_user404,1234 +test_user405,1234 +test_user406,1234 +test_user407,1234 +test_user408,1234 +test_user409,1234 +test_user410,1234 +test_user411,1234 +test_user412,1234 +test_user413,1234 +test_user414,1234 +test_user415,1234 +test_user416,1234 +test_user417,1234 +test_user418,1234 +test_user419,1234 +test_user420,1234 +test_user421,1234 +test_user422,1234 +test_user423,1234 +test_user424,1234 +test_user425,1234 +test_user426,1234 +test_user427,1234 +test_user428,1234 +test_user429,1234 +test_user430,1234 +test_user431,1234 +test_user432,1234 +test_user433,1234 +test_user434,1234 +test_user435,1234 +test_user436,1234 +test_user437,1234 +test_user438,1234 +test_user439,1234 +test_user440,1234 +test_user441,1234 +test_user442,1234 +test_user443,1234 +test_user444,1234 +test_user445,1234 +test_user446,1234 +test_user447,1234 +test_user448,1234 +test_user449,1234 +test_user450,1234 +test_user451,1234 +test_user452,1234 +test_user453,1234 +test_user454,1234 +test_user455,1234 +test_user456,1234 +test_user457,1234 +test_user458,1234 +test_user459,1234 +test_user460,1234 +test_user461,1234 +test_user462,1234 +test_user463,1234 +test_user464,1234 +test_user465,1234 +test_user466,1234 +test_user467,1234 +test_user468,1234 +test_user469,1234 +test_user470,1234 +test_user471,1234 +test_user472,1234 +test_user473,1234 +test_user474,1234 +test_user475,1234 +test_user476,1234 +test_user477,1234 +test_user478,1234 +test_user479,1234 +test_user480,1234 +test_user481,1234 +test_user482,1234 +test_user483,1234 +test_user484,1234 +test_user485,1234 +test_user486,1234 +test_user487,1234 +test_user488,1234 +test_user489,1234 +test_user490,1234 +test_user491,1234 +test_user492,1234 +test_user493,1234 +test_user494,1234 +test_user495,1234 +test_user496,1234 +test_user497,1234 +test_user498,1234 +test_user499,1234 +test_user500,1234 +test_user501,1234 +test_user502,1234 +test_user503,1234 +test_user504,1234 +test_user505,1234 +test_user506,1234 +test_user507,1234 +test_user508,1234 +test_user509,1234 +test_user510,1234 +test_user511,1234 +test_user512,1234 +test_user513,1234 +test_user514,1234 +test_user515,1234 +test_user516,1234 +test_user517,1234 +test_user518,1234 +test_user519,1234 +test_user520,1234 +test_user521,1234 +test_user522,1234 +test_user523,1234 +test_user524,1234 +test_user525,1234 +test_user526,1234 +test_user527,1234 +test_user528,1234 +test_user529,1234 +test_user530,1234 +test_user531,1234 +test_user532,1234 +test_user533,1234 +test_user534,1234 +test_user535,1234 +test_user536,1234 +test_user537,1234 +test_user538,1234 +test_user539,1234 +test_user540,1234 +test_user541,1234 +test_user542,1234 +test_user543,1234 +test_user544,1234 +test_user545,1234 +test_user546,1234 +test_user547,1234 +test_user548,1234 +test_user549,1234 +test_user550,1234 +test_user551,1234 +test_user552,1234 +test_user553,1234 +test_user554,1234 +test_user555,1234 +test_user556,1234 +test_user557,1234 +test_user558,1234 +test_user559,1234 +test_user560,1234 +test_user561,1234 +test_user562,1234 +test_user563,1234 +test_user564,1234 +test_user565,1234 +test_user566,1234 +test_user567,1234 +test_user568,1234 +test_user569,1234 +test_user570,1234 +test_user571,1234 +test_user572,1234 +test_user573,1234 +test_user574,1234 +test_user575,1234 +test_user576,1234 +test_user577,1234 +test_user578,1234 +test_user579,1234 +test_user580,1234 +test_user581,1234 +test_user582,1234 +test_user583,1234 +test_user584,1234 +test_user585,1234 +test_user586,1234 +test_user587,1234 +test_user588,1234 +test_user589,1234 +test_user590,1234 +test_user591,1234 +test_user592,1234 +test_user593,1234 +test_user594,1234 +test_user595,1234 +test_user596,1234 +test_user597,1234 +test_user598,1234 +test_user599,1234 +test_user600,1234 +test_user601,1234 +test_user602,1234 +test_user603,1234 +test_user604,1234 +test_user605,1234 +test_user606,1234 +test_user607,1234 +test_user608,1234 +test_user609,1234 +test_user610,1234 +test_user611,1234 +test_user612,1234 +test_user613,1234 +test_user614,1234 +test_user615,1234 +test_user616,1234 +test_user617,1234 +test_user618,1234 +test_user619,1234 +test_user620,1234 +test_user621,1234 +test_user622,1234 +test_user623,1234 +test_user624,1234 +test_user625,1234 +test_user626,1234 +test_user627,1234 +test_user628,1234 +test_user629,1234 +test_user630,1234 +test_user631,1234 +test_user632,1234 +test_user633,1234 +test_user634,1234 +test_user635,1234 +test_user636,1234 +test_user637,1234 +test_user638,1234 +test_user639,1234 +test_user640,1234 +test_user641,1234 +test_user642,1234 +test_user643,1234 +test_user644,1234 +test_user645,1234 +test_user646,1234 +test_user647,1234 +test_user648,1234 +test_user649,1234 +test_user650,1234 +test_user651,1234 +test_user652,1234 +test_user653,1234 +test_user654,1234 +test_user655,1234 +test_user656,1234 +test_user657,1234 +test_user658,1234 +test_user659,1234 +test_user660,1234 +test_user661,1234 +test_user662,1234 +test_user663,1234 +test_user664,1234 +test_user665,1234 +test_user666,1234 +test_user667,1234 +test_user668,1234 +test_user669,1234 +test_user670,1234 +test_user671,1234 +test_user672,1234 +test_user673,1234 +test_user674,1234 +test_user675,1234 +test_user676,1234 +test_user677,1234 +test_user678,1234 +test_user679,1234 +test_user680,1234 +test_user681,1234 +test_user682,1234 +test_user683,1234 +test_user684,1234 +test_user685,1234 +test_user686,1234 +test_user687,1234 +test_user688,1234 +test_user689,1234 +test_user690,1234 +test_user691,1234 +test_user692,1234 +test_user693,1234 +test_user694,1234 +test_user695,1234 +test_user696,1234 +test_user697,1234 +test_user698,1234 +test_user699,1234 +test_user700,1234 +test_user701,1234 +test_user702,1234 +test_user703,1234 +test_user704,1234 +test_user705,1234 +test_user706,1234 +test_user707,1234 +test_user708,1234 +test_user709,1234 +test_user710,1234 +test_user711,1234 +test_user712,1234 +test_user713,1234 +test_user714,1234 +test_user715,1234 +test_user716,1234 +test_user717,1234 +test_user718,1234 +test_user719,1234 +test_user720,1234 +test_user721,1234 +test_user722,1234 +test_user723,1234 +test_user724,1234 +test_user725,1234 +test_user726,1234 +test_user727,1234 +test_user728,1234 +test_user729,1234 +test_user730,1234 +test_user731,1234 +test_user732,1234 +test_user733,1234 +test_user734,1234 +test_user735,1234 +test_user736,1234 +test_user737,1234 +test_user738,1234 +test_user739,1234 +test_user740,1234 +test_user741,1234 +test_user742,1234 +test_user743,1234 +test_user744,1234 +test_user745,1234 +test_user746,1234 +test_user747,1234 +test_user748,1234 +test_user749,1234 +test_user750,1234 +test_user751,1234 +test_user752,1234 +test_user753,1234 +test_user754,1234 +test_user755,1234 +test_user756,1234 +test_user757,1234 +test_user758,1234 +test_user759,1234 +test_user760,1234 +test_user761,1234 +test_user762,1234 +test_user763,1234 +test_user764,1234 +test_user765,1234 +test_user766,1234 +test_user767,1234 +test_user768,1234 +test_user769,1234 +test_user770,1234 +test_user771,1234 +test_user772,1234 +test_user773,1234 +test_user774,1234 +test_user775,1234 +test_user776,1234 +test_user777,1234 +test_user778,1234 +test_user779,1234 +test_user780,1234 +test_user781,1234 +test_user782,1234 +test_user783,1234 +test_user784,1234 +test_user785,1234 +test_user786,1234 +test_user787,1234 +test_user788,1234 +test_user789,1234 +test_user790,1234 +test_user791,1234 +test_user792,1234 +test_user793,1234 +test_user794,1234 +test_user795,1234 +test_user796,1234 +test_user797,1234 +test_user798,1234 +test_user799,1234 +test_user800,1234 +test_user801,1234 +test_user802,1234 +test_user803,1234 +test_user804,1234 +test_user805,1234 +test_user806,1234 +test_user807,1234 +test_user808,1234 +test_user809,1234 +test_user810,1234 +test_user811,1234 +test_user812,1234 +test_user813,1234 +test_user814,1234 +test_user815,1234 +test_user816,1234 +test_user817,1234 +test_user818,1234 +test_user819,1234 +test_user820,1234 +test_user821,1234 +test_user822,1234 +test_user823,1234 +test_user824,1234 +test_user825,1234 +test_user826,1234 +test_user827,1234 +test_user828,1234 +test_user829,1234 +test_user830,1234 +test_user831,1234 +test_user832,1234 +test_user833,1234 +test_user834,1234 +test_user835,1234 +test_user836,1234 +test_user837,1234 +test_user838,1234 +test_user839,1234 +test_user840,1234 +test_user841,1234 +test_user842,1234 +test_user843,1234 +test_user844,1234 +test_user845,1234 +test_user846,1234 +test_user847,1234 +test_user848,1234 +test_user849,1234 +test_user850,1234 +test_user851,1234 +test_user852,1234 +test_user853,1234 +test_user854,1234 +test_user855,1234 +test_user856,1234 +test_user857,1234 +test_user858,1234 +test_user859,1234 +test_user860,1234 +test_user861,1234 +test_user862,1234 +test_user863,1234 +test_user864,1234 +test_user865,1234 +test_user866,1234 +test_user867,1234 +test_user868,1234 +test_user869,1234 +test_user870,1234 +test_user871,1234 +test_user872,1234 +test_user873,1234 +test_user874,1234 +test_user875,1234 +test_user876,1234 +test_user877,1234 +test_user878,1234 +test_user879,1234 +test_user880,1234 +test_user881,1234 +test_user882,1234 +test_user883,1234 +test_user884,1234 +test_user885,1234 +test_user886,1234 +test_user887,1234 +test_user888,1234 +test_user889,1234 +test_user890,1234 +test_user891,1234 +test_user892,1234 +test_user893,1234 +test_user894,1234 +test_user895,1234 +test_user896,1234 +test_user897,1234 +test_user898,1234 +test_user899,1234 +test_user900,1234 +test_user901,1234 +test_user902,1234 +test_user903,1234 +test_user904,1234 +test_user905,1234 +test_user906,1234 +test_user907,1234 +test_user908,1234 +test_user909,1234 +test_user910,1234 +test_user911,1234 +test_user912,1234 +test_user913,1234 +test_user914,1234 +test_user915,1234 +test_user916,1234 +test_user917,1234 +test_user918,1234 +test_user919,1234 +test_user920,1234 +test_user921,1234 +test_user922,1234 +test_user923,1234 +test_user924,1234 +test_user925,1234 +test_user926,1234 +test_user927,1234 +test_user928,1234 +test_user929,1234 +test_user930,1234 +test_user931,1234 +test_user932,1234 +test_user933,1234 +test_user934,1234 +test_user935,1234 +test_user936,1234 +test_user937,1234 +test_user938,1234 +test_user939,1234 +test_user940,1234 +test_user941,1234 +test_user942,1234 +test_user943,1234 +test_user944,1234 +test_user945,1234 +test_user946,1234 +test_user947,1234 +test_user948,1234 +test_user949,1234 +test_user950,1234 +test_user951,1234 +test_user952,1234 +test_user953,1234 +test_user954,1234 +test_user955,1234 +test_user956,1234 +test_user957,1234 +test_user958,1234 +test_user959,1234 +test_user960,1234 +test_user961,1234 +test_user962,1234 +test_user963,1234 +test_user964,1234 +test_user965,1234 +test_user966,1234 +test_user967,1234 +test_user968,1234 +test_user969,1234 +test_user970,1234 +test_user971,1234 +test_user972,1234 +test_user973,1234 +test_user974,1234 +test_user975,1234 +test_user976,1234 +test_user977,1234 +test_user978,1234 +test_user979,1234 +test_user980,1234 +test_user981,1234 +test_user982,1234 +test_user983,1234 +test_user984,1234 +test_user985,1234 +test_user986,1234 +test_user987,1234 +test_user988,1234 +test_user989,1234 +test_user990,1234 +test_user991,1234 +test_user992,1234 +test_user993,1234 +test_user994,1234 +test_user995,1234 +test_user996,1234 +test_user997,1234 diff --git a/data/users.csv b/data/users.csv new file mode 100644 index 0000000..c999a69 --- /dev/null +++ b/data/users.csv @@ -0,0 +1,3 @@ +username,password +admin,123 +test_user,1234 \ No newline at end of file diff --git a/data/users.json b/data/users.json new file mode 100644 index 0000000..4f4e6fc --- /dev/null +++ b/data/users.json @@ -0,0 +1,8 @@ +{ + + "users": [ + { "username": "admin", "password": "123" }, + { "username": "test", "password": "1234" }, + { "username": "invaliduser", "password": "password"} + ] +} \ No newline at end of file diff --git a/endtoendloadtesting/home-login.js b/endtoendloadtesting/home-login.js new file mode 100644 index 0000000..032a9fc --- /dev/null +++ b/endtoendloadtesting/home-login.js @@ -0,0 +1,134 @@ +import http from 'k6/http'; +import { sleep, check } from 'k6'; +import { parseHTML } from "k6/html"; +import papaparse from 'https://jslib.k6.io/papaparse/5.1.1/index.js'; +import { SharedArray } from "k6/data"; + +const domain = 'https://test.k6.io'; // Parameterize the domain to make it easier to change environments. +let token = 'NOT FOUND'; // Initialize the csrftoken variable. + +/* +Set up k6 to read from a CSV file named users.csv, which has two columns: username and password. +This uses a shared array so that the data is only sent to the virtual user at runtime when it is needed. +For more information on the shared array, check out: https://k6.io/docs/javascript-api/k6-data/sharedarray/ +*/ +const sharedData = new SharedArray("Shared Logins", function() { + let data = papaparse.parse(open('users.csv'), { header: true }).data; + return data; +}); + +/* +Set up two scenarios to run concurrently. +The first scenario involves 20 users visiting the homepage. +The second scenario involves 5 users navigating to the Messages page and then logging in. +Both scenarios ramp up for 5 minutes, hold steady for 10 minutes, and then ramp down within 1 minute. +*/ +export let options = { + scenarios: { + home: { + executor: 'ramping-vus', + exec: 'S01_HomeOnly', + startVUs: 0, + stages: [ + { duration: '300s', target: 20 }, + { duration: '600s', target: 20 }, + ], + gracefulRampDown: '60s', + }, + messages: { + executor: 'ramping-vus', + exec: 'S02_MessagesLogin', + startVUs: 0, + stages: [ + { duration: '300s', target: 5 }, + { duration: '600s', target: 5 }, + ], + }, + }, + // Set limits for acceptable performance during the load test. + thresholds: { + http_req_failed: ['rate<0.05'], // The HTTP error rate (HTTP 4xx or 5xx) should be less than 5%. + http_req_duration: ['p(95)<3000'], // 95% of requests should be below 3000 ms. + checks: ['rate>0.95'], // Checks should have a success rate of greater than 95%. + }, +}; + +// Define Scenario 1. +export function S01_HomeOnly () { + VisitHomePage(); +} + +// Define Scenario 2. +export function S02_MessagesLogin () { + VisitMessagesPage(); + LogIn(); +} + +//Visit the Home page. +export function VisitHomePage () { + // Do an HTTP GET of the homepage, and name this request 01_Home for ease of analysis. + let response = http.get(domain, {tags: { name: '01_Home' }}); + + // Verify text returned in the response. An HTTP 200 response means a page was returned; not necessarily the right one. + check(response, { + '01 - home page should contain expected body': (r) => r.body.includes("Collection of simple web-pages suitable for load testing") + }); + + // Add dynamic think time between 0 and 4s. + sleep(Math.random() * 5); +} + +export function VisitMessagesPage () { + // Visit the Messages page and call this request 02_Messages for ease of analysis. + let messagesUrl = `${domain}/my_messages.php`; + let options = { + tags: { + name: '02_Messages', + }, + }; + let response = http.get(messagesUrl, options); + + // Verify that "Unauthorized" is returned in the response. + check(response, { + '02 - messages page should contain expected body': (r) => r.body.includes("Unauthorized") + }); + + // Extract the csrfToken, which has a dynamic value, from the response. + let doc = parseHTML(response.body); + token = doc.find('input[name="csrftoken"]').val(); + + // Write the token to log for debugging purposes. + // console.log('token:', token); + + // Add dynamic think time between 0 and 14s to allow for time to type login credentials. + sleep(Math.random() * 15); +} + +export function LogIn () { + + // Get random user from shared array created using the CSV file users.csv. + let randomUser = sharedData[Math.floor(Math.random() * sharedData.length)] + + // Define the parameters to be sent with the HTTP POST, including credentials from users.csv. + let params = { + redir: '1', + login: randomUser.username, + password: randomUser.password, + csrftoken: token, + } + + // Submit login credentials via an HTTP POST. + let response = http.post( + domain + '/login.php', + params, + {tags: { name: '03_MessagesLogIn' }} + ); + + // Verify successful login by checking that the response contains "Welcome, username!" + check(response, { + '03_user should be logged in': (r) => r.body.includes('Welcome, ', randomUser.username, '!') + }); + + // Add dynamic think time between 0 and 4s. + sleep(Math.random() * 4); +} \ No newline at end of file diff --git a/endtoendloadtesting/users.csv b/endtoendloadtesting/users.csv new file mode 100644 index 0000000..c999a69 --- /dev/null +++ b/endtoendloadtesting/users.csv @@ -0,0 +1,3 @@ +username,password +admin,123 +test_user,1234 \ No newline at end of file diff --git a/flipcoin.js b/flipcoin.js new file mode 100644 index 0000000..637f370 --- /dev/null +++ b/flipcoin.js @@ -0,0 +1,55 @@ +import http from 'k6/http'; +import { sleep, check } from 'k6'; + +export let options = { + ext: { + loadimpact: { + projectID: 3515857, + // Test runs with the same name groups test runs together + name: "k6 OSS-Flip the coin" + } + }, + scenarios: { + sustain: { + executor: 'ramping-vus', + startVUs: 0, + stages: [ + { duration: '30s', target: 100 }, + { duration: '60s', target: 100 }, + { duration: '30s', target: 0 } + ], + gracefulRampDown: '0s', + }, + }, + thresholds: { + 'http_reqs{expected_response:true}': ['rate>=1'], + } +}; + +export default function () { + let domain='http://test.k6.io/'; + + let res = http.get(domain, {tags: { name: '01_Home' }}); + check(res, { + 'is status 200': (r) => r.status === 200, + 'text verification': (r) => r.body.includes("Collection of simple web-pages suitable for load testing") + }); + sleep(Math.random() * 5); + + res = http.get(domain + 'flip_coin.php', { + tags: { name: '02_VisitFlipCoin' }}); + check(res, { + 'is status 200': (r) => r.status === 200, + 'text verification': (r) => r.body.includes("Your bet"), + }); + sleep(Math.random() * 5); + + let data = {bet: 'heads'} + res = http.post(domain + 'flip_coin.php', data, { + tags: { name: '03_ClickHeads' }}); + check(res, { + 'is status 200': (r) => r.status === 200, + 'text verification': (r) => r.body.includes("Your bet: heads"), + }); + sleep(Math.random() * 5); +} diff --git a/globalresponsecallback.js b/globalresponsecallback.js new file mode 100644 index 0000000..25ae111 --- /dev/null +++ b/globalresponsecallback.js @@ -0,0 +1,22 @@ +import http from 'k6/http'; +import { check, sleep } from 'k6'; + +http.setResponseCallback(http.expectedStatuses(400)); + +export const options = { + vus: 10, + duration: '1m', +} + +export default function () { + + // I expect this request to return an HTTP 404. + let response = http.get('https://httpbin.test.k6.io/status/400'); + check(response, { + 'is status 400': (r) => r.status === 400, + }); + + sleep(1); + + http.get('https://test.k6.io'); +} diff --git a/mot.js b/mot.js new file mode 100644 index 0000000..680f8b6 --- /dev/null +++ b/mot.js @@ -0,0 +1,50 @@ +import http from 'k6/http'; +import { sleep, check } from 'k6'; + +// export const options = { +// duration: '10m', +// vus: 50, +// thresholds: { +// http_req_duration: ['p(95)<500'], +// }, +// }; + +const domain = 'http://nicole.com.ph'; + +export default function () { + Home(); + // ViewProduct(); + // AddToCart(); +} + +export function Home() { + let res = http.get(domain, {tags: { name: '01_Home' }}); + check(res, { + 'is status 200': (r) => r.status === 200, + '01-text verification': (r) => r.body.includes("Free shipping with $75 purchase!") + }); + sleep(Math.random() * 5); +} + +export function ViewProduct () { + let res = http.get(domain + '/product/OLJCESPC7Z', {tags: { name: '02_ViewProduct' }}); + check(res, { + 'is status 200': (r) => r.status === 200, + '02-text verification': (r) => r.body.includes("Add to Cart") + }); + sleep(Math.random() * 5); +} + +export function AddToCart () { + let productid = 'OLJCESPC7Z'; + let params = { + product_id: productid, + quantity: 1, + }; + let res = http.post(domain + '/cart', params, {tags: { name: '03_AddToCart' }}); + check(res, { + 'is status 200': (r) => r.status === 200, + '03-text verification': (r) => r.body.includes("SKU: #OLJCESPC7Z") + }); + sleep(Math.random() * 5); +} \ No newline at end of file diff --git a/nicolevdh.js b/nicolevdh.js new file mode 100644 index 0000000..7103512 --- /dev/null +++ b/nicolevdh.js @@ -0,0 +1,89 @@ +import http, { batch } from 'k6/http'; +import { sleep, check, group } from 'k6'; + +export const options = { + duration: '5m', + vus: 5, + thresholds: { + 'group_duration{group:::Home}': ['p(90)<1000'], + 'group_duration{group:::Notes}': ['p(90)<2000'], + http_req_failed: ['rate<0.05'], + checks: ['rate>0.97'], + }, + ext: { + loadimpact: { + projectID: 3548222, + name: "nicolevdh.com", + distribution: { + europe: { loadZone: 'amazon:gb:london', percent: 20 }, + namerica: { loadZone: 'amazon:us:ashburn', percent: 20 }, + asia: { loadZone: 'amazon:sg:singapore', percent: 20 }, + australia: { loadZone: 'amazon:au:sydney', percent: 20 }, + samerica: { loadZone: 'amazon:br:sao paulo', percent: 20 }, + } + } + } +}; + +const domain = 'https://nicolevanderhoeven.com'; +export default function () { + Home(); + ThinkTime(); + Notes(); + ThinkTime(); +} + +export function Home () { + + group('Home', function () { + + let res = http.batch([ + ['GET', domain], + ['GET', 'https://nicolevanderhoeven.github.io/css/style-dark.css'], + ['GET', domain + '/lib/font-awesome/css/all.min.css'], + ['GET', domain + '/lib/jquery/jquery.min.js'], + ['GET', domain + '/js/main.js'], + ['GET', 'https://nicolevanderhoeven.github.io/images/logo.png'], + ['GET', domain + '/lib/JetBrainsMono/ttf/JetBrainsMono-Regular.ttf'], + ['GET', domain + '/lib/font-awesome/webfonts/fa-brands-400.woff2'], + ['GET', domain + '/lib/font-awesome/webfonts/fa-solid-900.woff2'], + ['GET', 'https://nicolevanderhoeven.github.io/images/favicon.ico'] + ]); + check(res, { + 'Homepage text verification': (r) => JSON.stringify(r).includes('Maastricht') + }); + }); +} + +export function Notes () { + + group("Notes", function () { + let res = http.batch([ + ['GET', 'https://notes.nicolevanderhoeven.com/'], + ['GET', 'https://publish.obsidian.md/app.js?0baafbfed92e71ff3ff7'], + ['GET', 'https://publish.obsidian.md/app.css?0baafbfed92e71ff3ff7'], + ['GET', 'https://publish.obsidian.md/lib/purify.min.js'], + ['GET', 'https://publish.obsidian.md/public/fonts/450beda71fb8564202a0.woff2'], + ['GET', 'https://publish-01.obsidian.md/options/186a0d1b800fa85e50d49cb464898e4c'], + ['GET', 'https://publish-01.obsidian.md/cache/186a0d1b800fa85e50d49cb464898e4c'], + ['GET', 'https://publish.obsidian.md/favicon.ico?0baafbfed92e71ff3ff7'], + ['GET', 'https://publish-01.obsidian.md/access/186a0d1b800fa85e50d49cb464898e4c/obsidian.css'], + ['GET', 'https://publish-01.obsidian.md/access/186a0d1b800fa85e50d49cb464898e4c/publish.css'], + ['GET', 'https://publish.obsidian.md/lib/pixi.min.js'], + ['GET', 'https://publish-01.obsidian.md/access/186a0d1b800fa85e50d49cb464898e4c/Fork%20My%20Brain.md'], + ['GET', 'https://publish.obsidian.md/public/fonts/b0b9c035692f884e8635.woff2'], + ['GET', 'https://publish-01.obsidian.md/access/186a0d1b800fa85e50d49cb464898e4c/assets/profile-token.png'], + ['GET', 'https://publish.obsidian.md/lib/prism.min.js'], + ['GET', 'https://publish.obsidian.md/public/images/874d8b8e340f75575caa.svg'], + ['GET', 'https://publish.obsidian.md/public/fonts/856e8f46fd911d2040c3.woff2'], + ['GET', 'https://publish.obsidian.md/sim.js'], + ]); + check(res, { + 'Notes page text verification': (r) => JSON.stringify(r).includes('my working notes') + }); + }); +} + +export function ThinkTime() { + sleep(Math.random() * 5); +} \ No newline at end of file diff --git a/percentages.js b/percentages.js new file mode 100644 index 0000000..4d575bb --- /dev/null +++ b/percentages.js @@ -0,0 +1,28 @@ +import http from 'k6/http'; +import { sleep, check } from 'k6'; +import { randomIntBetween } from "https://jslib.k6.io/k6-utils/1.0.0/index.js"; + +export const options = { + duration: '1m', + vus: 1, +}; + + +export default function () { + const domain = 'https://test.k6.io'; + let randomNumber = randomIntBetween(1,100); + console.log('Random number is ' + randomNumber); + let client; + if (randomNumber < 50) { + client = 'clientA' + } else if (randomNumber < 85) { + client = 'clientB' + } else { + client = 'clientC' + } + + let res = http.get(domain + '/status-check/v1.0/' + client); + console.log('Client selected: ' + client); + + sleep(randomIntBetween(1,5)); +} \ No newline at end of file diff --git a/pokeapi-simplified.js b/pokeapi-simplified.js new file mode 100644 index 0000000..c782c61 --- /dev/null +++ b/pokeapi-simplified.js @@ -0,0 +1,63 @@ +import http from 'k6/http'; +import { sleep, check } from 'k6'; +import papaparse from 'https://jslib.k6.io/papaparse/5.1.1/index.js'; +import { SharedArray } from "k6/data"; +import { Pods } from 'k6/x/chaos/k8s'; + +export const options = { + scenarios: { + pokeapi: { + executor: 'ramping-vus', + exec: 'getPokemon', + startVUs: 0, + stages: [ + { duration: '1m', target: 10 }, + { duration: '5m', target: 10 }, + ], + }, + chaos: { + executor: 'per-vu-iterations', + exec: 'killAppPod', + vus: 1, + iterations: 1, + startTime: '10s', + }, + }, + thresholds: { + http_req_failed: ['rate<=0.05'], + load_generator_cpu_percent: ["value<=80"], + load_generator_memory_used_percent: ["value<=80"], + http_req_duration: ["p(95)<=5000"], + }, +}; + +const domain = 'http://cluster.nicolevanderhoeven.com/api/v2'; +const sharedData = new SharedArray("Shared Logins", function() { + let data = papaparse.parse(open('pokemon.csv'), { header: true }).data; + return data; +}); + +export function getPokemon() { + let randomMon = sharedData[Math.floor(Math.random() * sharedData.length)]; + let res = http.get(domain + '/pokemon/' + randomMon.name, {tags: { name: '01_GetPokemon' }}); + check(res, { + 'is status 200': (r) => r.status === 200, + '01-text verification': (r) => r.body.includes(randomMon.name) + }); + + sleep(Math.random() * 5); +} + +export function killAppPod() { + let victim; + const pod = new Pods(); + + for (let i = 0; i < pod.list().length; i++) { + victim = pod.list()[i]; + if (victim.startsWith('app')) { + break; + } + } + + pod.killByName('default', victim); +} \ No newline at end of file diff --git a/review-signal.js b/review-signal.js new file mode 100644 index 0000000..bc71c8f --- /dev/null +++ b/review-signal.js @@ -0,0 +1,42 @@ +import { sleep } from 'k6' +import { Rate } from 'k6/metrics' +import http from 'k6/http' + +// let's collect all errors in one metric +let errorRate = new Rate('error_rate') + +// See https://k6.io/docs/using-k6/options +export let options = { + batch: 1, + throw: true, + stages: [ + { duration: '15m', target: 1000 }, + ], + ext: { + loadimpact: { + distribution: { + Virginia: { loadZone: 'amazon:us:ashburn', percent: 10 }, + London: { loadZone: 'amazon:gb:london', percent: 10 }, + Frankfurt: { loadZone: 'amazon:de:frankfurt', percent: 10 }, + Oregon: { loadZone: 'amazon:us:portland', percent: 10 }, + Ohio: { loadZone: 'amazon:us:columbus', percent: 10 }, + Tokyo: { loadZone: 'amazon:jp:tokyo', percent: 10 }, + Sydney: { loadZone: 'amazon:au:sydney', percent: 10 }, + Mumbai: { loadZone: 'amazon:in:mumbai', percent: 10 }, + Singapore: { loadZone: 'amazon:sg:singapore', percent: 10 }, + Brazil: { loadZone: 'amazon:br:sao paulo', percent: 10 }, + }, + }, + }, +} + +export default function () { + let params = { + headers: { 'X-CustomHeader': '1' }, + }; + let res = http.get('https://example.com', params) + + errorRate.add(res.status >= 400) + + sleep(1) +} \ No newline at end of file diff --git a/simple.js b/simple.js new file mode 100644 index 0000000..4293085 --- /dev/null +++ b/simple.js @@ -0,0 +1,16 @@ +import http from 'k6/http'; +import { sleep, check } from 'k6'; + +export const options = { + duration: '1m', + vus: 5, +}; + +export default function () { + let res = http.get('http://cluster.nicolevanderhoeven.com/api/v2/pokemon/pikachu', {tags: { name: '01_GetPokemon' }}); + check(res, { + 'is status 200': (r) => r.status === 200, + 'text verification': (r) => r.body.includes("pikachu") + }); + sleep(Math.random() * 5); +} \ No newline at end of file diff --git a/supersimple.js b/supersimple.js new file mode 100644 index 0000000..bb2e85a --- /dev/null +++ b/supersimple.js @@ -0,0 +1,5 @@ +import http from 'k6/http'; + +export default function () { + http.get('http://cluster.nicolevanderhoeven.com/api/v2/pokemon/pikachu'); +} \ No newline at end of file diff --git a/test-sample.js b/test-sample.js new file mode 100644 index 0000000..1760819 --- /dev/null +++ b/test-sample.js @@ -0,0 +1,39 @@ +/* Where contents of data.csv is: + + username,password + admin,123 + test_user,1234 +*/ +import http from 'k6/http'; +import { check, sleep } from 'k6'; +import papaparse from 'https://jslib.k6.io/papaparse/5.1.1/index.js'; + +// Load CSV file and parse it using Papa Parse +const csvData = papaparse.parse(open('./data/users.csv'), { header: true }).data; + +export default function () { + // Now you can use the CSV data in your test logic below. + // Below are some examples of how you can access the CSV data. + + // Loop through all username/password pairs + csvData.forEach((userPwdPair) => { + console.log(JSON.stringify(userPwdPair)); + }); + + // Pick a random username/password pair + let randomUser = csvData[Math.floor(Math.random() * csvData.length)]; + console.log('Random user: ', JSON.stringify(randomUser)); + + const params = { + login: randomUser.username, + password: randomUser.password, + }; + + let res = http.post('https://test.k6.io/login.php', params); + check(res, { + 'login succeeded': (r) => + r.status === 200 && r.body.indexOf('Logout') !== -1, + }); + + sleep(1); +} diff --git a/test-test_k6_io.js b/test-test_k6_io.js new file mode 100644 index 0000000..3307d9c --- /dev/null +++ b/test-test_k6_io.js @@ -0,0 +1,9 @@ +import { check } from 'k6'; +import http from 'k6/http'; + +export default function () { + let res = http.get('http://test.k6.io/'); + check(res, { + 'verify homepage text': (r) => r.body.includes("Collection of simple web-pages suitable for load testing"), + }); +} diff --git a/testdata.js b/testdata.js new file mode 100644 index 0000000..4458394 --- /dev/null +++ b/testdata.js @@ -0,0 +1,69 @@ +import http, { request } from 'k6/http'; +import { parseHTML } from 'k6/html'; +import { sleep, check } from 'k6'; +import { jUnit, textSummary } from 'https://jslib.k6.io/k6-summary/0.0.1/index.js'; +import papaparse from 'https://jslib.k6.io/papaparse/5.1.1/index.js'; +import { SharedArray } from "k6/data"; + +// const csvData = papaparse.parse(open('./data/users.csv'), { header: true }).data; +let csrfToken = 'NOT_FOUND'; + +const sharedData = new SharedArray("Shared Logins", function() { + let data = papaparse.parse(open('./data/users.csv'), { header: true }).data; + return data; +}); + +export default function () { + Homepage(); + thinkTime(); + LoginPage(); + thinkTime(); + Login(); + thinkTime(); +} + +export function Homepage () { + let response = http.get('https://test.k6.io', {tags: { name: '01_Home' }}); + check(response, { + 'is status 200': (r) => r.status === 200, + '01_text verification': (r) => r.body.includes('Collection of simple web-pages suitable for load testing') + }); +} + +export function thinkTime () { + sleep(Math.random() * 5); +} + +export function LoginPage () { + let response = http.get('http://test.k6.io/my_messages.php', {tags: { name: '02_LoginPage' }}); + check(response, { + 'is status 200': (r) => r.status === 200, + '02_text verification': (r) => r.body.includes('Unauthorized') + }); + + // Extract CSRF token + let doc = parseHTML(response.body); + csrfToken = doc.find('input[name="csrftoken"]').val(); +} + +export function Login() { + + // Get random user from shared array + let randomUser = sharedData[Math.floor(Math.random() * sharedData.length)] + + let response = http.post('http://test.k6.io/login.php', { login: randomUser.username, password: randomUser.password, redir: '1', csrftoken: csrfToken }); + check(response, { + '03_check user': (r) => r.body.includes('Welcome, ', randomUser.username, '!'), + '03_text verification': (r) => r.body.includes('Logout') + }); +} + +export function handleSummary(data) { + return { + 'stdout': textSummary(data, { indent: ' ', enableColors: true}), // Show the text summary to stdout... + 'junit.xml': jUnit(data), // but also transform it and save it as a JUnit XML... + 'summary.json': JSON.stringify(data), // and a JSON with all the details... + // And any other JS transformation of the data you can think of, + // you can write your own JS helpers to transform the summary data however you like. + } +} \ No newline at end of file diff --git a/wyrmwood/homepage.js b/wyrmwood/homepage.js new file mode 100644 index 0000000..f2a6777 --- /dev/null +++ b/wyrmwood/homepage.js @@ -0,0 +1,1203 @@ +import http from "k6/http" +import { sleep, check, group } from "k6"; + +export function Homepage(){ + let response; + group("01_Homepage", function () { + response = http.get("https://wyrmwoodgaming.com/", { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + "upgrade-insecure-requests": "1", + accept: + "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", + "sec-fetch-site": "none", + "sec-fetch-mode": "navigate", + "sec-fetch-user": "?1", + "sec-fetch-dest": "document", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + }); + check(response, { + 'Homepage text verification': (r) => JSON.stringify(r).includes('What Can Wyrmwood Bring to Your Table Today?') + }); + + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-includes/css/dist/block-library/style.min.css?ver=5.8.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "text/css,*/*;q=0.1", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "style", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/vendors-style.css?ver=5.3.2", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "text/css,*/*;q=0.1", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "style", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/style.css?ver=5.3.2", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "text/css,*/*;q=0.1", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "style", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/contact-form-7/includes/css/styles.css?ver=5.4.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "text/css,*/*;q=0.1", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "style", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/revslider/public/assets/css/rs6.css?ver=6.2.21", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "text/css,*/*;q=0.1", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "style", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/woocommerce-waitlist/includes/css/src/wcwl_frontend.min.css?ver=2.2.6", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "text/css,*/*;q=0.1", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "style", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-includes/css/dashicons.min.css?ver=5.8.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "text/css,*/*;q=0.1", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "style", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/kadence-slider/css/ksp.css?ver=2.3.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "text/css,*/*;q=0.1", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "style", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/youtube-embed-plus/styles/ytprefs.min.css?ver=13.4.3", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "text/css,*/*;q=0.1", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "style", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/themes/virtue_premium/assets/css/virtue.css?ver=4.9.34", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "text/css,*/*;q=0.1", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "style", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/themes/virtue_premium/assets/css/virtue-woocommerce.css?ver=4.9.34", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "text/css,*/*;q=0.1", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "style", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/themes/virtue_premium/assets/css/virtue_icons.css?ver=4.9.34", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "text/css,*/*;q=0.1", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "style", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/themes/virtue_premium/assets/css/skins/default.css?ver=4.9.34", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "text/css,*/*;q=0.1", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "style", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/themes/wyrmwood/style.css?ver=1.0.0", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "text/css,*/*;q=0.1", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "style", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-includes/js/jquery/jquery.min.js?ver=3.6.0", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.3.2", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/cf7-invisible-recaptcha/js/cf7_invisible_recaptcha.js?ver=1.2.3", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/revslider/public/assets/js/rbtools.min.js?ver=6.2.21", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/revslider/public/assets/js/rs6.min.js?ver=6.2.21", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/woocommerce/assets/js/js-cookie/js.cookie.min.js?ver=2.1.4", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/duracelltomi-google-tag-manager/js/gtm4wp-form-move-tracker.js?ver=1.13.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery.cookie.min.js?ver=1.4.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/woocommerce-google-adwords-conversion-tracking-tag/js/public/wooptpm.js?ver=1.10.8", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/pixelyoursite-pro/dist/scripts/jquery.bind-first-0.2.3.min.js?ver=5.8.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/pixelyoursite-pro/dist/scripts/vimeo.min.js?ver=5.8.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/pixelyoursite-pro/dist/scripts/public.js?ver=8.3.5", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/youtube-embed-plus/scripts/ytprefs.min.js?ver=13.4.3", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/uploads/2015/04/HorizontalLogo.svg", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: + "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "image", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://wyrmwoodgaming.com/wp-includes/js/wp-emoji-release.min.js?ver=5.8.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "same-origin", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/themes/virtue_premium/assets/css/virtue_print.css?ver=4.9.34", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "text/css,*/*;q=0.1", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "style", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/revslider/public/assets/assets/dummy.png", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: + "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "image", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-includes/js/dist/vendor/regenerator-runtime.min.js?ver=0.13.7", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=3.15.0", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/contact-form-7/includes/js/index.js?ver=5.4.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/woocommerce/assets/js/jquery-blockui/jquery.blockUI.min.js?ver=2.70", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.min.js?ver=5.5.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/woocommerce/assets/js/frontend/woocommerce.min.js?ver=5.5.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/mc4wp-premium/ecommerce3/assets/js/tracker.js?ver=4.8.18", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/woocommerce-google-adwords-conversion-tracking-tag/js/public/google-ads.js?ver=1.10.8", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/woocommerce-waitlist/includes/js/src/wcwl_frontend.min.js?ver=2.2.6", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/woocommerce-waitlist/includes/js/src/wcwl_account.min.js?ver=2.2.6", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/themes/virtue_premium/assets/js/min/bootstrap-min.js?ver=4.9.34", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-includes/js/hoverIntent.min.js?ver=1.10.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/themes/virtue_premium/assets/js/min/plugins-min.js?ver=4.9.34", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/themes/virtue_premium/assets/js/min/kt-sticky-min.js?ver=4.9.34", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/themes/virtue_premium/assets/js/min/magnific-popup-min.js?ver=4.9.34", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/themes/virtue_premium/assets/js/min/virtue_lightbox-min.js?ver=4.9.34", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-includes/js/imagesloaded.min.js?ver=4.1.4", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-includes/js/masonry.min.js?ver=4.2.2", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/themes/virtue_premium/assets/js/min/main-min.js?ver=4.9.34", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/themes/virtue_premium/assets/js/min/kt-add-to-cart-variation-min.js?ver=5.8.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/themes/virtue_premium/assets/js/min/wc-quantity-increment-min.js?ver=5.8.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/youtube-embed-plus/scripts/fitvids.min.js?ver=13.4.3", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-includes/js/wp-embed.min.js?ver=5.8.1", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.1.4/js.cookie.min.js", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "script", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/seedprod-notification-bar-pro/template/images/close.png", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: + "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "image", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/seedprod-notification-bar-pro/template/images/open1.png", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: + "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "image", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/themes/virtue_premium/assets/css/fonts/virtue_icons.woff2?v5bjeb", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + origin: "https://wyrmwoodgaming.com", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "cors", + "sec-fetch-dest": "font", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/uploads/2021/09/Gemstone-Dice-1024x501.png", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: + "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "image", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/uploads/2019/11/Dice-Vault-Category-Image.png", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: + "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "image", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/uploads/2019/11/dice-tower-category-image-2048x1022.png", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: + "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "image", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/uploads/2019/11/T-Tray-Category-Image.png", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: + "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "image", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://wyrmwoodgaming.com/wp-content/uploads/2019/10/blank.png", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: + "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8", + "sec-fetch-site": "same-origin", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "image", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/plugins/revslider/public/assets/fonts/revicons/revicons.woff?5510888", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + origin: "https://wyrmwoodgaming.com", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "cors", + "sec-fetch-dest": "font", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://wyrmwoodgaming.com/wp-content/uploads/2020/09/CR_SPLASHv2-01.png", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: + "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8", + "sec-fetch-site": "same-origin", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "image", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://wyrmwoodgaming.com/wp-content/uploads/2021/09/Hexy-Slider-Preorder.mp4", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "accept-encoding": "identity;q=1, *;q=0", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: "*/*", + "sec-fetch-site": "same-origin", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "video", + "accept-language": "en-GB,en;q=0.9", + range: "bytes=0-", + }, + } + ); + response = http.get( + "https://wyrmwoodgaming.com/wp-admin/admin-ajax.php?action=wooptpm_get_cart_items", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + accept: "application/json, text/javascript, */*; q=0.01", + "x-requested-with": "XMLHttpRequest", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + "sec-fetch-site": "same-origin", + "sec-fetch-mode": "cors", + "sec-fetch-dest": "empty", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + response = http.get( + "https://3kyj0yax3f42pj6jr2qjywv1-wpengine.netdna-ssl.com/wp-content/uploads/2018/01/cropped-TreeMarkIcon-1-32x32.png", + { + headers: { + "sec-ch-ua": + '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"macOS"', + accept: + "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "no-cors", + "sec-fetch-dest": "image", + "accept-encoding": "gzip, deflate, br", + "accept-language": "en-GB,en;q=0.9", + }, + } + ); + }); + +}; \ No newline at end of file diff --git a/wyrmwood/wyrmwood.js b/wyrmwood/wyrmwood.js new file mode 100644 index 0000000..4006ab0 --- /dev/null +++ b/wyrmwood/wyrmwood.js @@ -0,0 +1,8 @@ +import http from "k6/http"; +import { sleep, check } from "k6"; +import { Homepage } from "./homepage.js" + +export default function (){ + Homepage(); +} +