v1
3/8/2020 by Finesse -00
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
var casesCount = 1000;

var keys = [];
for (let i = 0; i < casesCount; ++i) {
  keys.push('key_' + Math.random());
}

var map = {};
var switchCode = 'function withSwitch(key) { switch (key) {';

for (var i = 0; i < casesCount; ++i) {
  map[keys[i]] = 'case_' + keys[i];
  switchCode += ' case ' + JSON.stringify(keys[i]) + ': return ' + JSON.stringify(map[keys[i]]) + ';';
}

switchCode += ' }}';
eval(switchCode);

function withMap(key) {
  return map[key];
}

// ----------

var testKeys = [];
for (var i = 0; i < 5; ++i) {
  testKeys.push(keys[Math.floor(casesCount * (i + 1) / 5 - 1)]);
}
delete caserun single casemove downdrag and drop case


ready



withSwitch(testKeys[0]);
withSwitch(testKeys[1]);
withSwitch(testKeys[2]);
withSwitch(testKeys[3]);
withSwitch(testKeys[4]);
delete caserun single casemove updrag and drop case


ready



withMap(testKeys[0]);
withMap(testKeys[1]);
withMap(testKeys[2]);
withMap(testKeys[3]);
withMap(testKeys[4]);
Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN