<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Social Testing &#124; Social Testing</title>
	<atom:link href="http://blog.bugpub.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bugpub.com</link>
	<description>on bugpub.com</description>
	<lastBuildDate>Tue, 19 Jun 2012 16:56:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Essentials for Test Automation &#8211; survey results here</title>
		<link>http://blog.bugpub.com/2012/06/19/essentials-for-test-automation-survey-results-here/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=essentials-for-test-automation-survey-results-here</link>
		<comments>http://blog.bugpub.com/2012/06/19/essentials-for-test-automation-survey-results-here/#comments</comments>
		<pubDate>Tue, 19 Jun 2012 16:56:00 +0000</pubDate>
		<dc:creator>bugpub</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://stack.bugpub.com/?p=93</guid>
		<description><![CDATA[]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_H8RIeuOZSco/TPkios0fdfI/AAAAAAAAD5I/FZid-u2gXZE/s1600/survey2.JPG"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 291px;" src="http://1.bp.blogspot.com/_H8RIeuOZSco/TPkios0fdfI/AAAAAAAAD5I/FZid-u2gXZE/s400/survey2.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5546502498704913906" /></a></p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_H8RIeuOZSco/TPkiaKj6SHI/AAAAAAAAD5A/ZRHAPmDuFSQ/s1600/survey1.JPG"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 377px;" src="http://2.bp.blogspot.com/_H8RIeuOZSco/TPkiaKj6SHI/AAAAAAAAD5A/ZRHAPmDuFSQ/s400/survey1.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5546502248990394482" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bugpub.com/2012/06/19/essentials-for-test-automation-survey-results-here/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fortunate Test Automation</title>
		<link>http://blog.bugpub.com/2012/06/11/fortunate-test-automation/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fortunate-test-automation</link>
		<comments>http://blog.bugpub.com/2012/06/11/fortunate-test-automation/#comments</comments>
		<pubDate>Mon, 11 Jun 2012 09:32:00 +0000</pubDate>
		<dc:creator>bugpub</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://stack.bugpub.com/?p=90</guid>
		<description><![CDATA[Just imagine you are going to sell your test automation project to Project/Test/QA management in a way as sales managers/engineers present, propose and account a solution. Under solution we can mean outsourcing project development, COTS, open-source assuming paid hosting, integration and support or whatever else. Right automated testing is product &#8230;]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_H8RIeuOZSco/TIPosvHrtCI/AAAAAAAAD4Q/OAs4MKEGeOw/s1600/golf.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 191px;" src="http://3.bp.blogspot.com/_H8RIeuOZSco/TIPosvHrtCI/AAAAAAAAD4Q/OAs4MKEGeOw/s200/golf.jpg" alt="" id="BLOGGER_PHOTO_ID_5513506224092197922" border="0" /></a>Just imagine you are going to sell your test automation project to Project/Test/QA management in a way as sales managers/engineers present, propose and account a solution. Under solution we can mean outsourcing project development, COTS, open-source assuming paid hosting, integration and support or whatever else. Right automated testing is product itself too. As told James Bach &#8220;Useful test automation is a major software project&#8221;. I’m not trying to escape from original topic </p>
<p>Really how you will sell that unclear automation? You need to prepare the best proposal, solution, surveys, fact sheets, comparisons and <span style="font-weight: bold;">of course happy case studies</span>. Once your presentation is polished out &#8211; you are ready to present it to your customer, stakeholders or, in general, decision-makers.</p>
<p>In fact, people like and want real cases, they want to hear that you or whoever else did the same for some of &#8220;Fortune 100&#8243; companies. Moreover they want to know how, why and for how much they had got that. Your potential Clients want to know risks, issues, lessons learnt and benefits of your proposal from other guys who had got the experience. They would like to ask them but usually cannot. And my target as seller is to forestall them, I&#8217;m trying to show them case studies.</p>
<p>Case studies could be personalized or anonymized. The last one appears as pattern (proper or anti) and still serves as message reflecting a real-life situations and experience. Someone may say it&#8217;s tricky to show anonymous reviews/surveys. I&#8217;d rather agree in most cases. But what if your market is so limited and closed for sharing information? Answer &#8211; nothing but tricky hinting. What if your study covers a huge group of customers/users? In this case you can extract some representative groups with the same obtained result/capabilities/behavior/model or generally segment a target audience groups. I apologize for my passion, but statistical analysis is what I like as well as test automation.</p>
<p>The fortunate case studies from me are cheerfully given but please consider them as patterns of proper or <span style="font-weight: bold; color: rgb(204, 0, 0);">happy software automated testing</span>.</p>
<p><span style="font-weight: bold;">Case #1 Various environments support, compatibility with other software, components&#8230;</span><br />Test automation framework is designed as platform-independent. So that test engineers easily run test sets against various environments and combinations of installed software in order to test compatibility and fault tolerance under different real-life usage scenarios. For Web systems it could be running on various browsers and versions, with different combinations of installed plug-ins and add-ons on different set of OSs</p>
<p><span style="font-weight: bold;">Case #2 Multiple Localization testing </span><br />Automated tests are not tied to GUI visible captions, it means <span style="font-weight: bold;">recognition </span>is implemented by checking invariant attributes (ID, location binding in hierarchy, appearance index&#8230;). However localization validation is not nightmare. For that, localization database to be designed which feeds data for checking localization attributes in GUI. Basically you can run a verification of GUI either at runtime or as batch-state-checkpoint. The last one is better as it brings a separate level of testing called GUI localization testing. Other words, whole automation scope is split out on functional testing (the same code without parameterization will test product behavior for all locales) and GUI testing (will just verify appearance using dynamic parameterization from localization DB).</p>
<p><span style="font-weight: bold;">Case #3 Unstable GUI but stable API </span><br />Some companies made and forced a decision of testing by pulling API. It means end-User UI is not touched upon testing. The drawback is that the approach will not cover real user interface but test coverage and stability will be incomparable to functional testing through GUI. Yet other advantages are less expensive overall automation, quicker execution and integration with codebase of AUT.<br />However project decided to have GUI testing anyway. For that, test automation guys came up with GUI testing as additional verification layer which was inlined to API tests. It&#8217;s really simple and clever &#8211; call or change something in application by API, then verify result again with API and additionally and independently in GUI.</p>
<p><span style="font-weight: bold;">Case #4 Business needs to support software As-Is-It-Now for a few years but fixing bugs will be applied by patches, CFs and so forth</span><br />This case is a usual for COTS and enterprise systems. Support requires testing and main effort is regression. Business should make sure that fix does not affect existing functionality. This is very risky to ship critical fix without a round of regression testing. Here is automation can come as cheap or almost free solution (someone just have to run and review results)</p>
<p><span style="font-weight: bold;">Case #5 System does not evaluate significantly between releases. New release is just old one + some fixes + additional features</span><br />It&#8217;s again nice point to leave regression for test automation. The rest effort is spending on new features and bugs. From this point automation becomes very effective as returning investements on automation is continious process. It&#8217;s like planting &#8211; initially you just spend after a while you gather in the crops but a little effort on support still have place.</p>
<p><span style="font-weight: bold;">Case #6 Often commits, often builds</span><br />Making test automation as part of continuous integration in aggressive project environment for providing ASAP and often feedback about build quality. Some tests could be run as sanity checking against each code pre and/or post commit. The rest suite is run upon each new build arrival</p>
<p><span style="font-weight: bold;">Case #7 Mission critical project shipping</span><br />In this case stakeholders may agree to have automated tests as part of delivery package. For instance a new build is not accepted if test automation does not yet ready as planned for a build/release and if whole test suite does not result a Green (passed) result. This is really challengeable. Just imagine test automation is a inseparable part from a product. I like this approach especially for <a href="http://en.wikipedia.org/wiki/Built-in_self-test">self-tests</a> and <a href="http://en.wikipedia.org/wiki/TPT_%28Software%29">embedded </a>automated tests. Take a look at the <a href="http://www.eventhelix.com/RealtimeMantra/FaultHandling/hardware_diagnostics.htm">example</a></p>
<p><span style="font-weight: bold;">Case #8 Our system is a legacy back-end data processing and some unstable (under continuous development) to changes UI. Almost no money on test automation</span><br />under this case goes well a claim &#8220;We just need to support that unknown legacy system with small money&#8221;. Well, if small effort, consider automation of system logs parsing, checking datatbase consistency, reliability and data integrity by running queries periodically, <a href="http://www.codeproject.com/KB/debug/automemorydump.aspx?msg=750761&amp;PageFlow=FixedWidth">automatic memory dumps processing</a> (<a href="http://windbg.info/download/doc/pdf/WinDbg_A_to_Z_color.pdf">learn in depth</a>), build in a memory leaks checkers, <a href="http://at4qa.blogspot.com/2010/08/this-simple-vbs-script-can-be-used-to.html">continous health monitoring of environment</a></p>
<p><span style="font-weight: bold;">Case #9 Test automation is looks like chaotic but it&#8217;s smart distributed one indeed</span><br />Imagine you have a cloud of various environment and you have a smart dispatcher which decides which tests, where and how to run based on its acknowledges about the cloud. This is amazing abstraction that presents accelerated test running relying on wide spread test stands and acknowledged by stands load/usage. System completely controls execution, engineer just to check results out in real-time. IMO it&#8217;s state of art!</p>
<p><span style="font-weight: bold;">Case #10 Integration with 3-rd par</span>ty systems<br />Test automation daemon may sit as listener somewhere in integration point. Automated test should understand native communication language, so listening traffic and verifying result is just a deal. Let say we can create Web services testing (SOAP/WSDL) which utilizes the same data schema as it incorporated in web service itself. Test can proxy, interpret, stub or listen data.</p>
<p><span style="font-weight: bold;">Case #11 Security is a priority number one on Agile (shipping often) project</span><br />It’s not a secret <a href="http://at4qa.blogspot.com/2010/01/automated-security-testing.html">security testing can be perfectly modeled and automated</a>. The core of security tests will work against most of web projects (XSS, SQL injections, session hijacking, tampering, sniffing and so forth). If a project runs short iterations and releasing frequency is high, security tests could be run over and over again against pages and contained. For instance test engine walks through all web pages and then feeds basic dangerous scripts (JS, SQL, VBS, sh) to all fields, then triggering form submission. You can even simulate DOS attacks and brute force password hacking. Although there are already many tools which will do it for you, thus our job is just to automate execution and reporting.</p>
<p>Is it enough?  It does not but I need to stop this story in a fear the story will never finish. Actually any project can produce different cases and practices since inviting a best fit to project solution demands creativity and out of the ordinary thinking. Patterns themselves don&#8217;t require using them as is, they are rather reusable good practices which could be ported and adopted if it make sense in your project. Using combination of patterns may bear new patterns or a single pattern of level higher than reused ones.</p>
<p>It would be very nice if we will share specific cases, patterns and lessons learnt of <span style="font-weight: bold;">fortunate test automation</span>. I just doubt why bloggers running test automation exchange their successes and achievements too rarely for the industry; instead we can found risks, problems, obstacles and why-dont-run-low-ROI-automation mostly in the internet.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bugpub.com/2012/06/11/fortunate-test-automation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Control recognition problem</title>
		<link>http://blog.bugpub.com/2012/06/08/control-recognition-problem/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=control-recognition-problem</link>
		<comments>http://blog.bugpub.com/2012/06/08/control-recognition-problem/#comments</comments>
		<pubDate>Fri, 08 Jun 2012 12:12:00 +0000</pubDate>
		<dc:creator>bugpub</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://stack.bugpub.com/?p=80</guid>
		<description><![CDATA[TestComplete has lots of built-in features to operate with properties and methods of tested object. As was mentioned in a previous section, all wrappers over controls of AUT are implemented in components. This part of codebase is much often subject of changes from release to release and usually those changes &#8230;]]></description>
				<content:encoded><![CDATA[<p  style="text-align: justify; margin-left: 0pt; margin-right: 0pt;font-family:verdana;"><span style="font-size:100%;">TestComplete has lots of built-in features to operate with  properties and methods of tested object. As was mentioned in a previous  section, all wrappers over controls of AUT are implemented in  components. This part of codebase is much often subject of changes from  release to release and usually those changes are unpredictable. One day,  our team was not ready to run in-time full regression tests against  fresh build because of recent changes in DOM tree for many objects.  We  were need to invite something robust, not silent and not verbose</span><span style="font-size:100%;">;</span><span style="font-size:100%;"> this mechanism  should report something into logs when a control was not found directly  but it should attempt to recognize that control using set of provided  properties. </span><span style="font-size:100%;">We developed robust pattern that posses</span><span style="font-size:100%;"> obvious  advantages:</span></p>
<ul  type="disc" style="font-family:verdana;">
<li style="text-align: justify;"><span style="font-size:100%;">Easy  code maintenance: to call an object </span><span style="font-size:100%;">located</span><span style="font-size:100%;"> on a page, just  write something like this:</span></li>
</ul>
<p  style="margin-left: 0pt; margin-right: 0pt; text-align: left; color: rgb(0, 0, 153);font-family:courier new;"><span style="font-size:100%;">var conext =  Common.GetAppTop();</span></p>
<p  style="margin-left: 0pt; margin-right: 0pt; text-align: left;font-family:verdana;"><span style="color: rgb(0, 0, 153);font-size:100%;" >var res = recognizeControl (  w.Panel(0).Panel(0).Panel(0).TextNode(0).Link(0),  ["ObjectType","innerHTML"], ["Link","Log in"], context);</span><span style="font-size:100%;"><i style="font-style: italic;">  </i><span style="font-style: italic;">  </span>           </span></p>
<ul  type="disc" style="font-family:verdana;">
<li style="text-align: justify;"><span style="font-size:100%;">Robust change  management: if object direct path was changed on a page, test log will  report an error but the control will be found indirectly either within a  particular html element (e.g. cell, row) or within whole web page.</span></li>
<li style="text-align: justify;"><span style="font-size:100%;">Automatic checking of correspondence between  properties values of direct object path and specified object properties  for indirect search. In this way, we achieve discipline of test  development process and may reveal hidden mismatches. For instance, this  code can reveal that “Log In” link has changed innerText property to  “Log Innn” but test will continue work with this control because direct  object path is correct.</span></li>
</ul>
<p  style="text-align: justify; margin-left: 0pt; margin-right: 0pt;font-family:verdana;"><span style="font-size:100%;">In conclusion, the proposed approach  of object recognition provides checking relevant properties and  expected object location simultaneously.</span><span style="font-size:100%;"> The code snippet  of the proposed pattern is presented below.</span></p>
<p  style="text-align: justify; margin-left: 0pt; margin-right: 0pt;font-family:verdana;"><span style="font-size:100%;"><br /></span></p>
<div class="Section3"  style="font-family:verdana;">
<p style="text-align: center; margin-left: 0pt; margin-right: 0pt;"><span style="font-size:100%;"><img alt="" src="https://docs.google.com/File?id=df2k428k_8cc6fhhfh_b" width="456" border="0" height="353" /></span></p>
<p style="text-align: center; margin-left: 0pt; margin-right: 0pt;"><span style="font-size:100%;"><b>Figure. </b><b>Test automation framework</b></span></p>
</div>
<div class="Section4"  style="font-family:verdana;">
<p style="text-align: justify; margin-left: 0pt; margin-right: 0pt;"><span style="font-size:100%;"> </span></p>
</div>
<div class="Section5"  style="font-family:verdana;">
<p style="text-align: justify; margin-left: 0pt; margin-right: 0pt;"><span style="font-size:100%;"><span style="font-weight: bold;">Code snippet </span>of  pattern for object recognition and verification </span><span style="font-size:100%;">on the</span><span style="font-size:100%;"> fly </span><span style="font-size:100%;">in <span style="font-weight: bold;">JavaScript</span>:</span></p>
</div>
<p>
<div class="Section6">
<p style="margin-left: 0pt; margin-right: 0pt; text-align: justify;">&nbsp;</p>
<p style="margin-left: 0pt; margin-right: 0pt; text-align: justify;">
<p><font face="consolas"><font color="#0000ff"><font size="2">function</font></font></font><font face="consolas"><font color="#000000"><font size="2"> recognizeControl( directPath, _propCollection, _propValues, topParentPath ) </font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">{</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">try</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp; {</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">var</font></font></font><font face="consolas"><font color="#000000"><font size="2"> res;</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">if</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( </font></font></font><font face="consolas"><font color="#0000ff"><font size="2">typeof</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( _propCollection ) == </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8216;string&#8217;</font></font></font><font face="consolas"><font color="#000000"><font size="2"> )</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">if</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( Init.GetCurBrowser() == </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8220;firefox&#8221;</font></font></font><font face="consolas"><font color="#000000"><font size="2"> )</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _propCollection = _propCollection.replace( /innerText/g, </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8220;innerHTML&#8221;</font></font></font><font face="consolas"><font color="#000000"><font size="2"> );</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; propCollection = _propCollection;</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">else</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; propCollection = Arrays.ConvertArray ( _propCollection );</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">if</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( </font></font></font><font face="consolas"><font color="#0000ff"><font size="2">typeof</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( _propValues ) == </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8216;string&#8217;</font></font></font><font face="consolas"><font color="#000000"><font size="2"> )</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; propValues = _propValues;</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">else</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; propValues = Arrays.ConvertArray( _propValues );</font></font></font></p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">if</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( TypeTraits.IsFit( directPath ) &amp;&amp; directPath.Exists )</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">if</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( TypeTraits.IsFit( _propCollection ) &amp;&amp; TypeTraits.IsFit( _propValues ))</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PropMatch ( directPath, _propCollection, _propValues );</font></font></font></p>
<p>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font face="consolas"><font color="#0000ff"><font size="2">return</font></font></font><font face="consolas"><font color="#000000"><font size="2"> directPath;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></font></font><i><font face="consolas"><font color="#008000"><font size="2">//specified direct link is returned</font></font></font></i></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">var</font></font></font><font face="consolas"><font color="#000000"><font size="2"> res;</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">if</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( TypeTraits.IsFit( topParentPath )&amp;&amp; topParentPath.Exists )</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; res = topParentPath.FindChild( propCollection, propValues, </font></font></font><font face="consolas"><font color="#808000"><font size="2">200</font></font></font><font face="consolas"><font color="#000000"><font size="2"> );</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">if</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( TypeTraits.IsFit( res )&amp;&amp; res.Exists )</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">return</font></font></font><font face="consolas"><font color="#000000"><font size="2"> res; </font></font></font><i><font face="consolas"><font color="#008000"><font size="2">//the object was found located within the Parent object</font></font></font></i></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">else</font></font></font><font face="consolas"><font color="#000000"><font size="2"> {&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">if</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( TypeTraits.IsFit( topParentPath ) &amp;&amp; topParentPath.Exists )</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Log.Warning( </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8216;Can`t find child with property name [ '</font></font></font><font face="consolas"><font color="#000000"><font size="2"> + propCollection.toString()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">' ]; and property value [ '</font></font></font><font face="consolas"><font color="#000000"><font size="2"> + _propValues.toString() + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">' ]; on parent object;&#8217;</font></font></font><font face="consolas"><font color="#000000"><font size="2">,</font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8216;&nbsp;&nbsp;&nbsp; Parent:\r\n&#8217;</font></font></font><font face="consolas"><font color="#000000"><font size="2"> + topParentPath.FullName + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8216;\r\n&nbsp;&nbsp;&nbsp; Page:\r\n&#8217;</font></font></font><font face="consolas"><font color="#000000"><font size="2"> + GetPage().URL, </font></font></font><font face="consolas"><font color="#808000"><font size="2">300</font></font></font><font face="consolas"><font color="#000000"><font size="2">, f );</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; res = GetPage().FindChild ( propCollection, propValues, </font></font></font><font face="consolas"><font color="#808000"><font size="2">200</font></font></font><font face="consolas"><font color="#000000"><font size="2"> );</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">if</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( TypeTraits.IsFit( res ) &amp;&amp;&nbsp; res.Exists )</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">return</font></font></font><font face="consolas"><font color="#000000"><font size="2"> res; </font></font></font><i><font face="consolas"><font color="#008000"><font size="2">//the object was found located within the Page</font></font></font></i></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">else</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Log.Error( </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8216;Cant find child with property name [ '</font></font></font><font face="consolas"><font color="#000000"><font size="2"> + _propCollection.toString() + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">' ]; and property value [ '</font></font></font><font face="consolas"><font color="#000000"><font size="2"> + _propValues.toString() + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">' ]&#8216;</font></font></font><font face="consolas"><font color="#000000"><font size="2">+</font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8221;</font></font></font><font face="consolas"><font color="#000000"><font size="2">);</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">return</font></font></font> <font face="consolas"><font color="#0000ff"><font size="2">false</font></font></font><font face="consolas"><font color="#000000"><font size="2">; </font></font></font><i><font face="consolas"><font color="#008000"><font size="2">//default returning if nothing was found</font></font></font></i></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp; }</font></font></font></p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">catch</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( ex ) {</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Log.Error ( </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8216;Exception occurs in Splitter.recognizeControl&#8217;</font></font></font><font face="consolas"><font color="#000000"><font size="2">, ex.description, </font></font></font><font face="consolas"><font color="#808000"><font size="2">300</font></font></font><font face="consolas"><font color="#000000"><font size="2">, f );</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Init.exceptionHandler( arguments );</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">return</font></font></font> <font face="consolas"><font color="#0000ff"><font size="2">false</font></font></font><font face="consolas"><font color="#000000"><font size="2">;</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp; }</font></font></font></p>
<p>&nbsp;</p>
<p><font face="consolas"><font color="#000000"><font size="2">}</font></font></font></p>
<p>&nbsp;</p>
<p><i><font face="consolas"><font color="#008000"><font size="2">// PropMatch validates if object having direct path has predefined properties as alternatives;</font></font></font></i></p>
<p>&nbsp;</p>
<p><font face="consolas"><font color="#0000ff"><font size="2">function</font></font></font><font face="consolas"><font color="#000000"><font size="2"> PropMatch ( directPath, _propCollection, _propValues ){</font></font></font></p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">var</font></font></font><font face="consolas"><font color="#000000"><font size="2"> str;</font></font></font></p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">try</font></font></font><font face="consolas"><font color="#000000"><font size="2"> {</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">if</font></font></font><font face="consolas"><font color="#000000"><font size="2"> (( </font></font></font><font face="consolas"><font color="#0000ff"><font size="2">typeof</font></font></font><font face="consolas"><font color="#000000"><font size="2"> _propCollection == </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8216;string&#8217;</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ) || ( </font></font></font><font face="consolas"><font color="#0000ff"><font size="2">typeof</font></font></font><font face="consolas"><font color="#000000"><font size="2"> _propCollection == </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8216;number&#8217;</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ))</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _propCollection = </font></font></font><font face="consolas"><font color="#0000ff"><font size="2">new</font></font></font><font face="consolas"><font color="#000000"><font size="2"> Array( _propCollection );</font></font></font></p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">if</font></font></font><font face="consolas"><font color="#000000"><font size="2"> (( </font></font></font><font face="consolas"><font color="#0000ff"><font size="2">typeof</font></font></font><font face="consolas"><font color="#000000"><font size="2"> _propValues == </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8216;string&#8217;</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ) || ( </font></font></font><font face="consolas"><font color="#0000ff"><font size="2">typeof</font></font></font><font face="consolas"><font color="#000000"><font size="2"> _propValues == </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8216;number&#8217;</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ))</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _propValues = </font></font></font><font face="consolas"><font color="#0000ff"><font size="2">new</font></font></font><font face="consolas"><font color="#000000"><font size="2"> Array( _propValues );</font></font></font></p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">for</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( </font></font></font><font face="consolas"><font color="#0000ff"><font size="2">var</font></font></font><font face="consolas"><font color="#000000"><font size="2"> i = </font></font></font><font face="consolas"><font color="#808000"><font size="2">0</font></font></font><font face="consolas"><font color="#000000"><font size="2">; i &lt; _propCollection.length; i++ ){</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">var</font></font></font><font face="consolas"><font color="#000000"><font size="2"> iProp = _propCollection[i].toString();</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">var</font></font></font><font face="consolas"><font color="#000000"><font size="2"> iProp = eval ( directPath.FullName + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8220;.&#8221;</font></font></font><font face="consolas"><font color="#000000"><font size="2"> + iProp + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8220;;&#8221;</font></font></font><font face="consolas"><font color="#000000"><font size="2"> );</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">if</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( </font></font></font><font face="consolas"><font color="#0000ff"><font size="2">typeof</font></font></font><font face="consolas"><font color="#000000"><font size="2"> iProp != </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8216;undefined&#8217;</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ){</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">var</font></font></font><font face="consolas"><font color="#000000"><font size="2"> hasText; </font></font></font><i><font face="consolas"><font color="#008000"><font size="2">// Boolean flag for text existing</font></font></font></i></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">if</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( _propValues[i].indexOf ( </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8216;*&#8217;</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ) == -</font></font></font><font face="consolas"><font color="#808000"><font size="2">1</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ){</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hasText = ( iProp == _propValues[i]);</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">else</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hasText = </font></font></font><font face="consolas"><font color="#0000ff"><font size="2">true</font></font></font><font face="consolas"><font color="#000000"><font size="2">;</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">if</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( !hasText )</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Log.Warning (</font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8220;The direct path to object ["</font></font></font><font face="consolas"><font color="#000000"><font size="2"> + directPath.FullName + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">"] has property ["</font></font></font><font face="consolas"><font color="#000000"><font size="2"> +&nbsp; _propCollection[i] + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8220;] value ["</font></font></font><font face="consolas"><font color="#000000"><font size="2"> + iProp + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">"] but expected value is ["</font></font></font><font face="consolas"><font color="#000000"><font size="2"> + _propValues[i] + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8220;]&#8221;</font></font></font><font face="consolas"><font color="#000000"><font size="2">);</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">else</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log.Warning ( </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8220;Object ["</font></font></font><font face="consolas"><font color="#000000"><font size="2"> + directPath.FullName + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">"] has no property ["</font></font></font><font face="consolas"><font color="#000000"><font size="2"> +&nbsp; _propCollection[i] + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8220;]&#8221;</font></font></font><font face="consolas"><font color="#000000"><font size="2">);</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp; }</font></font></font></p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">catch</font></font></font><font face="consolas"><font color="#000000"><font size="2"> ( ex ){</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp; Log.Error( </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8216;Exception occurs in Splitter.PropMatch&#8217;</font></font></font><font face="consolas"><font color="#000000"><font size="2">, </font></font></font><font face="consolas"><font color="#a31515"><font size="2">&#8220;The direct path to object ["</font></font></font><font face="consolas"><font color="#000000"><font size="2"> + directPath.FullName+</font></font></font><font face="consolas"><font color="#a31515"><font size="2">"] has property ["</font></font></font><font face="consolas"><font color="#000000"><font size="2"> +&nbsp; _propCollection.toString() + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">"] value ["</font></font></font><font face="consolas"><font color="#000000"><font size="2"> + iProp + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">"] but expected value is ["</font></font></font><font face="consolas"><font color="#000000"><font size="2"> + _propValues.toString() + </font></font></font><font face="consolas"><font color="#a31515"><font size="2">"]&#8220;</font></font></font><font face="consolas"><font color="#000000"><font size="2">, </font></font></font><font face="consolas"><font color="#808000"><font size="2">300</font></font></font><font face="consolas"><font color="#000000"><font size="2">, f );</font></font></font></p>
<p>&nbsp;&nbsp;&nbsp; <font face="consolas"><font color="#0000ff"><font size="2">return</font></font></font> <font face="consolas"><font color="#0000ff"><font size="2">false</font></font></font><font face="consolas"><font color="#000000"><font size="2">;</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">&nbsp;&nbsp;&nbsp; }</font></font></font></p>
<p><font face="consolas"><font color="#000000"><font size="2">}</font></font></font></p>
</p>
<p><b style="color: rgb(11, 83, 148);"><font size="2"><br /></font></b></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.bugpub.com/2012/06/08/control-recognition-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This simple VBS script can be used to health monitor your infrastracture</title>
		<link>http://blog.bugpub.com/2012/06/02/this-simple-vbs-script-can-be-used-to-health-monitor-your-infrastracture/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=this-simple-vbs-script-can-be-used-to-health-monitor-your-infrastracture</link>
		<comments>http://blog.bugpub.com/2012/06/02/this-simple-vbs-script-can-be-used-to-health-monitor-your-infrastracture/#comments</comments>
		<pubDate>Sat, 02 Jun 2012 07:58:00 +0000</pubDate>
		<dc:creator>bugpub</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://stack.bugpub.com/?p=73</guid>
		<description><![CDATA[This simple VBS script can be used to health monitor your infrastracture. Each monitored machine should have turn on RPC service. The provided code should be saved as .vbs, e.g. HostsHealthMon.vbs To call the script, run in CL this (or make cmd file to wrap this call):cscript.exe HostsHealthMonitor.vbs>>\\YouRStorage\HostsHealtMon_Log.txt Option ExplicitDim &#8230;]]></description>
				<content:encoded><![CDATA[<p>This simple VBS script can be used to health monitor your infrastracture. Each monitored machine should have turn on RPC service.</p>
<p>The provided code should be saved as .vbs, e.g. HostsHealthMon.vbs</p>
<p>To call the script, run in CL this (or make cmd file to wrap this call):<br />cscript.exe HostsHealthMonitor.vbs>>\\YouRStorage\HostsHealtMon_Log.txt<span class="kwrd"></span><br /><!-- code formatted by http://manoli.net/csharpformat/ -->
<pre class="csharpcode"><br /><br /><span class="kwrd">Option</span> Explicit<br /><br /><span class="kwrd">Dim</span> Hosts, RootUser, RootPwd, forceAlarmCPU, forceAlarmHD, forceAlarmRAM, forceAlarmConnection<br /><span class="kwrd">Dim</span> ptr, partitionRedLimit, CPUUsageRedLimit, RAMFreeRedLimit, IterationDelay, resetCount<br /><span class="kwrd">Dim</span> lastCacheLogPath<br /><span class="kwrd">Dim</span> httpServerUrl<br /><br /><span class="rem">'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</span><br /><span class="rem">' Description:    The Sub is responsible for initialization and reseting (on beginning of each cycle) settings</span><br /><span class="rem">' Populate this set of variables With your data as descibed in comments for each block to configure run</span><br /><span class="rem">'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</span><br /><span class="kwrd">Sub</span> InitVars ()<br />  <br />   <span class="rem">'Machines for checking details: host name or IP, User Id and password</span><br />    Hosts = Array(<span class="str">"host1"</span>, <span class="str">"10.90.23.255"</span>, <span class="str">"host02"</span>, <span class="str">"host03"</span>, <span class="str">"Server01"</span>)<br />    RootUser = Array(<span class="str">"Admin"</span>, <span class="str">"User"</span>, <span class="str">"Admin"</span>, <span class="str">"User01"</span>, <span class="str">"TestUser"</span>)<br />    RootPwd = Array(<span class="str">"123west"</span>, <span class="str">"123west"</span>, <span class="str">"123west"</span>, <span class="str">"123west"</span>, <span class="str">"123west"</span>)<br />   <br />    <span class="rem">'Flags reseting</span><br />    forceAlarmConnection = Array (<span class="kwrd">True</span>, <span class="kwrd">True</span>, <span class="kwrd">True</span>, <span class="kwrd">True</span>, <span class="kwrd">True</span>)<br />    forceAlarmCPU = Array (<span class="kwrd">True</span>, <span class="kwrd">True</span>, <span class="kwrd">True</span>, <span class="kwrd">True</span>, <span class="kwrd">True</span>)<br />    forceAlarmHD = Array (<span class="kwrd">True</span>, <span class="kwrd">True</span>, <span class="kwrd">True</span>, <span class="kwrd">True</span>, <span class="kwrd">True</span>)<br />    forceAlarmRAM = Array (<span class="kwrd">True</span>, <span class="kwrd">True</span>, <span class="kwrd">True</span>, <span class="kwrd">True</span>, <span class="kwrd">True</span>)<br />   <br />    <span class="rem">'Threasholds</span><br />    partitionRedLimit = <span class="str">"5"</span><br />    CPUUsageRedLimit = <span class="str">"95"</span><br />    RAMFreeRedLimit  = <span class="str">"50"</span><br />   <br />    <span class="rem">'Settings for defining frequency of the reporting</span><br />    IterationDelay = 100<br />    resetCount = 5<br />   <br />    <span class="rem">'Only latest results will be stored in this file (no history). E.g. a host had a problem with CPU load in previous full iteration and now it soes not, then the log file will contain nothing about that</span><br />    lastCacheLogPath = <span class="str">"\\hostStorage\HostsHealtMon_Cache.txt"</span><br />    <span class="kwrd">Call</span> Delete_File ( lastCacheLogPath )<br /><br /><span class="kwrd">End</span> <span class="kwrd">Sub</span><br /><br /><span class="rem">'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</span><br /><span class="rem">' Description:    removes specified file</span><br /><span class="rem">' Parameter       sFile - name of folder to be removed</span><br /><span class="rem">'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</span><br /><span class="kwrd">Public</span> <span class="kwrd">Function</span> Delete_File (<span class="kwrd">ByVal</span> sFile)<br /><span class="kwrd">On</span> <span class="kwrd">Error</span> <span class="kwrd">Resume</span> <span class="kwrd">Next</span><br />    <span class="kwrd">Const</span> c_Proc = <span class="str">"Delete_File"</span><br />    <span class="kwrd">Const</span> c_DeleteReadOnly = <span class="kwrd">True</span><br />   <br />    <span class="kwrd">Dim</span> iResult, oFSO<br /><br />    <span class="rem">' Define default error code</span><br />    iResult = <span class="kwrd">True</span><br /><br />    <span class="kwrd">Set</span> oFSO = CreateObject(<span class="str">"Scripting.FileSystemObject"</span>)<br /><br />    <span class="rem">' Check if specified folder exists</span><br />    <span class="kwrd">If</span> <span class="kwrd">Not</span> oFSO.FileExists(sFile) <span class="kwrd">Then</span><br />        iResult = <span class="kwrd">True</span><br /><br />    <span class="rem">' The file found</span><br />    <span class="kwrd">Else</span><br />       <br />        <span class="rem">' Remove specified folder</span><br />        <span class="kwrd">Call</span> oFSO.DeleteFile (sFile, c_DeleteReadOnly)<br /><br />        <span class="rem">' Check operation result</span><br />        <span class="kwrd">If</span> Err.Number &lt;&gt; 0 <span class="kwrd">Then</span><br />            Wscript.Echo <span class="str">"Can't remove the file '"</span> &amp;amp; sFile<br />            iResult = <span class="kwrd">False</span><br />        <span class="kwrd">Else</span><br />            iResult = <span class="kwrd">True</span><br />        <span class="kwrd">End</span> <span class="kwrd">If</span><br /><br />    <span class="kwrd">End</span> <span class="kwrd">If</span> <span class="rem">' The folder found</span><br />    <span class="kwrd">Set</span> oFSO = <span class="kwrd">Nothing</span><br />    Delete_File = iResult<br /><br /><span class="kwrd">End</span> <span class="kwrd">Function</span><br /><br /><span class="rem">'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</span><br /><span class="rem">' Description:    Writes in file</span><br /><span class="rem">' Parameters:    objFile - file object</span><br /><span class="rem">'                strText - text to write</span><br /><span class="rem">' Result:        True / False</span><br /><span class="rem">'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''</span><br /><span class="kwrd">Public</span> <span class="kwrd">Function</span> FileWrite(<span class="kwrd">ByRef</span> sFile, <span class="kwrd">ByVal</span> sText)<br />    <span class="kwrd">Dim</span> iResult<br />    <span class="kwrd">Dim</span> objFSO, objFile<br />    iResult = <span class="kwrd">True</span><br />    <span class="kwrd">Const</span> ForAppending = 8<br />   <br />    <span class="kwrd">Set</span> objFSO = CreateObject(<span class="str">"Scripting.FileSystemObject"</span>)<br />       <br />        Err.Clear<br />        <span class="kwrd">Set</span> objFile = objFSO.OpenTextFile (sFile, ForAppending, <span class="kwrd">True</span>)<br /><br />        <span class="kwrd">If</span> Err.Number &lt;&gt; 0 <span class="kwrd">Then</span><br />            Wscript.Echo <span class="str">"Error appending to file "</span> &amp;amp; sFile<br />            iResult = <span class="kwrd">False</span><br />            Err.Clear<br />            <span class="kwrd">Else</span><br />                objFile.WriteLine sText<br />                objFile.Close<br />           <br />        <span class="kwrd">End</span> <span class="kwrd">If</span><br />               <br />    <span class="kwrd">Set</span> objFSO = <span class="kwrd">Nothing</span><br />    <span class="kwrd">Set</span> objFile = <span class="kwrd">Nothing</span><br />   <br />    FileWrite = iResult<br /><span class="kwrd">End</span> <span class="kwrd">Function</span><br /><br /><br /><span class="kwrd">Sub</span> Main()<br /><br />    InitVars ()<br />   <br />    <span class="kwrd">Do</span> <span class="kwrd">While</span> <span class="kwrd">True</span><br />        <span class="kwrd">On</span> <span class="kwrd">Error</span> <span class="kwrd">Resume</span> <span class="kwrd">Next</span><br />        ptr=0<br />        resetCount = resetCount - 1<br />        <span class="kwrd">For</span> <span class="kwrd">Each</span> Host <span class="kwrd">In</span> Hosts<br />            <span class="kwrd">Set</span> objSWbemLocator = CreateObject(<span class="str">"WbemScripting.SWbemLocator"</span>)<br />           <br />            <span class="kwrd">Dim</span> alarmStr, tmpStr<br />            alarmStr = <span class="str">""</span><br />            tmpStr = <span class="str">""</span><br />           <br />            Err.Clear<br />            <span class="kwrd">Set</span> objWMIService = objSWbemLocator.ConnectServer(Host, <span class="str">"root\CIMV2"</span>, RootUser (ptr), RootPwd (ptr),  <span class="str">"MS_409"</span>)<br />           <br />            <span class="kwrd">If</span> Err.Number &lt;&gt; 0 <span class="kwrd">Then</span><br />                <span class="rem">'Wscript.Echo "Warning establishing RPC connection with " &amp;amp; Host &amp;amp; ": "&amp;amp; Err.description</span><br />                tmpStr = <span class="kwrd">Date</span> &amp;amp; <span class="str">" "</span> &amp;amp; Time &amp;amp; <span class="str">" "</span> &amp;amp; <span class="str">"Error: Unable to establish RPC connection with "</span> &amp;amp; Host &amp;amp; <span class="str">": "</span>&amp;amp; Err.description<br />                <span class="kwrd">If</span> <span class="kwrd">CBool</span>(forceAlarmConnection(ptr)) = <span class="kwrd">True</span> <span class="kwrd">Then</span><br />                    Wscript.Echo tmpStr<br />                    alarmStr = alarmStr &amp;amp; <span class="str">" &lt;br /&gt;"</span> &amp;amp; tmpStr<br />                    forceAlarmConnection(ptr) = <span class="kwrd">False</span><br />                <span class="kwrd">End</span> <span class="kwrd">If</span>   <br />            <span class="kwrd">End</span> <span class="kwrd">If</span><br />           <br />            <span class="rem">'Wscript.Echo Date &amp;amp; " " &amp;amp; Time &amp;amp; " " &amp;amp; Host</span><br />           <br />            <span class="rem">'Show free space on logical disk</span><br />            <span class="kwrd">Set</span> colItems = objWMIService.ExecQuery( _<br />                <span class="str">"SELECT * FROM Win32_LogicalDisk"</span>,,48)<br />            <span class="kwrd">For</span> <span class="kwrd">Each</span> objItem <span class="kwrd">In</span> colItems<br />                <span class="rem">'Wscript.Echo "FreeSpace: " &amp;amp; objItem.FreeSpace</span><br />                <span class="kwrd">If</span> objItem.FreeSpace &lt;&gt;<span class="str">""</span> <span class="kwrd">Then</span><br />                    <span class="kwrd">If</span> <span class="kwrd">CInt</span>(Left(objItem.FreeSpace, Len(objItem.FreeSpace)- 9)) &lt; <span class="kwrd">CInt</span>(partitionRedLimit) <span class="kwrd">Then</span><br />                        tmpStr = <span class="kwrd">Date</span> &amp;amp; <span class="str">" "</span> &amp;amp; Time &amp;amp; <span class="str">" "</span> &amp;amp; <span class="str">"ALARM event - Free space on a partition at : "</span> &amp;amp; Host &amp;amp; <span class="str">" = "</span>  &amp;amp; Left(objItem.FreeSpace, Len(objItem.FreeSpace)- 9) &amp;amp; <span class="str">" GBs"</span><br />                        <span class="kwrd">If</span> <span class="kwrd">CBool</span>(forceAlarmHD(ptr)) = <span class="kwrd">True</span> <span class="kwrd">Then</span><br />                            Wscript.Echo tmpStr<br />                            alarmStr = alarmStr &amp;amp; <span class="str">" &lt;br /&gt;"</span> &amp;amp; tmpStr<br />                            forceAlarmHD(ptr) = <span class="kwrd">False</span><br />                        <span class="kwrd">End</span> <span class="kwrd">If</span><br />                    <span class="kwrd">End</span> <span class="kwrd">If</span><br />                   <br />                <span class="rem">'Else</span><br />                <span class="rem">'    forceAlarmHD(ptr) = True       </span><br />                <span class="kwrd">End</span> <span class="kwrd">If</span><br />            <span class="kwrd">Next</span><br />           <br />            <span class="rem">'Show CPU load percentage</span><br />            <span class="kwrd">Set</span> colItems = objWMIService.ExecQuery( _<br />                <span class="str">"SELECT * FROM Win32_Processor"</span>,,48)<br />            <span class="kwrd">For</span> <span class="kwrd">Each</span> objItem <span class="kwrd">In</span> colItems<br />                <span class="rem">'Wscript.Echo "CPU load on: " &amp;amp; Host &amp;amp; " = "  &amp;amp; objItem.LoadPercentage</span><br />                <span class="kwrd">If</span> <span class="kwrd">CInt</span>(objItem.LoadPercentage) &gt; <span class="kwrd">CInt</span>(CPUUsageRedLimit) <span class="kwrd">Then</span><br />                    WScript.Sleep(3000)<br />                    <span class="kwrd">If</span> <span class="kwrd">CInt</span>(objItem.LoadPercentage) &gt; <span class="kwrd">CInt</span>(CPUUsageRedLimit) <span class="kwrd">Then</span> <span class="rem">'Double check after 5 sec</span><br />                   <br />                        tmpStr = <span class="kwrd">Date</span> &amp;amp; <span class="str">" "</span> &amp;amp; Time &amp;amp; <span class="str">" "</span> &amp;amp; <span class="str">"ALARM event - CPU usage on: "</span> &amp;amp; Host &amp;amp; <span class="str">" = "</span>  &amp;amp; objItem.LoadPercentage &amp;amp; <span class="str">" %"</span><br />                       <br />                        <span class="kwrd">If</span> <span class="kwrd">CBool</span>(forceAlarmCPU(ptr)) = <span class="kwrd">True</span> <span class="kwrd">Then</span><br />                            Wscript.Echo tmpStr<br />                            alarmStr = alarmStr &amp;amp; <span class="str">" &lt;br /&gt;"</span> &amp;amp; tmpStr<br />                            forceAlarmCPU(ptr) = <span class="kwrd">False</span><br />                        <span class="kwrd">End</span> <span class="kwrd">If</span><br />                       <br />                    <span class="kwrd">End</span> <span class="kwrd">If</span><br />                   <br />                <span class="rem">'Else</span><br />                <span class="rem">'    forceAlarmCPU(ptr) = True       </span><br />                <span class="kwrd">End</span> <span class="kwrd">If</span><br />            <span class="kwrd">Next</span><br />           <br />            <span class="rem">'Show Memory MB free space</span><br />            <span class="kwrd">Set</span> colItems = objWMIService.ExecQuery( _<br />                <span class="str">"SELECT * FROM Win32_PerfFormattedData_PerfOS_Memory"</span>,,48)<br />            <span class="kwrd">For</span> <span class="kwrd">Each</span> objItem <span class="kwrd">In</span> colItems<br /><br />                <span class="kwrd">If</span> <span class="kwrd">CInt</span>(objItem.AvailableMBytes) &lt; <span class="kwrd">CInt</span>(RAMFreeRedLimit) <span class="kwrd">Then</span><br />                    WScript.Sleep(1000)<br />                    <span class="kwrd">If</span> <span class="kwrd">CInt</span>(objItem.AvailableMBytes) &lt; <span class="kwrd">CInt</span>(RAMFreeRedLimit) <span class="kwrd">Then</span> <span class="rem">'Double check after 5 sec</span><br />                   <br />                        tmpStr = <span class="kwrd">Date</span> &amp;amp; <span class="str">" "</span> &amp;amp; Time &amp;amp; <span class="str">" "</span> &amp;amp; <span class="str">"ALARM event - RAM free space: "</span> &amp;amp; Host &amp;amp; <span class="str">" = "</span>  &amp;amp; objItem.AvailableMBytes &amp;amp; <span class="str">" MB"</span><br />                       <br />                        <span class="kwrd">If</span> <span class="kwrd">CBool</span>(forceAlarmRAM(ptr)) = <span class="kwrd">True</span> <span class="kwrd">Then</span><br />                            Wscript.Echo tmpStr<br />                            alarmStr = alarmStr &amp;amp; <span class="str">" &lt;br /&gt;"</span> &amp;amp; tmpStr<br />                            forceAlarmRAM(ptr) = <span class="kwrd">False</span><br />                        <span class="kwrd">End</span> <span class="kwrd">If</span>                       <br />                       <br />                    <span class="kwrd">End</span> <span class="kwrd">If</span>   <br />                   <br />                <span class="kwrd">End</span> <span class="kwrd">If</span><br />            <span class="kwrd">Next</span><br />       <br />        <span class="rem">'Wscript.Echo alarmStr</span><br />        <span class="kwrd">If</span> alarmStr&lt;&gt;<span class="str">""</span> <span class="kwrd">And</span> alarmStr&lt;&gt;<span class="str">" &lt;br /&gt;"</span> <span class="kwrd">Then</span><br />            <span class="kwrd">Call</span> FileWrite(lastCacheLogPath, alarmStr)<br />        <span class="kwrd">End</span> <span class="kwrd">If</span><br />       <br />        <span class="kwrd">Set</span> objSWbemLocator = <span class="kwrd">Nothing</span><br />        ptr = ptr + 1<br />       <br />        <span class="kwrd">Next</span><br />       <br />        WScript.Sleep(IterationDelay)<br />       <br />        <span class="kwrd">If</span> resetCount &lt;= 0 <span class="kwrd">Then</span><br />            <span class="kwrd">Call</span> InitVars()<br />        <span class="kwrd">End</span> <span class="kwrd">If</span><br />       <br />    <span class="kwrd">Loop</span><br />   <br /><span class="kwrd">End</span> <span class="kwrd">Sub</span><br /><br /><span class="kwrd">Call</span> Main</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.bugpub.com/2012/06/02/this-simple-vbs-script-can-be-used-to-health-monitor-your-infrastracture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Refactoring &#8211; once you meet it&#8230;</title>
		<link>http://blog.bugpub.com/2012/05/29/code-refactoring-once-you-meet-it/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=code-refactoring-once-you-meet-it</link>
		<comments>http://blog.bugpub.com/2012/05/29/code-refactoring-once-you-meet-it/#comments</comments>
		<pubDate>Tue, 29 May 2012 19:12:00 +0000</pubDate>
		<dc:creator>bugpub</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://stack.bugpub.com/?p=70</guid>
		<description><![CDATA[The world changes continously, just so software code should pass through changes too. Basically lifecycle is following: Prototype or simple model Design as skeleton Design refactoring Some stuff is implemented Refactoring should be done over new stuff Code and design are ready But code and design fit badly (inefficient memory &#8230;]]></description>
				<content:encoded><![CDATA[<p>The world changes continously, just so software code should pass through changes too. Basically lifecycle is following:
<ol>
<li>Prototype or simple model</li>
<li>Design as skeleton</li>
<li>Design refactoring</li>
<li>Some stuff is implemented</li>
<li>Refactoring should be done over new stuff</li>
<li>Code and design are ready</li>
<li>But code and design fit badly (inefficient memory management, resource leaks, security flows, unstable run, weak code support, improper interfaces and technologies, code smells&#8230;)</li>
<li>Run new refactoring. Dangerous and nightmare as hard!</li>
</ol>
<p>* This imagination from standpoint of refactoring only.  Change requests, new features and bugs and emergency wishes can appear between any of listed steps! Some projects recursively call Step #1 along any Step #X. Better case if you enjoy a few iterations 4-5-4, 6-7-6 or  7-3-7</p>
<p>The tool for refactoring is refactoring <img src='http://blog.bugpub.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />The standard simple approach is to collect all code issues in defect tracker, assign to a proper player, come up with refactoring method, define expected results and benefits, estimate cost of fix and plan it. Once a refactoring item is ready &#8211; it should be tested inside and outside (Integration), unit tests (if exists) should give green (or rework them to meet with code changes). The last step is integration to production, QA testing and verification that &#8220;Refactoring is took place and results in expected out&#8221;</p>
<p>Usually refactoring is a step after code review or informal design/code inspection. The motivation to run refactoring should be as inside as outside, i.e. inside &#8211; when lead developer or architect initiate code review process and outside &#8211; when QA or customers or management have complains on product quality caused by bad design or coding.</p>
<p>Why refactoring is painful? Simply, more works done behind &#8211; more risks and potential affecting points on each refactoring item. And higher cost of refactoring. The same as for defects discovering and fixing &#8211; rate is continiously rising to production. Do you remeber this curve?<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_H8RIeuOZSco/TDGXYDl7ExI/AAAAAAAAD2g/2wcKbb0ZSK4/s1600/boehm-curve.png"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 175px;" src="http://3.bp.blogspot.com/_H8RIeuOZSco/TDGXYDl7ExI/AAAAAAAAD2g/2wcKbb0ZSK4/s320/boehm-curve.png" alt="" id="BLOGGER_PHOTO_ID_5490335860278366994" border="0" /></a><br />Consequently, frequent code review &#8211; less painful refactoring and less cost totally on refactoring. The general motivation of refactoring should be improve quality  attributes of software, don&#8217;t be driven by this task as something fancy  or trendy.</p>
<p>Now, it&#8217;s time for technical matter &#8211; some refactoring methods most used in industry. The good list of refactorings is listed <a href="http://www.refactoring.com/catalog/">here (http://www.refactoring.com/catalog/)</a>. The list is clearly complicated and easy to understand for those who are familiar with refactoring and coding practices, almost all links show up briefly meaning and how to apply with code excerpts and or UML diagrams. Most of the items can be fit and applied to automated testing either your code in scripting languages or real object oriented languages.</p>
<p>Basically we can break down refactoring approached to 2 groups: running  top-down and running down-top. The first presumes review and  improvements from highest levels (architecture and design) lowering to  lines of code. The second method &#8211; is vice versa. Refactoring is not only finding and fixing issues in code pieces, it&#8217;s also about designing proper patterns up to level of general architecture. Some time ago I made a post on patterns applied for automated testing<a href="http://at4qa.blogspot.com/2010/01/20-essential-design-patterns-for.html"> 20 Essential design patterns for automated testing</a>, however we can use it to revise the current design.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bugpub.com/2012/05/29/code-refactoring-once-you-meet-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Normal distribution in action: defect distribution modeling and prediction</title>
		<link>http://blog.bugpub.com/2012/05/17/normal-distribution-in-action-defect-distribution-modeling-and-prediction/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=normal-distribution-in-action-defect-distribution-modeling-and-prediction</link>
		<comments>http://blog.bugpub.com/2012/05/17/normal-distribution-in-action-defect-distribution-modeling-and-prediction/#comments</comments>
		<pubDate>Thu, 17 May 2012 19:35:00 +0000</pubDate>
		<dc:creator>bugpub</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://stack.bugpub.com/?p=53</guid>
		<description><![CDATA[Preface: to be on the same page, it&#8217;s recommended to review the following WP articles: http://en.wikipedia.org/wiki/Normal_distribution http://en.wikipedia.org/wiki/Theory_of_errors http://en.wikipedia.org/wiki/Errors_and_residuals_in_statistics Though, the notion normal (Gaussian) distribution appears potentially helpful for s/w project planning and analysis, but it&#8217;s strongly recommended to play with this tool carefully and what more important &#8211; with statistically &#8230;]]></description>
				<content:encoded><![CDATA[<p>Preface: to be on the same page, it&#8217;s recommended to review the following WP articles:<br />
<a href="http://en.wikipedia.org/wiki/Normal_distribution">http://en.wikipedia.org/wiki/Normal_distribution</a></p>
<p><a href="http://en.wikipedia.org/wiki/Theory_of_errors">http://en.wikipedia.org/wiki/Theory_of_errors</a></p>
<p><a href="http://en.wikipedia.org/wiki/Errors_and_residuals_in_statistics">http://en.wikipedia.org/wiki/Errors_and_residuals_in_statistics</a></p>
<p>Though, the notion normal (Gaussian) distribution appears potentially helpful for s/w project planning and analysis, but it&#8217;s strongly recommended to play with this tool carefully and what more important &#8211; with statistically sufficient and significant data set. Yes there is a constraint &#8211; the project should be big enough. However, does it really important to forecast new defects and persistent ones on a project having 5000 SLOC? Don&#8217;t think so.</p>
<p>Obviously this theory may help to:<br />
- estimate volume of non-covered/discovered defects. By this &#8211; rebuild test plan to achieve proper test coverage.<br />
- predict volume and distribution of newly revealed product defects. By this &#8211; come up and/or numerically adjust with project sign off date. Somehow metrics could shift project release or may play start point of more resources negotiation.<br />
- model efficient test automation (functional and unit) coverage. By this &#8211; achieve high ROI on automation.</p>
<p>All you need is to:<br />
- select a sampling variable. In our case likely it is number of valid reported defects, e.g. weekly/daily. It depends periods you are going to operate on.<br />
- calculate mean over this variable<br />
- calculate variance of this sampling variable<br />
- Then build and graph <a href="http://en.wikipedia.org/wiki/Probability_density_function">Probability density function (PDF) </a><br />
<img class="tex" src="http://upload.wikimedia.org/math/1/8/4/184fa5540b76903b1653d9f83912265d.png" alt="\frac{1}{\sqrt{2\pi\sigma^2}}\; e^{ -\frac{(x-\mu)^2}{2\sigma^2} } " /></p>
<p>This graph as well as mean and variance calculations are easy task using Excel formulas and graphs. The resulting graph should be build together with original sample in time series (histogram). The view of the curve itself shows &#8220;normality» of this sample. Overlapping of two graphs shows divergence of normality with real state. But don&#8217;t hurry to make judgments on this curve it&#8217;s just tip for you to feel confidence of project control. E.g. the curve with open tail (end in time series) may signal that testing should be prolonged as there are undiscovered defects as expected statistically.</p>
<p>The next advanced application is prediction. To make it you need to build either ideal normal distribution or use existing one. Then the restore function will give you remaining sample sub-set (show future). So that, you may say how many defects will be found for example week by week. Or what functionality needs to be tested with more effort</p>
<p>Finally to calculate precision over your calculations you have to come up with confidence intervals of your observations.<br />
<span style="font-weight: bold;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bugpub.com/2012/05/17/normal-distribution-in-action-defect-distribution-modeling-and-prediction/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Myths and silly Viewpoints about Test Automation</title>
		<link>http://blog.bugpub.com/2012/05/15/myths-and-silly-viewpoints-about-test-automation/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=myths-and-silly-viewpoints-about-test-automation</link>
		<comments>http://blog.bugpub.com/2012/05/15/myths-and-silly-viewpoints-about-test-automation/#comments</comments>
		<pubDate>Tue, 15 May 2012 13:31:00 +0000</pubDate>
		<dc:creator>bugpub</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://stack.bugpub.com/?p=52</guid>
		<description><![CDATA[Test automation is just spending money without return Automated testing is always profitable. Test automation fits to any kind of project Unit testing is better and finds more defects then functional automated testing Record-playback is automated testing Any person with IT background can be auto tester It&#8217;s easy to combine &#8230;]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_H8RIeuOZSco/S6jPRspqz8I/AAAAAAAAD0g/mzlrYMhwaLQ/s1600-h/myths+012807.GIF"><img id="BLOGGER_PHOTO_ID_5451835251882643394" style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 150px; height: 111px;" src="http://3.bp.blogspot.com/_H8RIeuOZSco/S6jPRspqz8I/AAAAAAAAD0g/mzlrYMhwaLQ/s200/myths+012807.GIF" alt="" border="0" /></a></p>
<ol>
<li>Test automation is just spending money without return</li>
<li>Automated testing is always profitable. Test automation fits to any kind of project</li>
<li>Unit testing is better and finds more defects then functional automated testing</li>
<li>Record-playback is automated testing</li>
<li>Any person with IT background can be auto tester</li>
<li>It&#8217;s easy to combine both manual and automate dtesting in a single role person</li>
<li>Test automation ROI is impossible to predict and calculate</li>
<li>Test automation estimation is not real activity</li>
<li>Test automation completely differs from s/w development</li>
<li>Bad developer can be good enough for automation</li>
<li>Developers can effectively develop functional auto tests</li>
<li>Auto testing is not about QA</li>
<li>Auto testing should not be a part of overall QA and QC</li>
<li>Manual testing coverage is preferable on any project/functionality and any project phase</li>
<li>Nobody should rely on automated testing</li>
<li>It&#8217;s impossible to create robust and efficient auto testing at all</li>
<li>Everything can be automated</li>
<li>Is auto testing a sort of machine intelligence? Though, I don&#8217;t trust that</li>
<li>Test automation should be capable to predict any system and environmental outcomes. Whatever issue occur &#8211; auto test suite should remove a problem and/or think out a new workflow path, recovery scenario, invent workaround from a scratch</li>
<li>Test automation is about writing a few code lines which result in testing major functionality. It&#8217;s easy!</li>
</ol>
<p>I wish to hear more myths and strange points you ever met on test automation. Let&#8217;s share yours here commenting to this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bugpub.com/2012/05/15/myths-and-silly-viewpoints-about-test-automation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Private bug tracker easiest to embedded and engaging sites vistors</title>
		<link>http://blog.bugpub.com/2012/05/10/private-bug-tracker-easiest-to-embedded-and-engaging-sites-vistors/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=private-bug-tracker-easiest-to-embedded-and-engaging-sites-vistors</link>
		<comments>http://blog.bugpub.com/2012/05/10/private-bug-tracker-easiest-to-embedded-and-engaging-sites-vistors/#comments</comments>
		<pubDate>Thu, 10 May 2012 11:28:19 +0000</pubDate>
		<dc:creator>bugpub</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.bugpub.com/?p=480</guid>
		<description><![CDATA[Try it now!]]></description>
				<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://bugpub.com/widget.php"><img class="aligncenter size-large wp-image-481" title="Screen Shot 2012-05-06 at 4.06.54 PM" src="http://blog.bugpub.com/wp-content/uploads/2012/05/Screen-Shot-2012-05-06-at-4.06.54-PM-1024x650.png" alt="" width="459" height="291" /></a></p>
<p style="text-align: center;">
<p style="text-align: center;"><a href="http://bugpub.com/widget.php"><img class="aligncenter size-large wp-image-482" title="Screen Shot 2012-05-06 at 4.30.13 PM" src="http://blog.bugpub.com/wp-content/uploads/2012/05/Screen-Shot-2012-05-06-at-4.30.13-PM-1024x458.png" alt="" width="502" height="225" /></a></p>
<p style="text-align: center;"><strong><a href="http://bugpub.com/widget.php">Try it now</a>!</strong></p>
<p style="text-align: center;">
<p style="text-align: center;">
<p style="text-align: center;">
<p style="text-align: center;">
<p style="text-align: center;">
<p style="text-align: center;">
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://blog.bugpub.com/2012/05/10/private-bug-tracker-easiest-to-embedded-and-engaging-sites-vistors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Voice of community: what are we up to on LinkedIn</title>
		<link>http://blog.bugpub.com/2012/05/09/voice-of-community-what-are-we-up-to-on-linkedin/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=voice-of-community-what-are-we-up-to-on-linkedin</link>
		<comments>http://blog.bugpub.com/2012/05/09/voice-of-community-what-are-we-up-to-on-linkedin/#comments</comments>
		<pubDate>Wed, 09 May 2012 12:15:18 +0000</pubDate>
		<dc:creator>bugpub</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.bugpub.com/?p=471</guid>
		<description><![CDATA[Check out some of our votes and polls which we run for fun! &#160; &#160; &#160; &#160; &#160; &#160; &#160;]]></description>
				<content:encoded><![CDATA[<p style="text-align: center;">Check out some of our votes and polls which we run for fun!<br />
<a href="http://blog.bugpub.com/wp-content/uploads/2012/05/Screen-Shot-2012-05-06-at-4.12.57-PM.png"><img class="aligncenter size-full wp-image-474" title="Screen Shot 2012-05-06 at 4.12.57 PM" src="http://blog.bugpub.com/wp-content/uploads/2012/05/Screen-Shot-2012-05-06-at-4.12.57-PM.png" alt="" width="493" height="460" /></a><a href="http://blog.bugpub.com/wp-content/uploads/2012/05/Screen-Shot-2012-05-06-at-4.12.49-PM.png"><img class="aligncenter size-full wp-image-473" title="Screen Shot 2012-05-06 at 4.12.49 PM" src="http://blog.bugpub.com/wp-content/uploads/2012/05/Screen-Shot-2012-05-06-at-4.12.49-PM.png" alt="" width="544" height="302" /></a><a href="http://blog.bugpub.com/wp-content/uploads/2012/05/Screen-Shot-2012-05-06-at-4.12.39-PM.png"><img class="aligncenter size-full wp-image-472" title="Screen Shot 2012-05-06 at 4.12.39 PM" src="http://blog.bugpub.com/wp-content/uploads/2012/05/Screen-Shot-2012-05-06-at-4.12.39-PM.png" alt="" width="536" height="270" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bugpub.com/2012/05/09/voice-of-community-what-are-we-up-to-on-linkedin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automated security testing</title>
		<link>http://blog.bugpub.com/2012/05/04/automated-security-testing/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=automated-security-testing</link>
		<comments>http://blog.bugpub.com/2012/05/04/automated-security-testing/#comments</comments>
		<pubDate>Fri, 04 May 2012 19:55:00 +0000</pubDate>
		<dc:creator>bugpub</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://stack.bugpub.com/?p=20</guid>
		<description><![CDATA[Mostly testing relies on automated suites for functional testing according to provided test-cases (that can be used for manual replication too). I think it&#8217;s good point to thinking about porting automation concept over other types of testing. First coming to the mind are: localization, compatibility, all types of performance, and &#8230;]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_H8RIeuOZSco/S0JX28xrDwI/AAAAAAAADvc/QepgS3EUYzY/s1600-h/BugsLifeWallpaper800.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_H8RIeuOZSco/S0JX28xrDwI/AAAAAAAADvc/QepgS3EUYzY/s320/BugsLifeWallpaper800.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5422993502846521090" /></a><br />Mostly testing relies on automated suites for functional testing according to provided test-cases (that can be used for manual replication too). I think it&#8217;s good point to thinking about porting automation concept over other types of testing. First coming to the mind are: localization, compatibility, all types of performance, and all types of security and safety testing.</p>
<p>The last two guys &#8211; security and safety &#8211; i believe are proper candidates to be automated. Why? Because of security flows can be introduced while any development and maintenance phase. You might polish out your s/w from security flows but new change request can bring a defect in design which may subsequently make your s/w unsecured (e.g. improper handling cookies or turning off fields validation common mechanism)</p>
<p>Such tests like SQL injections, XSS, session hijacking, cookies substitutions, overflows (as negative tests) and unvalidated I/O, access and permissions control can be easily simulated by test automation and can be run repetitively.<br />Btw, denial of services can be modeled with load, stress and volume testing.</p>
<p>The resource <a href="http://owasp.org">owasp.org</a> provides tons of info about security and hacking on Web. You can find there lots of helpful data.<br />They have a comprehensive list of potential vulnerabilities in s/w:<br /><a href="http://www.owasp.org/index.php/Category:Vulnerability">http://www.owasp.org/index.php/Category:Vulnerability</a><br />and a category of attacks:<br /><a href="http://www.owasp.org/index.php/Category:Attack">http://www.owasp.org/index.php/Category:Attack</a><br />I strongly appreciate this society for their job!</p>
<p>Handy add-ons to Firefox can simplify your process of developing and running hacks. The simple list of essential tools:<br />Tamper Data<br />SQL InjectMe<br />XSSMe<br />View Cookies<br />CookieSwap<br />HackBar</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bugpub.com/2012/05/04/automated-security-testing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
