<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4648324161118337987</id><updated>2024-09-12T04:53:12.967-07:00</updated><category term="performance"/><category term="Jmeter"/><category term="automation"/><category term="process automation"/><category term="ruby"/><category term="staf"/><category term="beanshell"/><category term="combine capature groups"/><category term="fun"/><category term="how to"/><category term="hpcloud"/><category term="parsing"/><category term="sparklines"/><category term="stax"/><category term="strategy"/><category term="tools"/><title type='text'>Mordechai speaks</title><subtitle type='html'>A kibbitz on web performance, amongst other things.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mordechailehrer.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4648324161118337987/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://mordechailehrer.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09817186693776752896</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4648324161118337987.post-3546883018862394331</id><published>2013-08-01T15:30:00.000-07:00</published><updated>2013-08-01T15:30:49.152-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="automation"/><category scheme="http://www.blogger.com/atom/ns#" term="hpcloud"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>Hacking weeds with Fog</title><content type='html'>&lt;br /&gt;
If you&#39;re working on &lt;a href=&quot;http://www.hpcloud.com/&quot; target=&quot;_blank&quot;&gt;HPCloud &lt;/a&gt;you may want to monitor your assets, and know where your instances are running, and what state there in. &amp;nbsp;Additionally, you might be concerned with cost, which like many cloud providers, is determined by the size of the instance [read amount of allocated resources] and instance up time. &amp;nbsp;HPCloud provides you with 3 different ways of working with their OpenStack API.&lt;br /&gt;
&lt;br /&gt;
Python Nova Client&lt;br /&gt;
Windows Shell&lt;br /&gt;
Ruby Fog - yes please!&lt;br /&gt;
&lt;br /&gt;
If your reading this post you are likely already familiar with the awesomeness of Fog, if not you&#39;ll definitely want to take a gander at &lt;a href=&quot;http://fog.io/&quot;&gt;Fog.io&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Fog works with different cloud providers and receives contributions of code changes which they push into their fog gem. &amp;nbsp;If your working with HPCloud its worth it to work to go ahead and grab HPCloud&#39;s &lt;a href=&quot;https://docs.hpcloud.com/file/hpfog-0.0.20.gem&quot; target=&quot;_blank&quot;&gt;HP Fog gem&lt;/a&gt;. &amp;nbsp;For more information check out:&amp;nbsp;&lt;a href=&quot;https://docs.hpcloud.com/bindings/fog&quot;&gt;https://docs.hpcloud.com/bindings/fog&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Assuming you are working with HP Fog version 20, you can connect like so:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/mordechai/45840feeb250d1860ec7.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
Ok - thtats cool so we get a connection back that will allow us to work with the compute service...yawn.&lt;br /&gt;
&lt;br /&gt;
So now lets do something a little more useful. &amp;nbsp;Lets imagine that every team member has a ppk or security key which is labeled by either the team or instance owners name. &amp;nbsp;We can group the number of instances using this ppk type for identifying assets or even use it to execute specific tasks on those labeled instances, maybe even throw in some &lt;a href=&quot;http://www.opscode.com/chef/&quot; target=&quot;_blank&quot;&gt;Chef&#39;ness &lt;/a&gt;to map specific roles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/mordechai/a4bb9426417faf4fdb5f.js&quot;&gt;&lt;/script&gt;

