#!/bin/bash

declare -A cookies
cookies[anon]=''
cookies[expired]='centralauth_Session=00000000000000000000000000000000;centralauth_Token=b3973e49bbfcba4086bf20b842a79bd7;centralauth_User=TgrTest;enwikiSession=00000000000000000000000000000000;enwikiUserID=27372309;enwikiUserName=TgrTest'
cookies[valid]='centralauth_Session=0030a72f63d2fa6a55fdcd0da033d390;centralauth_Token=b3973e49bbfcba4086bf20b842a79bd7;centralauth_User=TgrTest;enwikiSession=891fcsjj04haecgddpmqjrl386f9j6hl;enwikiUserID=27372309;enwikiUserName=TgrTest'

for url in 'https://en.wikipedia.org/wiki/Barack_Obama?' 'ttps://en.wikipedia.org/w/load.php?debug=false&lang=en&modules=ext.cite.styles%7Cext.echo.badgeicons%7Cext.echo.styles.badge%7Cext.gadget.DRN-wizard%2CReferenceTooltips%2CWatchlistBase%2CWatchlistGreenIndicators%2Ccharinsert%2CconfirmationRollback-mobile%2Cfeatured-articles-links%2CformWizard%2Cgeonotice%2CrefToolbar%2Cswitcher%2Cteahouse%7Cext.tmh.thumbnail.styles%7Cext.uls.nojs%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cmediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.raggett%2CsectionAnchor%7Cmediawiki.skinning.interface%7Cskins.vector.styles%7Cwikibase.client.init&only=styles&skin=vector&' 'https://en.wikipedia.org/wiki/Barack_Obama?action=raw&' 'https://en.wikipedia.org/w/api.php?action=opensearch&format=json&formatversion=2&search=aaa&namespace=0&limit=10&suggest=true&type=foo'
do
  for i in "${!cookies[@]}"
  do
    ab -H 'X-Wikimedia-Debug: 1' -n 10 -C "${cookies[$i]}" "${url}type=$i"
  done
done

