{"id":1290,"date":"2011-12-19T19:07:25","date_gmt":"2011-12-19T23:07:25","guid":{"rendered":"http:\/\/www.webperformanceinc.com\/load_testing\/blog\/?p=1290"},"modified":"2020-12-17T12:10:13","modified_gmt":"2020-12-17T16:10:13","slug":"recording-in-load-tester-whats-going-on","status":"publish","type":"post","link":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2011\/12\/recording-in-load-tester-whats-going-on\/","title":{"rendered":"Recording in Load Tester: What&#8217;s Going On?"},"content":{"rendered":"<p>Load Tester is designed to recognize common use patterns and transform them into working test cases with a minimum of user intervention.\u00a0 Our clients appreciate that Load Tester does a tremendous amount of work automatically.\u00a0 But, any load testing tool must be prepared to exercise the complexity of its target, and for some web applications even a simple test case can involve hundreds of variables.<\/p>\n<p>This post will try to elucidate the stages of the recording process, which are, roughly:<\/p>\n<ol>\n<li>Recording<\/li>\n<li>Initial Inspection<\/li>\n<li>Automatic Configuration<\/li>\n<li>Manual Configuration<\/li>\n<li>Replay<\/li>\n<li>Validation<\/li>\n<\/ol>\n<p>During the <em>recording<\/em> stage, we manually perform a use case in a web browser.\u00a0 Load Tester monitors our work and, for the time being, only notes the literal transactions between the browser and the remote server.\u00a0 This leaves us with nothing more or less than a raw log of the interaction.<\/p>\n<p>During the <em>initial inspection<\/em> we check that Load Tester has actually recorded what we want it to record.\u00a0 Why wouldn&#8217;t it?\u00a0 Load Tester may pick up irrelevant traffic, for example, if the browser&#8217;s RSS reader fires off during the recording (note that this occurrence will probably also disrupt Load Tester&#8217;s think time measurements).\u00a0 Alternately, the site may be deep-linking resources from another domain, which might concern us if we didn&#8217;t intend it.\u00a0 For example, I recently encountered a site that fetched a small XML file directly from the client&#8217;s subversion repository.\u00a0 In either case, we want to delete these references from our test case unless we have permission to expand our load test beyond our own network.<\/p>\n<div id=\"attachment_1370\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1370\" class=\"size-medium wp-image-1370\" title=\"Errant URLs in our Recording\" src=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/errant-urls-300x248.png\" alt=\"Examples of irrelevant traffic that might get picked up by load tester.\" width=\"300\" height=\"248\" srcset=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/errant-urls-300x248.png 300w, https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/errant-urls.png 359w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><p id=\"caption-attachment-1370\" class=\"wp-caption-text\">Examples of irrelevant traffic that might get picked up by Load Tester.<\/p><\/div>\n<p>At this stage, we still have only raw transaction data.\u00a0 Load tester can now perform considerable <em>automatic configuration<\/em> for us.\u00a0 This is the job of the Application State Wizard, which parses the transaction log and generates a dynamic test case.\u00a0 Much of Load Tester&#8217;s analysis is so reliable that it happens entirely under the hood, but Load Tester also generates hundreds of variables that you can configure manually.\u00a0 These variables are lifted out of the prior transaction using <em>extractors <\/em>and inserted into the subsequent transaction using <em>fields<\/em>.\u00a0 Each extractor and each field explicitly names the variable it uses.\u00a0 It may help to know that all automatically generated variables begin with a &#8216;#&#8217; sign.<\/p>\n<div id=\"attachment_1372\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/fields-view-before-recording.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1372\" class=\"size-medium wp-image-1372\" title=\"Fields View Before Configuration\" src=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/fields-view-before-recording-300x205.png\" alt=\"Fields View (Before running the Application State Wizard)\" width=\"300\" height=\"205\" srcset=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/fields-view-before-recording-300x205.png 300w, https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/fields-view-before-recording-500x342.png 500w, https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/fields-view-before-recording.png 923w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1372\" class=\"wp-caption-text\">Fields View (Before running the Application State Wizard)<\/p><\/div>\n<div id=\"attachment_1373\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/fields-view-after-recording.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1373\" class=\"size-medium wp-image-1373\" title=\"Fields View After Configuration\" src=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/fields-view-after-recording-300x205.png\" alt=\"Fields View (After running the Application State Wizard)\" width=\"300\" height=\"205\" srcset=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/fields-view-after-recording-300x205.png 300w, https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/fields-view-after-recording-500x342.png 500w, https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/fields-view-after-recording.png 922w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1373\" class=\"wp-caption-text\">Fields View (After running the Application State Wizard)<\/p><\/div>\n<div id=\"attachment_1376\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/extractors-view-after-recording.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1376\" class=\"size-medium wp-image-1376\" title=\"Extractors View After Configuration\" src=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/extractors-view-after-recording-300x205.png\" alt=\"Extractors View (After running the Application State Wizard)\" width=\"300\" height=\"205\" srcset=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/extractors-view-after-recording-300x205.png 300w, https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/extractors-view-after-recording-500x341.png 500w, https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/extractors-view-after-recording.png 923w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1376\" class=\"wp-caption-text\">Extractors View (After running the Application State Wizard)<\/p><\/div>\n<p>We rarely want to do significant <em>manual configuration<\/em> &#8212; Load Tester is very good at teasing out the flow of web applications.\u00a0 It will even detect most authentication schemes and configure them for us, requiring only an accurate table of username\/password pairs.\u00a0 If necessary, we can define our own extractors using delimiters or regular expressions.\u00a0 Although it does not make sense to create new fields, we can redefine a field to any constant value, variable, or data table.<\/p>\n<p>A standardized, populated web application should be predictable enough for Load Tester.\u00a0 For example, if our test cases pass with an unpopulated database but fail after we add the first element, this is because our web application behaves differently on that edge case &#8212; but there&#8217;s normally no reason to load test an unpopulated database.\u00a0 Even a site I tested with a very dynamic user interface only needed one regular expression extractor out of six test cases.<\/p>\n<p>Occasionally we may find that the Application State Wizard is unnecessarily ambitious.\u00a0 We can rerun the wizard at any time, and ask it to ignore information that shouldn&#8217;t be managed dynamically.<\/p>\n<div id=\"attachment_1389\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/never-extract.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1389\" class=\"size-medium wp-image-1389\" title=\"Application State Wizard - Never Extract\" src=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/never-extract-300x236.png\" alt=\"How to instruct the Application State Wizard to ignore irrelevant transaction information.\" width=\"300\" height=\"236\" srcset=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/never-extract-300x236.png 300w, https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/never-extract-500x393.png 500w, https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-content\/uploads\/2010\/08\/never-extract.png 680w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1389\" class=\"wp-caption-text\">How to instruct the Application State Wizard to ignore irrelevant transaction information.<\/p><\/div>\n<p>Once we&#8217;re satisfied that our test case is correct, we can test it by <em>replay<\/em>ing it.\u00a0 Inspect the results by viewing them in Load Tester&#8217;s built in browser.\u00a0 Replay a test multiple times.\u00a0 If you encounter an error, be aware that most errors have simple causes.\u00a0 Make sure your server is actually returning the page you expect it to return.<\/p>\n<p>Finally, it&#8217;s a good idea to write <em>validation<\/em> rules for every page.\u00a0 For example, after I log in, I might expect to find the string &#8220;Welcome to This Web Site&#8221; somewhere in the content of the page.\u00a0 Load Tester automatically detects many errors, but we&#8217;ve found that liberal use of validation rules improves the quality of our test cases.\u00a0 Validators may apply to individual pages, transactions, or even to the entire test suite.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Load Tester is designed to recognize common use patterns and transform them into working test cases with a minimum of user intervention.\u00a0 Our clients appreciate that Load Tester does a tremendous amount of work automatically.\u00a0 But, any load testing tool must be prepared to exercise the complexity of its target, and for some web applications even a simple test case can involve hundreds of variables.<br \/>\nThis post will try to elucidate the stages of the recording process, which are, roughly:<\/p>\n<p>Recording<br \/>\nInitial Inspection<br \/>\nAutomatic Configuration<br \/>\nManual Configuration<br \/>\nReplay<br \/>\nValidation<\/p>\n<p>During the recording stage, we manually perform a use case in a web browser.\u00a0 Load Tester monitors our work &hellip; <a href=\"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/2011\/12\/recording-in-load-tester-whats-going-on\/\">Continue reading &raquo;<\/a><\/p>\n","protected":false},"author":53,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42],"tags":[],"class_list":["post-1290","post","type-post","status-publish","format-standard","hentry","category-load-tester-software"],"_links":{"self":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/1290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/users\/53"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/comments?post=1290"}],"version-history":[{"count":26,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/1290\/revisions"}],"predecessor-version":[{"id":6303,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/posts\/1290\/revisions\/6303"}],"wp:attachment":[{"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/media?parent=1290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/categories?post=1290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webperformance.com\/load-testing-tools\/blog\/wp-json\/wp\/v2\/tags?post=1290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}