Lastly I did mention earlier that I wanted to understand cost. &amp;nbsp;Well if you have multiple instances of different sizes, on different avalibilty zones your not going to want to do this by hand.&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/mordechai/20f54ab9312efc91a7d2.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
Even if working with Ruby isn&#39;t &lt;i&gt;your thing&lt;span style=&quot;background-color: white; color: #000066; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px; text-align: -webkit-center;&quot;&gt;™&lt;/span&gt;&lt;/i&gt;, anyone can easily see the value that Fog is giving you. &amp;nbsp;Script-able infrastructure changes, and asset querying that spans the &lt;a href=&quot;http://fog.io/compute/&quot; target=&quot;_blank&quot;&gt;Compute&lt;/a&gt;, &lt;a href=&quot;http://fog.io/storage&quot; target=&quot;_blank&quot;&gt;Storage&lt;/a&gt;, &lt;a href=&quot;http://fog.io/dns&quot; target=&quot;_blank&quot;&gt;DNS&lt;/a&gt;, and &lt;a href=&quot;http://fog.io/cdn&quot; target=&quot;_blank&quot;&gt;CDN &lt;/a&gt;services&amp;nbsp;is some crazy useful stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Bootstrapping!</content><link rel='replies' type='application/atom+xml' href='http://mordechailehrer.blogspot.com/feeds/3546883018862394331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mordechailehrer.blogspot.com/2013/07/hacking-weeds-with-fog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4648324161118337987/posts/default/3546883018862394331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4648324161118337987/posts/default/3546883018862394331'/><link rel='alternate' type='text/html' href='http://mordechailehrer.blogspot.com/2013/07/hacking-weeds-with-fog.html' title='Hacking weeds with Fog'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09817186693776752896</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4648324161118337987.post-4618739223506106190</id><published>2010-01-03T07:33:00.000-08:00</published><updated>2010-01-05T00:47:44.767-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="how to"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="strategy"/><title type='text'>Performance Testing Strategy in 5 steps</title><content type='html'>&lt;div style=&quot;background: white;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;When I get put on a new project I&#39;ll make certain adjustments but overall my goal is to get to &#39;Performance Ready&#39; as quick as possible. &amp;nbsp;This allows me to divide my time on things that really matter. &amp;nbsp;I can focus about 70% of time on exploratory performance testing and syncing on serious defects with developers; while 20% is spent on analysis, and 10% spent on fun things like front end performance or sleeping.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;background: white; margin-bottom: 12.0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;Below are a few notes on how I get to &#39;performance ready&#39; in a few stages.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;background: white; margin-bottom: 12.0pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana; font-size: 13px;&quot;&gt;Performance testing either excites, or annoys. &amp;nbsp;Its a specialized field which requires above average knowledge in several areas not limited to testing, development, architecture, networking, and social engineering. &amp;nbsp;One can have a pretty solid performance approach in 5 very simples stages.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://dl.dropbox.com/u/398664/processs.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;232&quot; src=&quot;http://dl.dropbox.com/u/398664/processs.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;background: white;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;background: white;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;background: white;&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;b&gt;Stage 1: Define what you need to do&lt;/b&gt;&lt;br /&gt;
This is pretty simple. &amp;nbsp;Identify which individuals are your real stakeholders and have the information you need. &amp;nbsp;These individuals may range from obvious roles like: architects, managers, team leads, developers, testers, and of course the product owner. &amp;nbsp;Don&#39;t overlook your individual developers or testers-in-the-know who can sometimes yield much more valuable information then leads or managers. &amp;nbsp;Once you have an idea of who really holds the information you need to know about, next keep in mind whom out the group really affects decisions. &amp;nbsp;Another words understand who calls the shots...in some groups for example a development lead may have a larger impact on resolving issues or authorizing [read: demanding] changes to improve performance then a QA manager.&lt;br /&gt;
&lt;br /&gt;
So now we&#39;ve identified who really matters. &amp;nbsp;&lt;i&gt;Next lets shmooze..&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Identify and get wide agreement on suggested test scenarios.&lt;br /&gt;
These scenarios should be representative of types of user activities, and groups of users.&lt;br /&gt;
When translating assumed customer activities into test scenarios and later into workloads you&#39;ll need to consider average assumed use, and extremes cases.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;What&#39;s the difference between test scenarios and workloads?&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
A &lt;i&gt;test scenario&lt;/i&gt; is a specific scenario in which a feature or part of the application is targeted with a specific functional objective.&lt;br /&gt;
A &lt;i&gt;workload&lt;/i&gt; is collection of multiple test scripts which represent one or more test scenarios; and are executed to simulate specific application use on mass level.&lt;br /&gt;
&lt;br /&gt;
If your lucky enough to merit logs from customers&#39; servers, or anything that provides analytical details to construct workloads then by all means don&#39;t be a donkey...use it. &amp;nbsp;Let&#39;s say that your not that lucky...you&#39;ll need to sit with your product architect, and development lead and understand the products pain points.&amp;nbsp;Next sit with the Product Owner who deals directly with customers and ask him/her for feed back of which parts of the paths through the application are most common. &amp;nbsp;Ask the Product Owner what features are customers asking for or expecting in this release; what are the most common user cases that customers are using now and will be using in the next release. &amp;nbsp;It&#39;s also critical at this point to understand from the product owner how licensing for your application works. &amp;nbsp;All the user scenarios that you have gathered and discussed should then match the licensing structure that your actually selling or believe will be sold. &amp;nbsp;Meaning if your selling licenses for 40 application users, don&#39;t test for 20.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Define your data set.&lt;/i&gt;&lt;br /&gt;
One more time...define that data set and do it well. &amp;nbsp;Without realistic test data, or good customer intel all your hard work will benefit each every customer that resides in imaginary land.&lt;br /&gt;
Your work is useless if its not measured against real test data. &amp;nbsp;If you don&#39;t know what your customers are doing then ask them. &amp;nbsp;If you can&#39;t ask them, then speak with the customer service agents and product managers who are on the front line. &amp;nbsp;If your working on a product where the product owner and manager have no idea what the customers will be doing or what types of environments that they&#39;ll have - then you&#39;ve got&amp;nbsp;&lt;i&gt;bigger issues then performance testing.&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;Define bug criteria.&lt;/i&gt;&lt;br /&gt;
If your a performance tester with QA background this step should be self evident. &amp;nbsp;All non-functional testing (in this case performance testing) requires objectives set clearly upfront; otherwise prepare yourself for never ending testing. &amp;nbsp;Break up your performance bug discussion into a few general categories such as but not limited to: Scalability, Optimization, Functional, Degradation.&lt;br /&gt;
&lt;br /&gt;
It&#39;s important for scalability and optimizations issues to be based directly off your dataset with assumed growth factored in; which has been agreed to grudgingly by your stakeholders in earlier discussions. Otherwise any good finds will be subject to constant debate. &amp;nbsp;Functional - does it work? - NO? Throw your shoe at the &lt;i&gt;nearest developer&lt;/i&gt; of course...just kidding...ok not really. &amp;nbsp;My personal peeve is to begin actual scripting of performance scripts only once I have some small bit of feature confidence meaning the feature is mostly flushed out and might partially work, but the structure itself is not changing by much.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Stage 2: Scripting&lt;/b&gt;&lt;br /&gt;
At this point most features are now working, the data set has been created, and the test scenarios have been defined in high level. &amp;nbsp;Pull out your favorite test tool and goto work. Through out this stage scripts are being created, and tweaked. &amp;nbsp;Don&#39;t miss the opportunity to include juicy functional assertions in your test such that other testers can re-use your scripts for functional testing. &amp;nbsp;I remember once sitting in a meeting hearing &quot;But his scripts focus on performance, we need functional tests not performance tests&quot;. &amp;nbsp;I responded by explaining that all performance tests contain functional assertions &lt;i&gt;if they don&#39;t then your testing is useless&lt;/i&gt;. &amp;nbsp;Functional assertions in performance tests are necessary to validate the actions your executing are causing results that your expecting otherwise whats the point? &amp;nbsp;Silo&#39;ed Testers (who own a specific area or responsibility in a team) sometimes forget that others can really benefit from their scripts. &amp;nbsp;If written in a &#39;drop in and run&#39; style there&#39;s no reason why a simple Jmeter script can&#39;t contain numerous functional assertions and be created dynamic enough to run against different environments to benefit others.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Stage 3: Defining Workloads&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;Didn&#39;t we just discuss this?&lt;/i&gt;&lt;b&gt;&amp;nbsp;-- RULER SLAP -&lt;/b&gt; no...the focus of this stage is to consider your previously discussed test scenarios from a top down approach. &amp;nbsp;Scripts should be grouped into flows. &amp;nbsp;These flows are assigned activity frequency, concurrency, and think times. &amp;nbsp;Designing workloads is sometimes overlooked and rushed. &amp;nbsp;&lt;i&gt;Running misleading workloads which are not accurate produce results that aren&#39;t accurate either.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Designing complex workloads is really a larger discussion. &amp;nbsp;For those interested see this piece on UCML or just about anything from Scott Barber &lt;a href=&quot;http://www.ibm.com/developerworks/rational/library/5219.html&quot;&gt;&lt;span style=&quot;color: #551a8b;&quot;&gt;http://www.ibm.com/developerworks/rational/library/5219.html&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind this is where you organize, specify concurrency and type of work that should be accomplished in a set period of time. &amp;nbsp;You might have workloads that represent fail over testing, stress, and different types of loads. &amp;nbsp;I prefer to organize my scripts to set specific http requests that consist of a user activity as a transaction. &amp;nbsp;This means if a user performs a &quot;Log in&quot; then all relevant http requests that are executed during a &quot;Log In&quot; are collected as a &#39;transaction&#39;. &amp;nbsp;The following is an example of http requests organized as a &#39;transaction&#39; in the script level.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://dl.dropbox.com/u/398664/transaction_example.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;313&quot; src=&quot;http://dl.dropbox.com/u/398664/transaction_example.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;center&quot; class=&quot;separator&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://dl.dropbox.com/u/398664/transaction_example.png&quot;&gt;&lt;span style=&quot;text-decoration: none;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;When I&#39;m organizing a workload I&#39;ll keep in mind how many &#39;transactions&#39; are intended on the following levels:&lt;br /&gt;
&lt;br /&gt;
Script level: How many transactions per single execution&lt;br /&gt;
Expected Workload level = transaction number of single instance X total V_users per hour&lt;br /&gt;
&lt;br /&gt;
Then in Stage 4 you&#39;ll actually create the workload and test your expected vs intended results.&lt;br /&gt;
This is really key...below I&#39;ll explain why.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Stage 4: Scripting Workload&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The purpose of this stage is to 100% verify that the workload and scripts contained within are executing exactly as intended. &amp;nbsp;Meaning the number of transactions, functional assertions, and test results are all going as planned. &amp;nbsp;It&#39;s necessary to run simple scenarios limited by duration, amounts of VUsers or both to verify that the tests are really going as planned. &amp;nbsp;If your running data driven tests where randomization can be removed, meaning your reading values from a csv; make sure to run 1 VU on the script level to check to make sure all your data is being used as intended. &amp;nbsp;Why? &amp;nbsp;Lets say your searching for &quot;I stopped reading the crappy post 10 mins ago!&quot; well if your regular expression or assertion is not expecting to be passed a non-alpha-numeric character eg &quot;!&quot; then you maybe in for unintended behavior.&lt;br /&gt;
&lt;br /&gt;
This step might seem obvious but if skipped you might find yourself doing the walk of shame back to development to explain that the P1 level defect that you were screaming about was caused by your scripts not the product.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Stage 5: Performance Ready&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Performance ready consists of executing workloads, analyzing results, and communicating results out...then repeating. &amp;nbsp;I like using this simple name because managers understand that the testing cycle is now in a stage which implies that the necessary performance ground work is in place and testing is ready to be executed.&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;Executing Workloads&lt;/i&gt;&lt;br /&gt;
In order to squeeze every drop of value out of your performance scripts its necessary to have a framework in place that allows for flexible execution and result management. &amp;nbsp;Several exist depending on your tooling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to know if your framework is sufficient enough or whether to move to something else ask yourself the following:&lt;br /&gt;
&lt;ul type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;Can I push a button and go home      to my family and come back to work the next day with results?&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;Are my results persistent,      organized, and in an analyzable (thats definitely not a word) without much      background work required before or after runs?&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;If my tests fail in execution      or processing results, can I still recover results the following day or      later? &amp;nbsp;Meaning your work isn&#39;t lost but recoverable.&lt;/li&gt;
&lt;/ul&gt;If you have a larger team you might consider:&lt;br /&gt;
&lt;ul type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;Is my process visible,      understandable, and usable by all team members?&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;Is result/issue notification      clear enough that anyone on the team can resolve it besides the weird guy      with stank breath?&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;How happy is everyone      within the team with the framework? &amp;nbsp;Are there any steps outside of      analysis once in a &#39;performance ready state&#39; that are performed manually      and increase frustration and result turn around time?&lt;/li&gt;
&lt;/ul&gt;Remember keep &#39;stank breath&#39; guy happy....he&#39;s got feelings too, and may be your best resource..&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;Analyzing Results&lt;/i&gt;&lt;br /&gt;
Outside of scripting most of your time is probably spent here. &amp;nbsp;You&#39;ll need different reports for different stakeholders. &amp;nbsp;Your ability to efficiently analyze results will be dependent on the maturity of the framework in which your results are managed. &amp;nbsp;Generating reports on the fly for specific stake holders is important but not as important as generating results that are useful to YOU.&lt;br /&gt;
&lt;br /&gt;
Most likely your average developer, team lead and manager could give 2 hoots about what a specific transaction&#39;s median, 90% value,max and min may be for a certain transaction. &amp;nbsp;But you my dear performance tester you do care...it will make your life easier when you have the metrics you need at your finger tips.&lt;br /&gt;
&lt;br /&gt;
The point is...automate the creation of reports that you need to make quick decisions first. &amp;nbsp;Leave automating cute charts for later until you have what you need. &amp;nbsp;It&#39;s possible in your analysis of results the the numbers show the workload&#39;s aren&#39;t achieving the intended level of stress, or could be overshooting it. &amp;nbsp;If that&#39;s the case go back to redefining your workload to make it accurate. &amp;nbsp;Involve the necessary folks to think things out so that what your running and what people think your executing match up. &amp;nbsp;The worst possible situation is to find yourself testing things that don&#39;t matter, while things that do go overlooked.&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;Communicating Results&lt;/i&gt;&lt;br /&gt;
Communicating results in timely manner is critical. &amp;nbsp;Don&#39;t get bogged down on generating pretty graphs, save yourself time by creating templates for sending out the information. &amp;nbsp;Additionally it may be helpful to gather all the stakeholders and give a brief demo of how to interpret performance results from the templates that you send out. &amp;nbsp;You may find out that each technical and non technical audience per project is different. &amp;nbsp;There also maybe easier ways to communicate more effectively by understanding what your audience immediately understands vs what they need to have explained. &amp;nbsp;Managers may want high level graphs, developers specific response times, architects may want everything - your ability to present clean, &lt;u&gt;accurate results will build your cred&lt;/u&gt;&#39; - if you need further convincing check out Mike Kelly&#39;s article on &quot;What&#39;s your credit score&quot;&amp;nbsp;&lt;a href=&quot;http://www.testingreflections.com/node/view/4945&quot;&gt;&lt;span style=&quot;color: #551a8b;&quot;&gt;http://www.testingreflections.com/node/view/4945&lt;/span&gt;&lt;/a&gt; &amp;nbsp;&#39;nuff said eh?&lt;br /&gt;
&lt;br /&gt;
If your looking for a thorough book on performance testing check out this online book &lt;a href=&quot;http://www.codeplex.com/PerfTestingGuide&quot;&gt;Pattern and Practices: Performance Test Guidance for Web Applications&lt;/a&gt; This book contains a ton of great information that makes it an easy read, in addition to a nice reference. &amp;nbsp;Many of the stages and ideas discussed in this post are covered in detail, with varying chapters on implementation per methodology.</content><link rel='replies' type='application/atom+xml' href='http://mordechailehrer.blogspot.com/feeds/4618739223506106190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mordechailehrer.blogspot.com/2010/01/when-i-get-put-on-new-project-ill-make.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4648324161118337987/posts/default/4618739223506106190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4648324161118337987/posts/default/4618739223506106190'/><link rel='alternate' type='text/html' href='http://mordechailehrer.blogspot.com/2010/01/when-i-get-put-on-new-project-ill-make.html' title='Performance Testing Strategy in 5 steps'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09817186693776752896</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4648324161118337987.post-8235454671722512777</id><published>2009-11-09T03:26:00.001-08:00</published><updated>2010-01-03T07:10:21.971-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="beanshell"/><category scheme="http://www.blogger.com/atom/ns#" term="combine capature groups"/><category scheme="http://www.blogger.com/atom/ns#" term="Jmeter"/><title type='text'>Testing Restful services with Jmeter</title><content type='html'>Outside of Transaction Controllers, regular expressions and xpath extractors are probably used frequently in your scripts.&amp;nbsp; Sometimes you have the need to collect multiple variables from one or more responses and store them in one variable that will become a data parameter in a subsequent request.&lt;br /&gt;
Generally if you read through Jmeter User Group threads you’ll see lots of people trying to do this or at least asking how do I store variables in an array type of data structure.&lt;br /&gt;
In order to do this&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
lets review a few concepts about regex, and Xpath extractors.&amp;nbsp; When you use these types of extractors your parsing a response because your interested in one more pieces of information.&amp;nbsp; This information your interested in matches a pattern.&amp;nbsp; All matches to the pattern are stored in&amp;nbsp; capture groups.&amp;nbsp; These groups are referenced by there&amp;nbsp; variable name and an underscore with a number for the specific capture group.&lt;br /&gt;
If you’ve used regex or Xpath before its fairly easy to specify a specific value by applying a pattern, and then using its resulting capture group when needed.&amp;nbsp; &lt;br /&gt;
But what do you do when you need to collect &lt;em&gt;all the capture groups&lt;/em&gt; and put them together to create a specific data parameter.&lt;br /&gt;
&lt;em&gt;Enter Beanshell&lt;/em&gt;&lt;br /&gt;
Beanshell is a light weight java like scripting language that allows you to do work with Jmeter variables.&amp;nbsp; In the following scenario let’s assume I have to test a rest API service which returns an XML response.&amp;nbsp; In the next request I will need to take specific response data from the 1st API request and &lt;em&gt;collect the data by including a comma in between data values&lt;/em&gt; which will generate from our capture groups to be used in the next out going request.&lt;br /&gt;
Our first API response is the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;user&amp;gt;&lt;br /&gt;
&amp;lt;name&amp;gt;Adam Rowe&amp;lt;/name&amp;gt; &lt;br /&gt;
&amp;lt;uri&amp;gt;myapi/user/+Adam+Rowe&amp;lt;/uri&amp;gt; &lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;id&amp;gt; Adam Rowe&amp;lt;/id&amp;gt;  &lt;br /&gt;
&lt;/span&gt;&amp;lt;/user&amp;gt; &lt;br /&gt;
− &lt;br /&gt;
&amp;lt;user&amp;gt; &lt;br /&gt;
&amp;lt;name&amp;gt;Albert Cruise&amp;lt;/name&amp;gt; &lt;br /&gt;
&amp;lt;uri&amp;gt;myapi/user/Albert+Cruise&amp;lt;/uri&amp;gt; &lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;id&amp;gt;Albert Cruise&amp;lt;/id&amp;gt;  &lt;br /&gt;
&lt;/span&gt;&amp;lt;/user&amp;gt; &lt;br /&gt;
− &lt;br /&gt;
&amp;lt;user&amp;gt;&lt;br /&gt;
I’ve highlighted the parts of the response that I”m interested in in blue.&amp;nbsp; We want to be able to collect the users id values which are shown by &amp;lt;id&amp;gt; tag in &lt;span style=&quot;color: blue;&quot;&gt;blue&lt;/span&gt;.&lt;br /&gt;
We then need to append them in in one variable and store a comma value in between each of the capture groups.&amp;nbsp;&amp;nbsp; The following screen shot shows how we would then use this newly created variable that contains a list of ids shown here as &lt;strong&gt;${list_of_users}&lt;/strong&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXkoMhpUS96cF1VOpkmd8etXPpbJ4PuFK_KWoNojGvzQ_1OrI3qGDY_Mi22hcoJ9-lA0yCVK_YPzudRRkX2fAyY_7b5osSEnm1fw3U2mXu9SEx44qG5hNFzJAA5Foez5a0zXSM_uHAcUw/s1600-h/api1_snapshot9.jpg&quot;&gt;&lt;img alt=&quot;api1_snapshot&quot; border=&quot;0&quot; height=&quot;437&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyD11D9h9bTElzQke9UCalYezCMb4Dx_GfTuQtYq_GTw8BCM9e4eBEh0nhwwxscjn9nWLgmd5wu3J_fSIUbQpPdcwAUtj_M8H0UYKLWkaJTZZdHQSDIEcPxNvvI5RI3qflPYSuapAs2EQ/?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;&quot; title=&quot;api1_snapshot&quot; width=&quot;507&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
Our test plan:&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMk5Ayefs0RNcvOhByyiGeKlTWebdL9uI08h7q2ULe7RdZXyLtN8y823yumMaXcRcXRyGtQEU8rji8i8iIQ4PRHHwIB7erCDEWgLLqFaIrQ_J2x2BgOa52EbBhc_XbJjSw93N17huttpo/s1600-h/api2_treeshot5.jpg&quot;&gt;&lt;img alt=&quot;api2_treeshot&quot; border=&quot;0&quot; height=&quot;424&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBWQ2qdT07khmcgTlF2DCcw8PqhTb3pVFKzj4MjDUKe2ypp4DD_5AxVnJ61vWvRd2mQ9rC-pH_iokh7FTj7hl5__VrDYirG6yCEfZEwbo3B-G5wT0zTbyGrhMV62LOBC1OzsSAMEJITbU/?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;&quot; title=&quot;api2_treeshot&quot; width=&quot;338&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
In the response of ListUsers Transaction /datamanager/Collection/all we can apply a xpath extractor to collect the different &amp;lt;id&amp;gt; tag values which will be returned in the response.&amp;nbsp; In Requesting Users Transaction specifically the /user request we apply a BeanShell &lt;strong&gt;Pre-processor&lt;/strong&gt; which is applied before the request.&amp;nbsp; In this Beanshell preprocess element we will access different variables that are set in the Jmeter scope in order to reference them in the beanshell scope.&amp;nbsp; Below is a sample of basic code used to do this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;http://pastie.org/689987.js&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
This simple code snippet does the following:&lt;br /&gt;
a) gets the total number of Xpath capture groups another words the total times id’s was collected&lt;br /&gt;
b) Loops through the total number of capture groups appending the value and a comma into the &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; “list_of_users” variable.&lt;br /&gt;
&lt;br /&gt;
c) it removes any extra unneeded characters&lt;br /&gt;
d) places the newly constructed variable back in jmeter scope.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can &lt;a href=&quot;http://dl.dropbox.com/u/398664/API_Example.jmx&quot; target=&quot;_blank&quot;&gt;download the template&lt;/a&gt; or if your fancy pants use git&lt;br /&gt;
&lt;code&gt;git://github.com/mordechai/Sample_Code.git&amp;nbsp;&lt;/code&gt;</content><link rel='replies' type='application/atom+xml' href='http://mordechailehrer.blogspot.com/feeds/8235454671722512777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mordechailehrer.blogspot.com/2009/11/testing-restful-services-with-jmeter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4648324161118337987/posts/default/8235454671722512777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4648324161118337987/posts/default/8235454671722512777'/><link rel='alternate' type='text/html' href='http://mordechailehrer.blogspot.com/2009/11/testing-restful-services-with-jmeter.html' title='Testing Restful services with Jmeter'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09817186693776752896</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyD11D9h9bTElzQke9UCalYezCMb4Dx_GfTuQtYq_GTw8BCM9e4eBEh0nhwwxscjn9nWLgmd5wu3J_fSIUbQpPdcwAUtj_M8H0UYKLWkaJTZZdHQSDIEcPxNvvI5RI3qflPYSuapAs2EQ/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4648324161118337987.post-5916269027820633123</id><published>2009-07-13T13:15:00.001-07:00</published><updated>2010-01-03T07:46:33.386-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fun"/><category scheme="http://www.blogger.com/atom/ns#" term="parsing"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="sparklines"/><title type='text'>Ruby Sparklines</title><content type='html'>My very bright younger sister was visiting me a few weeks ago.  While the rest of the family was enjoying some relax time we decided to mess around with some Ruby.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;I wanted to show her how easy it would be to open a file, parse it, and then create a sparkline.  The code below is actually parsing a native_stderr.log created by Websphere during my test runs.&lt;br /&gt;
&lt;script src=&quot;http://pastie.org/544305.js&quot;&gt;
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://mordechailehrer.blogspot.com/feeds/5916269027820633123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mordechailehrer.blogspot.com/2009/07/sample.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4648324161118337987/posts/default/5916269027820633123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4648324161118337987/posts/default/5916269027820633123'/><link rel='alternate' type='text/html' href='http://mordechailehrer.blogspot.com/2009/07/sample.html' title='Ruby Sparklines'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09817186693776752896</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4648324161118337987.post-4597412839683745329</id><published>2009-07-11T14:43:00.001-07:00</published><updated>2010-01-03T07:44:38.325-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="automation"/><category scheme="http://www.blogger.com/atom/ns#" term="Jmeter"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="process automation"/><category scheme="http://www.blogger.com/atom/ns#" term="staf"/><category scheme="http://www.blogger.com/atom/ns#" term="stax"/><title type='text'>Jmeter remote execution, log collection via STAF / STAX</title><content type='html'>One of the biggest challenges after learning your way around Jmeter is figuring out a way to organize and retrieve results in an automated way. There are different documented ways of doing this via Ant scripts or even neat graphing results like Performance Bling. Though my needs were different and after much looking around, coding and testing my performance environment is made up of 3 major areas.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
i) Jmeter&lt;br /&gt;
ii) STAF / STAX&lt;br /&gt;
iii) Ruby&lt;br /&gt;
My focus will be on integrating STAF / STAX why I choose STAX as the glue between the different parts in my performance environment.. &lt;br /&gt;
So what&#39;s Staf?&lt;br /&gt;
Staf can be thought of as a pseudo command shell that allows for specific commands of work to be executed on local or remote host machines depending upon permission settings of the caller and receiver of the requesting action. STAF can perform specific functions or tasks that are generally related to process automation such as file manipulations, command line actions, or logging functions. The focus moves away from code and OS specifics to completing pre-defined tasks of work to be called more efficiently. &lt;br /&gt;
A STAF action can be broken up into processes or commands. Both contain specific parameters and have pre-defined actions for what they do. In order to really benefit from combining multiple STAF commands into one script we&#39;ll need to look at STAX.&lt;br /&gt;
STAX is a service plug-in of STAF that allows for STAF commands to be written in XML. In STAX files STAF calls can interact with python using the &amp;lt;script&amp;gt; tags. The resulting action of a STAF call is returned by the STAXResult variable which is really a python list object. Inside this object two values are stored. The first indicates the STAFResult or value of the STAF call&#39;s execution status 1 or 0, the second value contains the standard out or error message if its set to store it.&lt;br /&gt;
So lets look at our requirements for our Jmeter scenario.&lt;br /&gt;
We want to be able to:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;a) start Jmeter and execute a script &lt;/li&gt;
&lt;li&gt;b) collect result logs including error logs &lt;/li&gt;
&lt;li&gt;c) combine files where necessary. &lt;/li&gt;
&lt;/ul&gt;So lets begin by creating a function that will understand this:&lt;br /&gt;
&lt;div style=&quot;background-color: #f4f4f4; border-bottom: gray 1px solid; border-left: gray 1px solid; border-right: gray 1px solid; border-top: gray 1px solid; cursor: text; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 8pt; height: 34px; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; width: 39.1%;&quot;&gt;jmeter -n -t myLoadTestScript.jmx&lt;br /&gt;
&lt;/div&gt;and turn it into this&lt;br /&gt;
&lt;div style=&quot;background-color: #f4f4f4; border-bottom: gray 1px solid; border-left: gray 1px solid; border-right: gray 1px solid; border-top: gray 1px solid; cursor: text; font-size: 8pt; height: 51px; line-height: 12pt; margin: 20px 0px 10px; max-height: 200pxfont-family:consolas,&#39;Courier New&#39;,courier,monospace; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; width: 102.93%;&quot;&gt;&lt;div style=&quot;background-color: #f4f4f4; border-bottom-style: nonefont-family:consolas,&#39;Courier New&#39;,courier,monospace; border-left-style: none; border-right-style: none; border-top-style: none; color: black; font-size: 8pt; height: 41px; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 109.64%;&quot;&gt;&lt;pre style=&quot;background-color: #f4f4f4; border-bottom-style: nonefont-family:consolas,&#39;Courier New&#39;,courier,monospace; border-left-style: none; border-right-style: none; border-top-style: none; color: black; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 100%;&quot;&gt;&lt;span style=&quot;color: #606060;&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;call&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;&#39;runJmeter&#39;&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&#39;apu-testmachine&#39;,LinuxjmeterPath,&#39;testscript_Linux.jmx&#39;,&#39;/opt/Jmeter/bin/scripts/GA&#39;,testDuration,&#39;/opt/Jmeter/bin/scripts/GA&#39;,&#39;/opt/Jmeter/bin/scripts/GA&#39; + &#39;/staxRun.log&#39;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;call&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;script src=&quot;http://pastie.org/544633.js&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
The idea here is that we ask STAF to make a STAF Command call using STAX code. We pass our Jmeter executable location, the test script, working directory, duration and other needed values.&lt;br /&gt;
This command line call will invoke Jmeter for the length of the test. Once the timer duration value has reached the &quot;testDuration&quot; value then the STAF process executing on the machine will be ended abruptly. This is important to keep in mind because &lt;strong&gt;this is the same as killing Jmeter&#39;s process&lt;/strong&gt; during a test run.&lt;br /&gt;
Fortunately on Linux this is enough to stop the test by killing the Jmeter process which is a child process of the STAF command executing on that machine. For Windows machines executing this code the Jmeter process will not be killed. Unfortunately you will need to use a separate function to kill Jmeter on windows.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border-bottom-style: nonefont-family:consolas,&#39;Courier New&#39;,courier,monospace; border-left-style: none; border-right-style: none; border-top-style: none; color: black; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 100%;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;pre style=&quot;border-bottom-style: nonefont-family:consolas,&#39;Courier New&#39;,courier,monospace; border-left-style: none; border-right-style: none; border-top-style: none; color: white; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 100%;&quot;&gt;&lt;span style=&quot;color: #606060;&quot;&gt;   &lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: #f4f4f4; border-bottom-style: nonefont-family:consolas,&#39;Courier New&#39;,courier,monospace; border-left-style: none; border-right-style: none; border-top-style: none; color: black; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 100%;&quot;&gt;&lt;span style=&quot;color: #606060;&quot;&gt;   &lt;/span&gt;LinuxjmeterPath = &lt;span style=&quot;color: #006080;&quot;&gt;&#39;/opt/Jmeter/bin/jmeter&#39;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;border-bottom-style: nonefont-family:consolas,&#39;Courier New&#39;,courier,monospace; border-left-style: none; border-right-style: none; border-top-style: none; color: white; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 100%;&quot;&gt;&lt;span style=&quot;color: #606060;&quot;&gt;  &lt;/span&gt; WinjmeterPath = &lt;span style=&quot;color: #006080;&quot;&gt;&#39;C:/Jmeter/jakarta-jmeter-2.3.2/bin/jmeter&#39;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: #f4f4f4; border-bottom-style: nonefont-family:consolas,&#39;Courier New&#39;,courier,monospace; border-left-style: none; border-right-style: none; border-top-style: none; color: black; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 100%;&quot;&gt;&lt;span style=&quot;color: #606060;&quot;&gt;  &lt;/span&gt; winKill = &lt;span style=&quot;color: #006080;&quot;&gt;&quot;taskkill /f /fi \&quot;imagename ne explorer.exe\&quot; /fi \&quot;memusage gt 40000\&quot;&quot;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;border-bottom-style: nonefont-family:consolas,&#39;Courier New&#39;,courier,monospace; border-left-style: none; border-right-style: none; border-top-style: none; color: white; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 100%;&quot;&gt;&lt;span style=&quot;color: #606060;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;http://pastie.org/544693.js&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
The basic idea is that taskkill is being performed via a command process through STAF which will kill the Jmeter process. This isn&#39;t the prettiest way to kill Jmeter but it&#39;s been effective for my testing needs in the past, so I&#39;ve had no pressing need to change it or improve it.&lt;br /&gt;
&lt;br /&gt;
Additionally one might consider performing some type of list process to verify that Jmeter is not running after the duration time has passed on Linux. This is something nice to have, but something I have not had a need for as stated above.&lt;br /&gt;
So the significance of what we&#39;ve discussed so far is that we are able to have 1 function to run on windows, or linux to call and execute a Jmeter test plan. The advantage is that we don&#39;t worry about OS specifics and focus just on the parameters that we are passing. This is very useful if you have several load generator slave machines that need to fire off tests, and each machine may have a slightly different set up. This is also useful for queuing slaves to start tests within the same time frame. Generally the delays between starting the tests are usually insignificant and are impacted more by the processing speed on the machine then in possible bottlenecks of invoking the tests remotely through STAF.&lt;br /&gt;
&lt;br /&gt;
&lt;h5&gt;Ok this is neat but why not just manage remote machines through Jmeter master/ slave set up?&lt;/h5&gt;There are several reasons for using separate slaves to run separate Jmeter instances. The most critical issue for myself was that I was unable to set up (1) Jmeter master to control multiple Jmeter (slaves) with one main log file for response and error logs. It seemed like I would be creating much work and network traffic to transfer such logs in real time. My solution was to run separate instances of Jmeter per machine and store the logs locally. After the test completes STAX is called to collect the respective logs to one computer, I then use a linux command to cat *.extension &amp;gt; new_combined file.extension I then move this file to another machine for parsing, processing and archiving. For some Jmeter users this wont be as useful though I tend to work with very large result files varying from 25 Mb to 250 Mb that are just csv&#39;s; so there&#39;s a lot of information that is being trapped and parsed.&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;http://pastie.org/544696.js&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
So here is another simple example of using a simple command line call that will allow us to something very useful such as combing files. to one file. Before I run this code I&#39;m able to identify the directory and testrun to copy the files from by the naming convention used by the folder name. Every test run creates a timestamp as a part of the directory name. I then scan the directories and identify the last modified directory and am able to construct a relevant path from the last modified folder and then copy the files to be combined.&lt;br /&gt;
&lt;br /&gt;
Here I&#39;ll show how to identify the last modified folder or really the last test result written to disk, and how to copy that file over for processing&lt;br /&gt;
&lt;script src=&quot;http://pastie.org/544690.js&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
I&#39;ve shown how to start Jmeter using STAX, how to collect and copy files when necessary and lastly how to combine different result files that come from Jmeter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In subsequent posts I will show how to collect additional results such as server side metrics, active heap memory usage for Websphere applications, and parse the raw results to create some nice pretty summary reports using Ruby, Win32ole, FasterCsv, and Excel and even sparklines.</content><link rel='replies' type='application/atom+xml' href='http://mordechailehrer.blogspot.com/feeds/4597412839683745329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mordechailehrer.blogspot.com/2009/07/jmeter-remote-execution-log-collection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4648324161118337987/posts/default/4597412839683745329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4648324161118337987/posts/default/4597412839683745329'/><link rel='alternate' type='text/html' href='http://mordechailehrer.blogspot.com/2009/07/jmeter-remote-execution-log-collection.html' title='Jmeter remote execution, log collection via STAF / STAX'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09817186693776752896</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4648324161118337987.post-6044827002921171637</id><published>2009-04-16T15:16:00.001-07:00</published><updated>2010-01-03T07:45:12.531-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Jmeter"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="tools"/><title type='text'>Getting Started in Jmeter</title><content type='html'>A while back feeling increasingly frustrated by commercial load testing tools I decided to take Goranka Bjedov&#39;s advice in her presentation &lt;a href=&quot;http://video.google.com/videoplay?docid=-6891978643577501895&quot; target=&quot;_blank&quot; title=&quot;Google London Test Automation Conference (LTAC) Google Tech Talks September 8th, 2006 Presenter: Goranka Bjedov&quot;&gt;Using Open Source Tools for Performance testing&lt;/a&gt;. &lt;br /&gt;
&lt;div class=&quot;wlWriterSmartContent&quot; id=&quot;scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:ee03058c-702a-486f-921b-395d626f4fdf&quot; style=&quot;display: inline; float: none; margin: 0px; padding: 0px;&quot;&gt;&lt;div&gt;&lt;embed flashvars=&quot;&quot; id=&quot;VideoPlayback&quot; src=&quot;http://video.google.com/googleplayer.swf?docId=-6891978643577501895&amp;amp;hl=en&quot; style=&quot;height: 326px; width: 400px;&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt; &lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;I made the switch to &lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&amp;nbsp;Jmeter and since I&#39;ve been a much happier tester.  I had used Jmeter in the past, but I had never really used it for projects involving complicated flows and correlations.  Generally when I say correlations I&#39;m referring to the process of matching up needed information for further requests by parsing the response of earlier requests.  I shy-ed away from attempting to make the correlations myself because I felt that it required a lot of time up front to get the test working, and also required a higher level of maintenance for each script. Additionally I was concerned about how the added effort needed to analyze this large csv result that was full of all types of noise.  While I found that my concerns were valid, it does take a longer time to create a script, and it does require some maintenance as do all scripts, but what I hadn&#39;t expected was the efficiency and forced process that creating Jmeter scripts lead me to adapt that had been absent while using the commercial tools.&lt;br /&gt;
&amp;lt;rant&amp;gt;&lt;br /&gt;
I&#39;d like to discuss how to effectively tackle Jmeter scripts, and Jmeter results in a further post and focus more on the basics for those just getting stated with Jmeter.&lt;br /&gt;
&amp;lt;/rant&amp;gt;&lt;br /&gt;
If you&#39;re considering switching to Jmeter I think Goranka makes the point very clearly.  Jmeter can do mostly what any other commercial load testing tool can do there are very slim differences.  The key points can be summed up on the following:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt; read the &lt;a href=&quot;http://jakarta.apache.org/jmeter/usermanual/index.html&quot; target=&quot;_blank&quot; title=&quot;Jmeter Manual&quot;&gt;manual&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; become familiar with the &lt;a href=&quot;http://jmeter.markmail.org/&quot; target=&quot;_blank&quot;&gt;Jmeter digest using Marc Mail&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;identify a list of key blogs who sum up the ..less easy to read/follow parts of Jmeter&lt;/li&gt;
&lt;li&gt;find the process of script creation that works for you.&lt;/li&gt;
&lt;li&gt;find someone who uses Jmeter tips from these fellow users are invaluable and can save tons of time..&lt;/li&gt;
&lt;/ul&gt;3 posts that I feel are worth bookmaking and reviewing are:&lt;br /&gt;
Tim&#39;s post on using regular expressions in Jmeter&lt;br /&gt;
&lt;a href=&quot;http://90kts.com/blog/2008/jmeter-tips-and-tricks-correlating-with-regular-expressions/&quot; title=&quot;http://90kts.com/blog/2008/jmeter-tips-and-tricks-correlating-with-regular-expressions/&quot;&gt;http://90kts.com/blog/2008/jmeter-tips-and-tricks-correlating-with-regular-expressions/&lt;/a&gt;&lt;br /&gt;
on representing transactions as states from a simulation model&lt;br /&gt;
&lt;a href=&quot;http://90kts.com/blog/2008/jmeter-tips-and-tricks-application-simulation-models/&quot; title=&quot;http://90kts.com/blog/2008/jmeter-tips-and-tricks-application-simulation-models/&quot;&gt;http://90kts.com/blog/2008/jmeter-tips-and-tricks-application-simulation-models/&lt;/a&gt;&lt;br /&gt;
Coreplex Jmeter variables, parameters,and UDV&#39;s&lt;br /&gt;
&lt;a href=&quot;http://coreplex.blogspot.com/2008/10/jmeter-variables-vs-properties-vs.html&quot; title=&quot;http://coreplex.blogspot.com/2008/10/jmeter-variables-vs-properties-vs.html&quot;&gt;http://coreplex.blogspot.com/2008/10/jmeter-variables-vs-properties-vs.html&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://mordechailehrer.blogspot.com/feeds/6044827002921171637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mordechailehrer.blogspot.com/2009/04/getting-started-in-jmeter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4648324161118337987/posts/default/6044827002921171637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4648324161118337987/posts/default/6044827002921171637'/><link rel='alternate' type='text/html' href='http://mordechailehrer.blogspot.com/2009/04/getting-started-in-jmeter.html' title='Getting Started in Jmeter'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09817186693776752896</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4648324161118337987.post-5019395678024505061</id><published>2009-02-26T06:21:00.001-08:00</published><updated>2010-01-03T07:47:28.737-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="automation"/><category scheme="http://www.blogger.com/atom/ns#" term="process automation"/><category scheme="http://www.blogger.com/atom/ns#" term="staf"/><title type='text'>Load STAF quietly- How To</title><content type='html'>&lt;strong&gt;Problem&lt;/strong&gt;:&amp;nbsp; Staf doesn&#39;t start unless someone logs into the computer or STAFProc window is closed accidentally.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6FtqwJDTlh95WKtGYN1YgiY9Cb51U1Um13QaQPKYEXKnJvOmNsNEzOBHmlWy7jSd3s8LBKdHLPtwVnY5-_R7xsyfV-Zv_eYHFF8QlRNO8ggUbyYqZG8ku5ZeHEWpZcriJkcsCce4AMSE/s1600-h/step12.jpg&quot;&gt;&lt;img alt=&quot;step1&quot; border=&quot;0&quot; height=&quot;78&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmjUeIusIROsMyAGJVA5r8aCF8matKr2ezXJji79jbCtlpA6pjO5wnk45-DJTDIPWs5VFHX8-Ehq_B6zat8WaVAu6k9vfGOBDY0P0HcOVvAQHLmpZHGMziRKi69uJWrYLBLOlkiZW-Hzo/?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px;&quot; width=&quot;244&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
Well don&#39;t fret there&#39;s a very easy solution to get STAF to start up; and get rid of that pesky window.&lt;br /&gt;
&lt;br /&gt;
You can read....&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt; the details found &lt;a href=&quot;http://staf.sourceforge.net/current/STAFFAQ.htm#How%20do%20I%20start%20STAF%20as%20a%20Windows%20service?&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#39;t feel like editing registries, and searching how to create a service try the following solution.&lt;br /&gt;
&amp;nbsp; Add Staf Proc as a scheduled windows task.&lt;br /&gt;
Start -&amp;gt; Control Panel -&amp;gt; Scheduled Tasks -&amp;gt; Add Scheduled Task&lt;br /&gt;
Then select your Staf version&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhswIzNaEx9n-SdGeXouFKqJ97VVneki_EhFAjjlnOYzYB3epVCPXAyRX8bMZZq2vYAEnGzGMOZfJbJMoja-T-D4pa6q40uDzHC5hyXXw-YTfQnYefmDa36T7LVMt8NlafgyaKU18lFv3s/s1600-h/step22.jpg&quot;&gt;&lt;img alt=&quot;step2&quot; border=&quot;0&quot; height=&quot;146&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSjQ-RBNnBNoeBfgT2bV42gJoQKQUq67LyC1LmdijyhsR0kKoxR4GXtOmavzUSTYBgdJMhc6U453CPnbnhyphenhyphenfUagieNimG2YYRxyxEbqFYgG26_JKr6yFBYltq4VpzsRiwISrixeXQArXs/?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px;&quot; width=&quot;244&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
Set the task to run &quot;when the computer starts&quot;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNeBee5E2EOSW9O4vFBmnLxDbz8QrksZwCP1C1v2ayHrufbWsMpUrOer1_n14KJqZurzQ9Cra0rXUQ1zmrBAG4YGTtnMqq_MpKUjqJGEiOlrjAVlNATlLyjRf8gCrcdBvMSTE3NqSusc8/s1600-h/step32.jpg&quot;&gt;&lt;img alt=&quot;step3&quot; border=&quot;0&quot; height=&quot;96&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiidPIsPIZVI33l_aquf8ilT8oXTiadIGDdgVKfyU44rKy4jN_ls610LxHfngZzCfU_j-aO-Yp9T-yw0Ajdz1ttGPCgSBi9phO3lE-I0HuzGZ07S0Lne46Cu5xrziFPODxt1IhZsPj7rvM/?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px;&quot; width=&quot;244&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
Click Next. ( Yes password remains blank - D&#39;oh make sure you have Admin rights when doing this..)&lt;br /&gt;
Now the last step is to delete that pesky Start up process..&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3GgwA8A2RozLhHt_Q7CN6TQgk6YEplYA90QsO60PCxP3onmtEzfzA7UIc8QefGihsKpZTQBGQCjJL7Oy2BTKdtDN3o-XBg523guU13f8Cs8gBc3IiyOt2XPbxNeTVCoytwi47XRHdtaI/s1600-h/del_startup5.jpg&quot;&gt;&lt;img alt=&quot;del_startup&quot; border=&quot;0&quot; height=&quot;56&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2f0Mwz0y2-lZiLORUuurKh-U7Ki9BLH6y1jC6IVOzDH60go-5t-3LEDkKKWlPcZBiOyIknmy5QAJ1sJ8fDbsF6A6bVH-TLS9vC0tQG2Gg2d4dXtd5UbSbVw2eB39dVF2wdpm7WIfyfw4/?imgmax=800&quot; style=&quot;border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px;&quot; width=&quot;244&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
And that&#39;s it.&amp;nbsp; Now when you restart your computer go ahead and give STAF &amp;lt; target machine &amp;gt; ping ping&amp;nbsp; a try.</content><link rel='replies' type='application/atom+xml' href='http://mordechailehrer.blogspot.com/feeds/5019395678024505061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mordechailehrer.blogspot.com/2009/02/load-staf-quietly-how-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4648324161118337987/posts/default/5019395678024505061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4648324161118337987/posts/default/5019395678024505061'/><link rel='alternate' type='text/html' href='http://mordechailehrer.blogspot.com/2009/02/load-staf-quietly-how-to.html' title='Load STAF quietly- How To'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09817186693776752896</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmjUeIusIROsMyAGJVA5r8aCF8matKr2ezXJji79jbCtlpA6pjO5wnk45-DJTDIPWs5VFHX8-Ehq_B6zat8WaVAu6k9vfGOBDY0P0HcOVvAQHLmpZHGMziRKi69uJWrYLBLOlkiZW-Hzo/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry></feed>