tag:blogger.com,1999:blog-85749769198484186472024-03-12T16:39:10.373-07:00Test NerdUnknownnoreply@blogger.comBlogger31125tag:blogger.com,1999:blog-8574976919848418647.post-50859900517534524252016-03-10T00:28:00.002-08:002016-03-10T00:28:25.813-08:00My Most Favorite iOS Automation Tools!<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-size: 16px; white-space: pre-wrap;"><span style="font-family: Verdana, sans-serif;">Automation! I am a huge huge fan of automation. Whether it’s Mobile or Desktop … whether you use open source technologies or in-house built frameworks. Does not really matter :) Being a big believer in automation as ultimate solution for “need for speed”, I love following 3 iOS automation tools.</span></span></div>
<b style="font-weight: normal;"><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Verdana, sans-serif;">I was super happy when Google open-sourced Earl-Grey! Let us look at that first...</span></span></div>
<b style="font-weight: normal;"><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Verdana, sans-serif;"><span style="background-color: transparent; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">EarlGrey:</span><span style="background-color: transparent; color: black; font-size: 16px; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><a href="https://github.com/google/EarlGrey" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-size: 16px; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://github.com/google/EarlGrey</span></a></span></div>
<b style="font-weight: normal;"><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Verdana, sans-serif;">Google has open sourced it, Internally Google has used this framework for some of it’s products like Youtube, Calendar or photos et al</span></span></div>
<b style="font-weight: normal;"><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Verdana, sans-serif;">This is a native iOS automation framework which enables you to write clear tests. This framework gets integrated with XCode’s test navigator to run your tests from XCode itself. </span></span></div>
<b style="font-weight: normal;"><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Verdana, sans-serif;">One of the key feature is it’s built-in synchronization mechanism. This mechanism makes your tests run fast and provides improved performance. The built-in synchronization makes the test scripts to wait for UI events to occur. </span></span></div>
<b style="font-weight: normal;"><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Verdana, sans-serif;">Then features like Visibility checks, use like interactions enables framework to be more richer and scalable over any other framework.</span></span></div>
<b style="font-weight: normal;"><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Verdana, sans-serif;">This framework is very easy to set up, just follow the instructions accurately provided on GitHub.</span></span></div>
<b style="font-weight: normal;"><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Verdana, sans-serif;"><span style="background-color: transparent; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">UI Automation:</span><span style="background-color: transparent; color: black; font-size: 16px; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><a href="http://tinyurl.com/gwj9ux3" style="text-decoration: none;"><span style="background-color: white; color: #1155cc; font-size: 16px; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">http://tinyurl.com/gwj9ux3</span></a></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #2b1a0f; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Verdana, sans-serif;">This one is an instrument. The one you can use for automating your user interface tests through some written test-scripts. This is mostly utilized for functional testing and it is provided by Apple. </span></span></div>
<b style="font-weight: normal;"><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #2b1a0f; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Verdana, sans-serif;">You write tests in Javascript which differs from Obj-C. Since not many folks using it and neither Apple keeps updating it, any problem occurs, you don’t get much help with automation.</span></span></div>
<b style="font-weight: normal;"><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; color: #2b1a0f; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Verdana, sans-serif;">We had tried using it in one of my previous companies for UI functional automation however looking at various difficulties we had switched to something better.</span></span></div>
<b style="font-weight: normal;"><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Verdana, sans-serif;"><span style="background-color: transparent; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">KeepItFunctional:</span><span style="background-color: transparent; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><a href="https://github.com/kif-framework/KIF" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-size: 16px; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://github.com/kif-framework/KIF</span></a></span></div>
<b style="font-weight: normal;"><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Verdana, sans-serif;">This is an integration testing framework. It uses XCTest testing framework to write tests.</span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Verdana, sans-serif;">KIF is an open source by Square which allows you to write tests using Obj-C. KIF supports all functionalities like tap, swipe, drag, click etc etc The tests are usually executed against iPhone or iPad simulators and usually gets executed speedier.</span></span></div>
<b style="font-weight: normal;"><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Verdana, sans-serif;">KIF is easy to set-up, install it, turn on the Accessibility inspector and configure it. The KIFTestController is nothing but a test runner. And KIFTestScenarios stores all the steps to perform a test scenario. </span></span></div>
<b style="font-weight: normal;"><span style="font-family: Verdana, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Verdana, sans-serif;">KIF provides an ability to integrate with Jenkins. After every Dev-Check-In or Commit, you can have a smoke test suite, written using KIF, gets executed to ensure nothing obviously is broken. KIF allows you to support and configure continuous deployment for frequent launches of your commits.</span></span></div>
<span style="font-family: Verdana, sans-serif;"><br /></span>Unknownnoreply@blogger.com0Seattle, WA, USA47.6062095 -122.332070847.2636815 -122.9775178 47.9487375 -121.68662379999999tag:blogger.com,1999:blog-8574976919848418647.post-31352055119729096882016-03-03T01:01:00.004-08:002016-03-03T01:06:27.904-08:00Is Quality time-consuming entity?<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "verdana"; font-size: 16px; line-height: 1.38; white-space: pre-wrap;">Lets first look at….What’s Quality? Is it just identifying defects by expert test team? That’s not quality, that’s just a way to get your product to a viable condition so you can release to world. And I agree it could be time consuming process.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "verdana"; font-size: 16px; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>How can we avoid it. </b></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "verdana"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">For that let us first even understand what is the meaning of “achieve quality”. Quality has always been associated with business context. The product concept need to be discussed thoroughly. Chalk out any imperfection right that step than coming into development cycle.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "verdana"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">At the development phase, let us adopt test-driven design concept. The more effective unit tests you have, the early you will identify imperfections/flaws. This will allow you to move faster rather than waiting for test team to come into picture and find defects.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "verdana"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Follow an agile/lean process. That means literally eliminate anything that’s not adding any value! Get rid of unnecessary meetings, and the documentations. Adapt to user acceptance and short stories. Also avoid what we “need in future” as requirements / UI keep ever changing then why to even waste time in “need for future”</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "verdana"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Use an On-demand Cloud Infrastructure. Cloud is everywhere and we all know what are the benefits of using the same. Maintenance hazard is first and foremost thing we can avoid with this model. Provides flexibility, ensure data integrity, increases efficiency et al</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "verdana"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Set up Continuous Deployment. I totally understand getting continuous deployment could be time consuming if there are hurdles faced. However get it clear that it is one time investment but benefits are for life time! This gives you a flexibility to “Build frequently and launch frequently”. Basically it equips you to get a small piece of functionality or feature done with TDD approach and get it out. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "verdana"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Opt-In for Parallel Executions. You can set up multiple important platforms running at the same time. Have your tests seamlessly integrated to run against these multiple combinations (you care about and/or identified from Marketing analysis et al) simultaneously. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "verdana"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Go for Usability Sessions. These are the best sessions. Having real users looking at your product and running through it, will help with finding UI issues/ simplification issues right away. So you can have your real users test it to identify exploratory defects. All of this can be done directly on Prod. You can always use A/B test mechanism.</span></div>
<br />
<span style="font-family: "verdana"; font-size: 16px; vertical-align: baseline; white-space: pre-wrap;">Frequent Alpha-Beta Launches. You can start conducting alpha releases within your team itself or with little larger audience which constitutes product owners during development process. Alpha launch does not mean you have to have a viable and stable product. Once you are close to getting a stable product, you can opt in for beta launches. These sessions will help identify things way early to keep you moving faster!</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-84550440545807976642016-02-24T15:24:00.002-08:002016-02-24T15:24:47.840-08:00From An Idea to Minimum Viable Product!<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;">While working in Silicon Valley learnt about the concept of MVP Stands for Minimum Viable Product.</span></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<br /></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;"><b>Let’s look at what MVP means:</b></span></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<br /></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;">In product development, MVP is described as getting minimum features developed just enough to get trusted customer feedback quickly. This equips product members and various stakeholders to make quick decisions about their awesome idea or concept.</span></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<br /></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;">Usually various start-ups built MVP to know more about adaptability and revenue that their concept might generate.</span></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkYewQjzKL6AQYJNYw0bIgrNpuwU9x8bTZUTWilptnaXuUAC8dbMHmAhjV7mHQ6KsTZKjycQ1u7c0-63dE0LccXEoUPxm9XCqfpv1fY-OqtotLeWheqqXhQNJS9mXcx81G0A5wNy6TiIY/s1600/build-measure-learn.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="333" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkYewQjzKL6AQYJNYw0bIgrNpuwU9x8bTZUTWilptnaXuUAC8dbMHmAhjV7mHQ6KsTZKjycQ1u7c0-63dE0LccXEoUPxm9XCqfpv1fY-OqtotLeWheqqXhQNJS9mXcx81G0A5wNy6TiIY/s400/build-measure-learn.jpg" width="400" /></a></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<br /></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;">Here’s how to go about achieving MVP to launch successfully and quickly:</span></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<br /></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;"><b>Idea – </b>Have an idea in mind... Just pen it down. Penning down your idea or concept would help you draw vision and audience base. It will help eliminate unknowns and uncertainties. This will also help you get align with focus.</span></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<br /></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;"><b>Be Intelligent – </b>Now you have vision, focus, and concept. What’s the next step? Figure out the problem. What pain-point you are trying to solve? Is this really needed? Should it really be built? Answer yourself to build the confidence! As the confidence, the positivity and the believe in idea will take you miles in the run…</span></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<br /></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;"><b>Priority -</b> Outlining relevant and important aspect for MVP is key. As initial step, first identify what exactly you need out of features from your concept. Get it prioritized based on market analysis and trend.</span></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<br /></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;"><b>Develop – </b>Once you know what you want to reach users quicker, building the concept into actuality becomes a critical step. As you are building solution towards identified problem, in the process, you are learning too. Ensure to have metrics/analytics in place. As measurement and leanings will shape up your startup’s engine.</span></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<br /></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;"><b>Cloud –</b> With AWS, Google upcoming Cloud Solution, Micrsoft Cloud Solution…world is moving towards cloud and eventually scalability! However there are many cloud orgs which can help you pay for what you use model. These will help save tons of money providing sustainability and scalability.</span></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<br /></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;"><b>YouTube – </b>Yes Youtube! You might have heard that a video worth of million dollar words! J Youtube allows you to advertise with them. So instead of getting a heavy duty demo for your product or way too many pages to advertise, get a video built. Craft it carefully and message it smartly. Videos go viral now a days and it would be like mouth-publicity for your product to reach millions in no time…</span></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<br /></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;"><b>Duration – </b>As you need to get your idea quickly in market, you are short on time. In such cases focus on Mobile as thats the new and hot industry which will help you run your marathon and not a sprint. Focus on getting something out quickly on iOS and Android. You can put website/ support for all browsers et al to rest for now and build the mobile version first. Also buidling mobile version first help getting a web version up and running down the line.</span></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; line-height: normal; widows: 1;">
<span style="color: #20124d; font-family: "verdana" , sans-serif;"><b><i>Conclusion -</i></b> Getting a Minimum viable product is key for your startup's success. Getting it tested by real end users helps you get feedback right away to modify or revisit the idea. </span></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-43265072064101745072016-02-24T11:53:00.004-08:002016-02-24T11:53:45.370-08:00JASMINE - A Unit Testing Framework<div class="adn ads" role="listitem" style="background-color: white; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; color: #222222; font-family: arial, sans-serif; line-height: normal; padding-bottom: 20px; padding-left: 4px; widows: 1;">
<div class="gs" style="margin-left: 30px;">
<div class="ii gt m15314b5e2e661200 adP adO" id=":et" style="direction: ltr; font-size: 12.8px; margin: 5px 15px 0px 0px; padding-bottom: 5px; position: relative;">
<div class="a3s" id=":ex" style="overflow: hidden;">
<div dir="ltr">
<div class="MsoNormal">
Any small or medium or large App does require unit tests to verify quality of the code during development stage itself. And this provides flexibility to easily change or modify code without worrying about breaking any regressions.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Before even getting into let’s understand BDD S/W development process. BDD as it stands for behavior-driven development emerged from Test-driven development. BDD comprises of techniques and principles of TDD to provide ease on collaboration.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Jasmine, a JS unit test BDD framework, for validating JS functions. Jasmine does not have any dependency on DOM elements nor depends on any other JS unit test framework. This comes with it’s own syntax to write efficient tests.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Here’s you can get code for Jasnmine:</div>
<div class="MsoNormal">
<a href="https://github.com/jasmine/jasmine" style="color: #1155cc;" target="_blank">https://github.com/jasmine/<wbr></wbr>jasmine</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Jasmine provides flexibility either to use Ruby or Python. Once the setup is done as per above given instructions, you can start developing unit tests. It is advisable to develop your unit tests first and then write code.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Angular framework has written by keeping testability in mind. Jasmine whole-heartedly support any app built using Angular just like Mocha or qunit etc</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
You want to write a unit test for a simple mathematics equation</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Sample code:</div>
<div class="MsoNormal">
Describe (‘Maths, function () {</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
//necessary</div>
<div class="MsoNormal">
it(‘should add two numbers accurately’, function() {});</div>
<div class="MsoNormal">
it(‘should subtracts two numbers accurately’, function() {});</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
});</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
describe() method describes test suite. It() describes spec.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
For Angular’s simple controller you can write below unit test:</div>
<div style="background: whitesmoke; border: 1pt solid rgb(204, 204, 204); padding: 7pt;">
<div class="MsoNormal" style="background-repeat: initial initial; border: none; margin-bottom: 7.5pt; padding: 0in;">
<span style="color: #333333; font-family: Monaco; font-size: 10pt;">var myApp = angular.module(</span><span style="color: #dd1144; font-family: Monaco; font-size: 10pt;">'myApp'</span><span style="color: #333333; font-family: Monaco; font-size: 10pt;">,[]); myApp.controller(</span><span style="color: #dd1144; font-family: Monaco; font-size: 10pt;">'<wbr></wbr>GreetingController'</span><span style="color: #333333; font-family: Monaco; font-size: 10pt;">, [</span><span style="color: #dd1144; font-family: Monaco; font-size: 10pt;">'$scope'</span><span style="color: #333333; font-family: Monaco; font-size: 10pt;">, function($scope) { $scope.greeting = </span><span style="color: #dd1144; font-family: Monaco; font-size: 10pt;">'Hola!'</span><span style="color: #333333; font-family: Monaco; font-size: 10pt;">; }]);</span></div>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
describe(‘GreetingsController Example’, function() {</div>
<div class="MsoNormal">
var GreetingController,</div>
<div class="MsoNormal">
scope;</div>
<div class="MsoNormal">
beforeEach(inject(function ($rootScope, $controller) {</div>
<div class="MsoNormal">
scope = $rootScope.$new();</div>
<div class="MsoNormal">
.</div>
<div class="MsoNormal">
.</div>
<div class="MsoNormal">
.</div>
<div class="MsoNormal">
.});</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Now you have an example of basic unit test using Jasmine. You can run all your tests on every commit. These tests are very lightweight, and executes faster.</div>
<div class="MsoNormal">
Achieving Continuous deployment makes it easy.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
On Jenkins, you can install a command line with grunt plugin. Add the command line argument in your Jenkins config file.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
You can see a sample output here:</div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpROkOecYSnvL9yyk1Sh7KEEiH4WTsB9w7vRecJP7f9t9Tv6YLPFsNcn0m-7l24ddLNHMbd2FddTfIg_pZej-okMWkdyJlJu_BYgAVc9tuQluaTS-Dp_Nkx_Z3Sbv9bxohYJ3DLBmJWxw/s1600/code+coverage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="70" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpROkOecYSnvL9yyk1Sh7KEEiH4WTsB9w7vRecJP7f9t9Tv6YLPFsNcn0m-7l24ddLNHMbd2FddTfIg_pZej-okMWkdyJlJu_BYgAVc9tuQluaTS-Dp_Nkx_Z3Sbv9bxohYJ3DLBmJWxw/s320/code+coverage.png" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="yj6qo">
</div>
</div>
</div>
</div>
<div class="hi" style="background: rgb(242, 242, 242); border-bottom-left-radius: 1px; border-bottom-right-radius: 1px; margin: 0px; padding: 0px; width: auto;">
</div>
</div>
<div class="ajx" style="clear: both;">
</div>
</div>
<div class="gA gt acV" style="background-color: white; background-position: initial initial; background-repeat: initial initial; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-style: none; color: #222222; font-family: arial, sans-serif; font-size: 12.8px; line-height: normal; margin: 0px; padding: 0px; widows: 1; width: auto;">
<div class="gB xu" style="border-top-width: 0px; padding: 0px;">
<div class="ip iq" style="border-top-color: rgb(216, 216, 216); border-top-style: solid; border-top-width: 1px; clear: both; margin: 0px 5px 0px 0px; padding: 8px 0px 0px 4px;">
<div id=":ef">
<table class="cf FVrZGe" role="presentation" style="border-collapse: collapse;"><tbody>
<tr><td class="amq" style="margin: 0px; padding: 0px 8px 1px 1px; vertical-align: top; width: 44px;"><img class="ajn bofPge" id=":0_14" jid="shama.keskar@gmail.com" name=":0" src="https://plus.google.com/u/0/_/focus/photos/public/AIbEiAIAAABDCPvxwZamv4iMfiILdmNhcmRfcGhvdG8qKGY3N2NmZGFhM2JlNGI1OWIwN2U3N2FlMjVlMjVkNzhmZDcxNmMxYjQwAT-zPqR7jtZuq7Qf4OATNhnuHc0r?sz=24" style="display: block; height: 24px; width: 24px;" /></td></tr>
</tbody></table>
</div>
</div>
</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-42753077551279793512010-08-31T19:12:00.001-07:002011-09-25T22:01:05.480-07:00All About World of Mobile!Mobile in general is such niche area and glad that at LinkedIn, I am getting to explore as well as expand new horizon.<br />
<br />
My team is focus on supporting Mobile native apps, hybrid app as well as mobile web software test cycles.<br />
<br />
I may not be able to write more here but look forward to a blog from me on engineering.linkedin.comUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-20596824529069614562010-07-06T16:23:00.001-07:002010-12-30T22:07:25.798-08:00Exploratory Testing - Innovative approach<span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"><span class="Apple-style-span" style="line-height: 19px;"><b>Exploratory testi</b>ng is an approach to <a href="http://www.blogger.com/wiki/Software_testing" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; color: #0645ad; text-decoration: none;" title="Software testing">software testing</a> that is concisely described as simultaneous learning, <a href="http://www.blogger.com/wiki/Test_design" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; color: #0645ad; text-decoration: none;" title="Test design">test design</a> and test execution. </span><span class="Apple-style-span" style="line-height: 19px;">While the software is being tested, the tester learns things that together with experience and <a href="http://www.blogger.com/wiki/Creativity" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0645ad; text-decoration: none;" title="Creativity">creativity</a> generates new good tests to run. Exploratory testing is often thought of as a <a class="mw-redirect" href="http://www.blogger.com/wiki/Black_box_testing" style="background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0645ad; text-decoration: none;" title="Black box testing">black box testing</a> technique. Instead, those who have studied it consider it a test <i>approach</i> that can be applied to any test technique, at any stage in the development process. The key is not the test technique nor the item being tested or reviewed; the key is the cognitive engagement of the tester, and the tester's responsibility for managing his or her time</span><span class="Apple-style-span" style="line-height: 19px;">. (Ref: Wikipedia)</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 19px;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 19px;">In a resource crunch situation, especially, when the new features are coming in to huge extent, this innovative approach can make wonders! However appropriate planning, organizing and motivation is desirable to make this approach a success.</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 19px;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 19px;">In short, the approach, involves, getting various stake holders like engineering team members, product managers, UX team members, customer field representatives together and perform an exploratory testing... on given feature or product. It could be simple web 2.0 product or it could be wireless device...does not matter.</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 19px;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 19px;">As long as QA manager/lead outlines proper strategy....and a step by step representation of how to effectively perform exploratory testing or corner case testing... Once you have such step by step guide you can always give a preso to above stakeholders and get them up to speed with concept of exploratory testing. And you can pin point exact ways to make it effective and get best out of it!!</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 19px;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 19px;">When I had conducted this approach, I had come up with 10 steps of effective ways.... think like an end user, act like an end user....relevant to the product that I wanted to get tested thoroughly,... Made sure to get buy in from VP/ Director initially by explaining them approach, impact and result! Rolled it out to engineering. Then got buy in from product manager(s). Rolled it out to them and then field representatives as they deal with customers and they know the issues or most common operations by customers.</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 19px;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 19px;">Overall to avoid duplication of bugs, we have had everyone perform testing at the same time..no matter where they are located within USA :) And then set up IRC channel where constant communication of issues seen was going on to avoid duplication of bugs.</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 19px;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 19px;">Result..we actually end up finding some of the corner case issues, high priority issues! We ended up adding almost 35+ test scenarios in our test repository and automating the same!!</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 19px;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 19px;">This was very well received by my engineering team as well as product manager. Helped save a lot of QA time of performing black box - exploratory testing ..</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif; line-height: 19px;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 19px;"><br />
</span></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-56382778704369904782010-06-21T11:52:00.000-07:002010-06-21T11:52:53.505-07:00Selenium wait()Selenium wait() not defined ? What will happen ?<br />
<br />
Selenium uses the browser to make requests and process the server response. In short, selenium asks for a page and server sends back the response. <br />
The browser then constructs a DOM tree out of the response. Selenium then parses this DOM tree and looks for elements as per the test statements.<br />
<br />
Short example<br />
Step 1 --> @selenium.open("www.google.com")<br />
Step 2 --> @selenium.wait()<br />
Step 3--> @selenium.is_text_present("Google ...")<br />
<br />
Here the request is Step 1. <br />
<br />
Now assuming that the server is not loaded at all, the network latency is very minimal and the client machine has a very fast processor, the time from the first request to receiving the response will STILL be atleast a few miliseconds. So not considering the network latency and delayed response from the server, some time is definitely required for the browser to generate a DOM tree out of the response and then ready the page to be rendered. <br />
<br />
If we do not allow for a wait period, however small it maybe due to ideal network and server load conditions, then selenium will jump from step 1 to step 3. At this point, the DOM tree is not ready and selenium will NOT find the text "Google ..." in the DOM tree. Thus, our test will fail.<br />
<br />
For any test environments, the server response times could be large and selenium has to wait for the response to be completely consumed by the browser and build a DOM tree. Even if we were to make the test environments extremely fast and run at almost no load, there will be some amount of time required for DOM tree creation and parsing :)<br />
<br />
Hence wait() is a basic required function for Selenium and can not be avoided :(Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-54660352764881546152010-06-19T20:59:00.001-07:002010-08-15T22:45:52.320-07:00How to be innovative and how to keep yourself motivatedAt work some times it could be possible that you end up working on certain project and may end up performing kinda similar tasks w/very little variations... So would that become monotonous ?<br />
<br />
Do you think if it becomes monotonous..you may loose productivity to some extent and to help performing excellent at work, you need your motivation to be boost ?<br />
<br />
Well, here is how I keep myself motivated - whether its work or cooking in kitchen. Coming from an Indian background, I almost end up preparing similar kinda breakfast with little variations...my family may get bored with same taste over and over again so I try to add different spices or motivate myself to try creative recipes for the same dish :) Well that truly helps!<br />
<br />
I found below an interesting article published which helps self-motivation:<br />
http://business.timesonline.co.uk/tol/business/management/article5883575.eceUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-13492184663836171342010-06-18T19:34:00.001-07:002010-06-18T19:34:17.969-07:00JMeter or Selenium - Performance Testing of Web AppSome one recently asked me an interesting question "which tool better for performance testing for given web app - Selenium ? or any other open source ?"<br />
<br />
Well here is my takeUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-70158810389368852162010-06-08T23:46:00.000-07:002010-06-13T12:17:32.672-07:00Find bugs - Static Analysis To Look For Bugs In Java codeFind Bugs - A static analysis tool to find logical error in given code snippet. Basically it helps find bugs in Java code. This comes as an Eclipse plug-in.<br />
<br />
There is a way you can integrate Find bugs into the source control you are using for example Perforce. <br />
<br />
This should be integrated on each and every development environment of developer's whether Eclipse or IntelliJ. As you go on writing code, this tool will immediately display errors which could cause eventually potential bugs with coding right away. So it saves time of developers handing over code to QA, QA performs testing and reporting back these bugs. Here is published material bu Find Bugs community as it was used @Google for product AdWords:<br />
<br />
Published Material:<a href="http://books.google.com/books?id=8oZAQAAIAAJ&q=shama+butala&dq=shama+butala&hl=en&ei=6bsMTK6tF5D0NYDs4LUE&sa=X&oi=book_result&ct=result&resnum=1&ved=0CCgQ6AEwAA">Find Bugs Approach As Published</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-16771055651210959022010-06-05T20:19:00.000-07:002010-06-06T02:59:12.454-07:00Methodology - Agile Testing Approach<div style="color: black; font-family: Georgia,"Times New Roman",serif; text-align: left;"></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;">What does Agile Means: </span> </div><ul style="color: black; font-family: Georgia,"Times New Roman",serif;"><li><span style="font-size: small;">Being Agile means creating an environment where change is embraced</span></li>
<li><span style="font-size: small;">Changes in requirements, system knowledge, and /or organization are considered part of normal software development</span></li>
<li><span style="font-size: small;">Agile is about focused collaboration between customers and developers</span></li>
<li><span style="font-size: small;">The main goal is clean code that works, at a minimum investment</span></li>
</ul><div style="color: black; font-family: Georgia,"Times New Roman",serif;"></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;">Why Agile: <span style="font-style: italic;">Reference: </span>[AgileManifesto01] <span style="font-style: italic;">“Individuals and interactions over processes and tools Working software over comprehensive documentation. Customer collaboration over contract negotiation. Responding to change over following a plan. That is, while there is value in the items on. the right, we value the items on the left more”</span> </span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><div style="color: black;"><span style="font-size: small;"> </span><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;"><br />
</span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;">When does Agile Makes sense:</span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><ul><li><span style="font-size: small;">Rapidly develop and deliver software that</span></li>
<li><span style="font-size: small;">meets business needs in the face of an</span></li>
<li><span style="font-size: small;">unpredictable future</span></li>
<li><span style="font-size: small;">Ability to change your mind</span></li>
<li><span style="font-size: small;">Early availability of business value</span></li>
<li><span style="font-size: small;">Option to cancel at any time yet still have value</span></li>
<li><span style="font-size: small;">Handle uncertainty</span></li>
<li><span style="font-size: small;">Visibility to & feedback from the customer</span><span style="font-size: small;"> </span><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;"><br />
</span></li>
</ul><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;">When does Agile makes no sense:</span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><ul><li><span style="font-size: small;">Uncertain and/or unstable success criteria</span></li>
<li><span style="font-size: small;">Uncertain and/or unstable requirements</span></li>
<li><span style="font-size: small;">Immediate access to business expertise</span></li>
<li><span style="font-size: small;">High value in early release of partial functionality</span></li>
<li><span style="font-size: small;">Project can be “self-contained”</span></li>
</ul><div style="color: black;"><span style="font-size: small;"> </span><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;">When does Less Agility makes sense:</span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><ul><li><span style="font-size: small;">Knowable, stable project goals and requirements</span></li>
<li><span style="font-size: small;">Like version 3 of a well-established application</span></li>
<li><span style="font-size: small;">Customer can't absorb frequent releases</span></li>
<li><span style="font-size: small;">High effort of data conversion, user training, …</span></li>
<li><span style="font-size: small;">Team is too large, dispersed, or high turnover</span></li>
<li><span style="font-size: small;">Poor team dynamics</span></li>
<li><span style="font-size: small;">Lack of customer representation and/or poor</span></li>
<li><span style="font-size: small;">customer relationship</span></li>
<li><span style="font-size: small;">Dependence on external supplier's</span></li>
<li><span style="font-size: small;">Long-term maintainability is important</span></li>
<li><span style="font-size: small;">Life- or mission-critical products</span></li>
</ul><div style="color: black; direction: ltr; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> </span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;">There's more than one way to be Agile: </span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><ul><li><span style="font-size: small;">Extreme Programming </span></li>
<li><span style="font-size: small;">Scrum </span></li>
<li><span style="font-size: small;">Crystal</span></li>
<li><span style="font-size: small;">Agile Modeling </span></li>
<li><span style="font-size: small;">Dynamic Systems Development Method</span></li>
<li><span style="font-size: small;">Feature-Driven Development</span></li>
<li><span style="font-size: small;">Adaptive Software Development </span></li>
</ul><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;">Is Agile Appropriate:</span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><ul><li><span style="font-size: small;">§Learning objective</span></li>
<li><span style="font-size: small;">§Practice evaluating projects to see why they would or</span></li>
<li><span style="font-size: small;">§wouldn’t be good candidates for agile development</span></li>
<li><span style="font-size: small;">§Procedure</span></li>
<li><span style="font-size: small;">§Read the Project Profiles in the Labs section</span></li>
<li><span style="font-size: small;">§Discuss the projects in your groups</span></li>
<li><span style="font-size: small;">§What characteristics of the projects make them good</span></li>
<li><span style="font-size: small;">§candidates to be run as agile projects?</span></li>
<li><span style="font-size: small;">§What characteristics make them not so good</span></li>
<li><span style="font-size: small;">§candidates to be agile projects?</span></li>
<li><span style="font-size: small;">§Extra Credit: Analyze your current project's</span><span style="font-size: small;"> </span><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;"><br />
</span></li>
</ul><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;">Test A Little Code A Little:</span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><ul><li><span style="font-size: small;">§You don’t need to write all the test cases first<br />
•1. You have to create of one test that the current code won’t pass<br />
•2. Write code to pass the test<br />
•3. Go back to step 1 </span></li>
<li><span style="font-size: small;">§If it is hard to write a test there may be a design issue</span></li>
<li><span style="font-size: small;">§Each round of test & code includes refactoring of the previous code</span></li>
</ul><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;">Frequent Build and Test:</span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><ul><li><span style="font-size: small;">§Completely build the product and run it through a series of tests to verify basic operation</span></li>
<li><span style="font-size: small;">§“Daily build and smoke test”</span></li>
<li><span style="font-size: small;">§“Continuous integration”</span></li>
<li><span style="font-size: small;">§Works well with large volume projects</span></li>
<li><span style="font-size: small;">§Lowering integration risk</span></li>
<li><span style="font-size: small;">§Exposing big integration errors quickly</span></li>
<li><span style="font-size: small;">§Tracking project progress</span></li>
<li><span style="font-size: small;">§Extra effort/overhead</span></li>
</ul><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;"> How Frequent:</span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><ul><li><span style="font-size: small;">§Not more than a couple of hours between builds</span></li>
<li><span style="font-size: small;">§Build should take 10 minutes</span></li>
<li><span style="font-size: small;">§Asynchronous builds most common</span></li>
<li><span style="font-size: small;">§Check stuff in, the automatic build process</span></li>
<li><span style="font-size: small;">§notices, sends out email of result</span></li>
<li><span style="font-size: small;">§Synchronous builds give team a chance to reflect</span></li>
<li><span style="font-size: small;">§Builds scheduled at certain times for all programmers</span></li>
</ul><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;">Multiple Builds:</span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><div class="separator" style="clear: both; text-align: center;"><span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs7mu8uTDD5PXEoc3FoVMJ5BSoCb_pusFX13A0wETilu9H83MiKxLFYcK24KUkX6XT4GHvW_v-pFQQ8u8u2cxRS8aUREc9dtjo-SO1g_gclIRPwfknMM6-yD1R_7SZWESiMabe8dWvU3I/s1600/CostType.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs7mu8uTDD5PXEoc3FoVMJ5BSoCb_pusFX13A0wETilu9H83MiKxLFYcK24KUkX6XT4GHvW_v-pFQQ8u8u2cxRS8aUREc9dtjo-SO1g_gclIRPwfknMM6-yD1R_7SZWESiMabe8dWvU3I/s320/CostType.png" width="320" /></a></span></div><ul><li><span style="font-size: small;">§Different builds accomplish different goals</span></li>
<li><span style="font-size: small;">§Short, small builds on the test first approach</span></li>
<li><span style="font-size: small;">§Overnight builds to test full integration</span></li>
<li><span style="font-size: small;">§Weekly run more complete tests</span></li>
<li><span style="font-size: small;">§Automation here is key</span></li>
<li><span style="font-size: small;">§Agile sees this as a worthy area to spend<br />
</span></li>
</ul><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;"> Test Coverage Criteria:</span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><ul><li><span style="font-size: small;">§How do I have confidence that my set of test cases is “good enough”?</span></li>
<li><span style="font-size: small;">§Input and output domain coverage</span></li>
<li><span style="font-size: small;">§Boundary value testing</span></li>
<li><span style="font-size: small;">Decision (Branch) coverage</span></li>
</ul><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><ul><li><span style="font-size: small;">Agile Testing good for Agile development projects; can work on conventional projects too. </span></li>
<li><span style="font-size: small;">Don’t implement Agile testing as a whole, but adapt its most valuable concepts </span><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </li>
<li><span style="font-size: small;">Testers should be active members of the team.</span></li>
<li><span style="font-size: small;">Testers often hesitate to speak up during team meetings, share ideas, interact with developers.</span></li>
<li><span style="font-size: small;">Agile only works when there is lots of both formal and informal communication within a team.</span></li>
</ul><span style="font-size: small;">Ongoing Conversation concept.</span><br />
<div style="color: black; font-family: Georgia,"Times New Roman",serif;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><div class="O1" style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.36pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">§With developers</span></div><div class="O1" style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.36pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">§With CSRs </span></div><div class="O1" style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.36pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">§Business Analysts.</span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.36pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"><br />
</span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.36pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">Testers and developers are working together.</span></div><div class="O1" style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.36pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">§Share office</span></div><div class="O1" style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.36pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">§Testers assigned to help particular developers</span></div><div class="O1" style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.36pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">§Test plan evolves through a series of short “drop-in” meetings</span></div><div class="O1" style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.36pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">§Benefits of pairing with developers:</span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.36pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - developers gain insight into potential errors</span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.36pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - testers gain insight into constraints and opportunities.</span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.36pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - together can advance automated testing.</span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.36pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - Grey box: - understand relationship btw parts of the systems. </span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.36pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - understand bugs: what were the root causes?</span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.36pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - what needs to be retested?</span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.36pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> </span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.36pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">Test Status is reported via simple to read charts that answer specific question “What part of code can we stop worrying about?.”</span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.36pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">Stand up reports.</span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.36pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> <br />
<div style="direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">Conversation with a customer is as important as with developers.</span></div><div class="O1" style="direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.84pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">–Remember that customer are trying to figure out what they need, want and are getting, in large part, by trying out the working code.</span></div><div class="O1" style="direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.84pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">–Get feedback from CSRs -> create tests</span></div><div class="O1" style="direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.84pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">–Participate in usability testing</span></div><div style="direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.81in; margin-top: 3.84pt; text-align: left; text-indent: -0.31in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> </span></div><div style="direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">Remember: “ …thinking does not take place inside our heads … Most of our mental activities need external resources.” </span></div></div><div style="color: black;"><span style="font-size: small;"> </span><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><div style="color: black; direction: ltr; line-height: 90%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">Keep in mind that sometimes design docs can be flawed. </span></div><div style="color: black; direction: ltr; line-height: 90%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">Documents can’t be an adequate representation of the working code.</span></div><div style="color: black; direction: ltr; line-height: 90%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">View them as: interesting texts, partly fictional, often useful</span></div><div style="color: black; direction: ltr; line-height: 90%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">Active communication is the key to a successful test plan</span></div><div style="color: black;"><span style="font-size: small;"><br />
</span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"><span style="font-weight: bold;">First, Waste No Time. Evaluate risky areas and test them first</span> </span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - <span style="font-weight: bold;"> </span>We gain an understanding of the product we're testing to the point where we can imagine what kinds of problems are more likely to happen and what problems would have more impact <span style="font-style: italic;">if</span> they happened. Then we put most of our effort into testing for those problems. Agile Testing is concerned with uncovering the most important information as soon as possible. </span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> </span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"><span style="font-weight: bold;">Mission. What's more important? Writing test cases or doing testing?</span> </span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - In Agile Testing we don't start with a task ("write test cases"), we start with a mission. Our mission may be "find important problems fast". If so, then writing test cases may not be the best approach to the test process. If, on the other hand, our mission is "please the FDA auditors", then we not only will have to write test cases, we'll have to write certain kinds of test cases and present them in a specifically approved format. In our case it’s both.</span></div><div style="color: black;"><span style="font-size: small;"> </span><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;"><br />
</span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"><span style="font-weight: bold;">Skills. </span></span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"><span style="font-weight: bold;"> - </span>Knowing the product lets you perform “out of the box” testing </span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"><span style="font-weight: bold;">Exploration.</span><span style="font-weight: bold;"> </span></span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"><span style="font-weight: bold;"> </span>- Use exploratory testing. We prefer to let the next test we do be influenced by the last test we did. This is a good thing, because we're not imprisoned by pre-conceived notions about what we should test, but let ourselves develop better ideas as we go. </span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"><span style="font-weight: bold;">Teaming.</span><span style="font-weight: bold;"> </span> </span></div><div style="color: black; direction: ltr; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - Agile Testers cheat. That is, they do things that our former elementary school teachers would consider cheating: we figure things out in advance where possible, we borrow other people's work, we use every resource and tool we can find. Example: Pair testing: two heads, one computer. This idea has proven valuable in the practice of Extreme Programming, and it works for testing just as well. In our experience of normal testing, testers usually work quietly and alone, rather than hunting for bugs like a pack of rapid wolves.</span><span style="font-size: small;"> Again the message of this presentation is not to try to adapt Agile testing as a whole, but extract and implement the most useful techniques of Agile testing.</span></div><div style="color: black;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><div style="color: black; direction: ltr; font-family: Georgia,"Times New Roman",serif; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">Some of the stuff is being done already.</span></div><div style="color: black; direction: ltr; font-family: Georgia,"Times New Roman",serif; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - Testers have stand up meetings</span></div><div style="color: black; direction: ltr; font-family: Georgia,"Times New Roman",serif; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - Some Interaction with CSRs (manager, team leads)</span></div><div style="color: black; direction: ltr; font-family: Georgia,"Times New Roman",serif; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">What we don’t do yet:</span></div><div style="color: black; direction: ltr; font-family: Georgia,"Times New Roman",serif; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - Closer interaction with developers.</span></div><div style="color: black; direction: ltr; font-family: Georgia,"Times New Roman",serif; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - Closer interaction with CSRs. (primary testers)</span></div><div style="color: black; direction: ltr; font-family: Georgia,"Times New Roman",serif; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - Robust testing, “out-of-the-box” thinking. (for primary testers)</span></div><div style="color: black; direction: ltr; font-family: Georgia,"Times New Roman",serif; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - Grey box: understanding of the system.</span></div><div style="color: black; direction: ltr; font-family: Georgia,"Times New Roman",serif; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - Automation: combine unit tests and our automation tests.</span></div><div style="color: black; direction: ltr; font-family: Georgia,"Times New Roman",serif; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"> - Testing in pairs. </span></div><div style="color: black; direction: ltr; font-family: Georgia,"Times New Roman",serif; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;"><br />
</span></div><div style="color: black; direction: ltr; font-family: Georgia,"Times New Roman",serif; line-height: 80%; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><meta content="text/html; charset=utf-8" http-equiv="Content-Type"></meta> <meta content="PowerPoint.Slide" name="ProgId"></meta> <meta content="Microsoft PowerPoint 2008" name="Generator"></meta> </div><div style="color: black; direction: ltr; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">Increase quality of the product. Find bugs faster.</span></div><div style="color: black; direction: ltr; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">Get more exposure for QA</span></div><div style="color: black; direction: ltr; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">Get better understanding of components.</span></div><div style="color: black; direction: ltr; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">Interact with developers more, which is always good.</span></div><div style="color: black; direction: ltr; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">Get better understanding of the working code.</span></div><div style="color: black; direction: ltr; margin-bottom: 0pt; margin-left: 0.38in; margin-top: 3.84pt; text-align: left; text-indent: -0.38in; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: small;">Deliver marketable product earlier</span></div><div style="color: black;"><span style="font-size: small;"> <br />
</span></div><div style="color: black;"><span style="font-family: Georgia,"Times New Roman",serif; font-size: small;"></span></div><div style="color: black; font-family: Georgia,"Times New Roman",serif;"></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-11906061506350645092010-04-02T00:07:00.000-07:002010-04-04T16:42:29.118-07:00Automated Testing:Hadnling/Managing ever changing UI - Use of CheckSumFollowing post has a bug and an unanswered question - How would you handle dynamically updated web app. I do have some solution in my mind and just need to try it out before throwing as a post. So update soon.... ************<br />
<br />
Firstly we need to understand what is Checksum. According to wikipedia:<br />
A checksum or hash sum is a fixed-size datum computed from an arbitrary block of digital data for the purpose of detecting accidental errors that may have been introduced during its transmission or storage.<br />
<br />
MD5 generated Checksum for a string is unique. And it will always give same checksum value as long as string does not change. Now selenium requests page we can use get_html_source to get back entire html source as a string. Then we can calculate checksums and we store it as our "html data or test data" and proceed with test. <br />
<br />
Next time we run test we again get checksum and compare with the (existing) checksum that was recorded earlier. <br />
<br />
Now there will be 2 scenarios ==> <br />
1. Checksum is identical to recorded one which means there is no change in UI <br />
2. Checksum do not match indicating change in UI. <br />
<br />
If scenario 2) exists, then we can stop testing that particular page and send a report to QA that UI has changed for that particular page!!! At this point individual QA developers can visually inspect changes and verify by running test script meant for that particular page from there own laptops. <br />
<br />
This will ensure that any UI change is taken care of. Sometimes we may get false-positive changes, might be due to some text element or images which don't really affect our test scripts because none of form fields or link ids have changed. Hence local execution of the test by QA will be all that is needed to verify if the GUI has really changed to necessitate script changes or its a non-script breaking changes.<br />
<br />
Furthermore --- checksum algorithm and parsing html source to traverse through DOM to find elements - update soon...Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-80990475638900171572010-03-29T10:52:00.000-07:002010-04-09T12:54:45.273-07:00Automated Production Testing - Why does it raises eyebrows!Every company has different rules and revenue impacts about production environment changes depending users input stream and business model.<br />
<br />
AdWords is one of the most complex project I have ever worked on. AdWords involves huge complex calculations and collections of data and stats. It has various salient features and has a very heavy duty traffic of zillions ..trillions end users. These zillions..trillions end users are expected to perform various combination of actions and transactions. Testing such an application is in itself a challenge. Above all, even thinking about automating such an application was definitely complex and challenging!!<br />
<br />
Certain aspects to take into consideration for automated production testing:<br />
<ul><li> </li>
</ul>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-37164345949094334892010-03-21T20:50:00.000-07:002010-04-04T16:34:51.582-07:00JUnitAs requested posting a blog about Junit<br />
<br />
What is Junit ?<br />
Simple framework for writing and running automated tests. Includes useful abstractions for running tests including test cases, text fixtures and test suites. <br />
<br />
<span class="Apple-style-span" style="color: #274e13;">package junit.samples;</span><br />
<span class="Apple-style-span" style="color: #274e13;"><br />
</span><br />
<span class="Apple-style-span" style="color: #274e13;">import junit.frameworks.*;</span><br />
<span class="Apple-style-span" style="color: #274e13;">import java.util.Vector;</span><br />
<span class="Apple-style-span" style="color: #274e13;">import junit.extensions.*;</span><br />
<span class="Apple-style-span" style="color: #274e13;"><br />
</span><br />
<span class="Apple-style-span" style="color: #274e13;">/**</span><br />
<span class="Apple-style-span" style="color: #274e13;">* sample test for <code> java.util.Vector</code></span><br />
<span class="Apple-style-span" style="color: #274e13;">*/</span><br />
<span class="Apple-style-span" style="color: #274e13;">public class VectorTest extends TestCase {</span><br />
<span class="Apple-style-span" style="color: #274e13;"> protected Vector fEmpty;</span><br />
<span class="Apple-style-span" style="color: #274e13;"> protected Vector fFull;</span><br />
<span class="Apple-style-span" style="color: #274e13;"><br />
</span><br />
<span class="Apple-style-span" style="color: #274e13;">public VectorTest(String name) {</span><br />
<span class="Apple-style-span" style="color: #274e13;"> super(name);</span><br />
<span class="Apple-style-span" style="color: #274e13;">}</span><br />
<span class="Apple-style-span" style="color: #274e13;">public static void main (String[] args) { </span><br />
<span class="Apple-style-span" style="color: #274e13;"> junit.textui.TestRunner.run (suite());</span><br />
<span class="Apple-style-span" style="color: #274e13;">}</span><br />
<span class="Apple-style-span" style="color: #274e13;">...</span><br />
<span class="Apple-style-span" style="color: #274e13;">protected void setUp() {</span><br />
<span class="Apple-style-span" style="color: #274e13;"> fEmpty = newVector();</span><br />
<span class="Apple-style-span" style="color: #274e13;"> fFull = new Vector();</span><br />
<span class="Apple-style-span" style="color: #274e13;"> fFull.addElement(new Integer(1));</span><br />
<span class="Apple-style-span" style="color: #274e13;"> fFull.addElement(new Integer(2));</span><br />
<span class="Apple-style-span" style="color: #274e13;"> fFull.addElement(new Integer(3));</span><br />
<span class="Apple-style-span" style="color: #274e13;">}</span><br />
<span class="Apple-style-span" style="color: #274e13;">public static Test suite() {</span><br />
<span class="Apple-style-span" style="color: #274e13;"> return new TestSuite(VectorTest.class);</span><br />
<span class="Apple-style-span" style="color: #274e13;">}</span><br />
<span class="Apple-style-span" style="color: #274e13;">public void testCapacity() {</span><br />
<span class="Apple-style-span" style="color: #274e13;"> int size= fFull.size();</span><br />
<span class="Apple-style-span" style="color: #274e13;"> for (int i=0; i < 100; i++)</span><br />
<span class="Apple-style-span" style="color: #274e13;"> fFull.addElement(new Integer(i));</span><br />
<span class="Apple-style-span" style="color: #274e13;"> assertTrue(fFull.size() == 100+size);</span><br />
<span class="Apple-style-span" style="color: #274e13;">}</span><br />
<span class="Apple-style-span" style="color: #274e13;">public void testClone() {</span><br />
<span class="Apple-style-span" style="color: #274e13;"> Vector clone = (Vector)fFull.clone();</span><br />
<span class="Apple-style-span" style="color: #274e13;"> assertTrue(clone.size() == fFull.size());</span><br />
<span class="Apple-style-span" style="color: #274e13;"> assertTrue(clone.contains(new Integer(1)));</span><br />
<span class="Apple-style-span" style="color: #274e13;">}</span><br />
<span class="Apple-style-span" style="color: #274e13;">}</span><br />
<span class="Apple-style-span" style="color: #274e13;">...</span><br />
<span class="Apple-style-span" style="color: #274e13;"><br />
</span><br />
What is JUnitPerf ?<br />
Collection of JUnit tests decorators used to measure the performance and scalability of functionality contained within existing JUnit tests. When ever performance and scalability requirements are critical, JUnit perf plays an pivotal role.<br />
<br />
Supported JUnit test decorators:<br />
<br />
Timed tests: Runs a test and measures elapsed time<br />
<br />
Load tests: Runs a test with concurrent users and iterations<br />
<br />
Threaded tests: Runs a test in separate thread<br />
<br />
JUnitEE: This is an extension to Junit. It allows tests to be executed inside an application server. Hence tests run in production environment. <br />
<br />
Code Coverage Tools:<br />
<br />
Emma - I have used Emma as well as our own version of Clover in my previous company. One can find all information about Emma at emma.sourceforge.net<br />
<br />
Clover is commercial, free to open source project. Here is an example image for a cal app:<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheDQQ-2dn-EROZc_rEMbdvNbhxx7BIBI3v80YhWuSsIWJ0xe4FJr_0HL4N7GrSxJ1RjjwcQW117AusSRAITfAfkujBnYsUEEi8GSxbh1f5S2V4tNhhLiULIth9CViR8oWzFV7JS-DlsoM/s1600/test10_ncover_report1.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheDQQ-2dn-EROZc_rEMbdvNbhxx7BIBI3v80YhWuSsIWJ0xe4FJr_0HL4N7GrSxJ1RjjwcQW117AusSRAITfAfkujBnYsUEEi8GSxbh1f5S2V4tNhhLiULIth9CViR8oWzFV7JS-DlsoM/s320/test10_ncover_report1.gif" /></a></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-82962930550562411862010-03-21T20:47:00.001-07:002010-04-04T17:43:22.328-07:00Qualities of a good Engineering or Test Manager<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">I have been fortunate to be reporting to a quality Test managers in the past. Looking at my past experience as well as current experience of reporting to test manager or a director led me to write this blog:</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">According to me whether you are explicitly a test manager or QA manager at least you should have following qualities.</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><br />
</span><br />
<br />
<ul style="margin-bottom: 0px; margin-left: 1em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"><li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Having domain expertise of the product that you are managing</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Technical knowledge about the technology or tools being used in an organization they are managing - if not expertise but some sort of knowledge</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Ability to have an healthy/productive technical discussion with reporters</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Ability to provide career guidance, recognize skill set, assign appropriate role</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Test manager should not under estimate reporters or co-workers</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Should have execellent knowledge of software development process</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Should always promote a positive atmosphere in the team</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Must promote teamwork to increase productivity</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Must maintain enthusiasm of team</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Must have preventive approach to the problems</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Must be able to promote cooperation between software, test, and QA engineers</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Should have the ability to promote improvements in QA processes</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Should have people judgement skills for hiring and keeping skilled personnel</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Should be able to organize meetings and keep them focused</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Good communication skills to communicate well with technical & non-technical people, engineers, managers and as well as with customers.</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Ability to say ‘no’ to other leads / managers when quality is insufficient or QA processes are not being adhered.</span></li>
</ul><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><span class="Apple-style-span" style="font-size: 14px; line-height: 21px;"></span></span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Basically it all can be divided in top 5 points:</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><br />
</span><br />
<b><span class="Apple-style-span" style="font-size: x-large;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Creativity:<span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-size: medium;">You can never solve a problem on the level on which it was created. Discovery of new ideas or concepts. A good manager should be able to welcome/encourage new ideas or concepts. Be able to discuss pros and cons of such new idea or concept. Say for example, exploratory testing by various stakeholders or integrating guiceberry with junit3 or use of testng instead of junit3.</span></span></span></span></b><br />
<b><span class="Apple-style-span" style="font-size: x-large;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><br />
</span></span></b><br />
<b><span class="Apple-style-span" style="font-size: x-large;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Leadership Skills: <span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-size: medium;">Leadership, a critical management skill, is the ability to motivate a group of people toward a common goal. These items will help you develop your skills as a leader.</span></span></span></span></b><br />
<br />
<ul><li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Talking out loud</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Having a positive attitude</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Able to be change the perspective</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Effective convincing skills to deal with various stakeholders</span></li>
<li><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Able to recognize skill sets and assigning tasks</span></li>
</ul><br />
<b><span class="Apple-style-span" style="font-size: x-large;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Organization Skills:<span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-size: medium;">Practicing good organizational skills helps you to be prepared for your day-to-day responsibilities. Organizing your home, school or office will help you to work more efficiently, in whatever tasks you wish to accomplish.</span></span></span></span></b><br />
<br />
<ul><li><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Significance: </span></span><span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Good organizational skills are significant because they help you to function better in everyday activities, from getting dressed in the morning to remembering appointments and meeting deadlines.</span></span></span></li>
<li><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Function: </span></span><span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Being organized helps you to know what is expected of each day and to be prepared to meet those expectations. For example, creating a list of things you need prior to going to the store will make you a more effective manager of both your time and your money.</span></span></span></li>
<li><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Considerations: </span></span><span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Consider the importance of being organized if you are in school and have to be responsible for assignments, if you have to keep appointments for your job or if you are running a household.</span></span></span></li>
<li><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Warning:</span></span><span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Avoid overwhelming yourself with maintaining organization. It is often easy to be just as overwhelmed as you try to keep up with your new skills, as it is to be unorganized and cluttered. Ease your way into new organizational habits.</span></span></span></li>
<li><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Benefits:</span></span><span class="Apple-style-span" style="color: #333333;"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Good organizational skills will help you to finish tasks you begin. Focusing on completing a goal in an organized manner will enable you to eliminate things that may otherwise cause a distraction.</span></span></span></li>
</ul><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><br />
</span><br />
<b><span class="Apple-style-span" style="font-size: x-large;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Knowledge:</span></span></b><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"> Having domain expertise of the product or project is as important as being skill-full about the technologies or tools used - whether its a bugs tool or test case management tool. A good test manager will always be aware and be proactive about learning new technologies that are being used within his organization. For example test case management tool or bugs tool. Its essential to have a thourough knowledge about such tools which are used in day to day activities by entire QA organization. In terms of finding metrics or planning upcoming release cycle, these both tools play key role in providing visualization of various metrics like bug count, bug history, trends and patterns - which are looked upon by various stakeholders.</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><br />
</span><br />
<b><span class="Apple-style-span" style="font-size: x-large;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Innovation, Motivation, Enthusiasm:</span></span></b><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"> Extremely important. A good test manager should be able to motivate various members within his organization either by appreciating there work or making them responsible to take over a challenging project, where team member not only get an opportunity to prove himself (visibility) but also gets an opportunity to learn something new.</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">In my past company I was involved in developing a SDK which can be used to develop dashboard(s) or gadgets to provide various metrics. It gave me an opportunity to prove myself, huge huge visibility, learn new techs like GWT, Gviz!!!!</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Another aspect could be innovation! Being innovative, being a pioneer of say a process or a framework!! In my past company I was involved in help automating release process. Understanding release process not just related to my own project but also to learnt it across various projects within same organization and then gathering requirements from various teams, stakeholders, outlining in terms of priority, presenting to higher authorities. And then designing which tech or lang to used to build, what are commonalities across board etc. After that comes actual implementation. </span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Enthusiasm - Being enthu about work you are actually performing and also be able to create equal amount of enthusiasm across board withing team members is as critical as motivation. If you do not feel enthu about your work then its very hard to keep team motivated! Without the enthusiasm to support their activities, it is extremely doubtful that the QA and Testing function will be successful. Doubt and negativity will only reinforce a perception that the QA and testing activities are not as value-added as programming activities and are a drain on schedule and budget. Enthusiasm is rare, however. Most employees want to do a good job, but they feel under appreciated. Generally, bad management is blamed for unmotivated workers, but often, good management can still provide unenthusiastic workers. So, what's the secret?</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">If your own employees aren't acting motivated or aren't acting enthusiastic, then it's time to get your own "act" in gear. You can fire up your workforce in three acts: </span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Act enthusiastic. Act grateful. Act happy.</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Psychologists tell us that the best way to change our feelings about what we're doing is to change the way we think of our feelings. The brain tells the body how to feel and the body acts accordingly. We can direct our own feelings and our outlook on life. Writing in Out of Work? Get Into Business!, I wrote about expectations and how they can change the outcome of future events</span><br />
<span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><br />
</span><br />
<b><span class="Apple-style-span" style="font-size: x-large;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Team Member:</span></span></b><br />
<b><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"></span><span class="Apple-style-span" style="font-weight: normal;"><b><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;">Working on teams can be rewarding, but at times it can be difficult and downright frustrating. If there are poor communicators on your team, you may often feel left in the dark, confused or misunderstood. To create a successful team, effective communication methods are necessary for both team members and leaders. To have an effective team or be able to build team spirit, following norms usually been followed or enforced by a good test or quality manager.</span></span></b></span></b><br />
<b><span class="Apple-style-span" style="font-weight: normal;"><b><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"></span></span></b></span></b><br />
<b><b><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><br />
<ul><li><span class="Apple-style-span" style="font-family: 'Times New Roman';"><b><span class="Apple-style-span" style="font-weight: normal;"><b><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><div style="display: inline !important;">Team members as coworkers: all team members are equal; every team member's opinion will be thoughtfully considered; each team member will keep all commitments by the agreed upon due date; each team member agrees to constantly assess whether team members are honoring their commitment to the team norms.</div></span></span></b></span></b></span></li>
<li><span class="Apple-style-span" style="font-family: 'Times New Roman';"><b><span class="Apple-style-span" style="font-weight: normal;"><b><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><div style="display: inline !important;">Team member communication: team members will speak respectfully to each other; will not talk down to each other; will positively recognize and thank each other for team contributions.</div></span></span></b></span></b></span></li>
<li><span class="Apple-style-span" style="font-family: 'Times New Roman';"><b><span class="Apple-style-span" style="font-weight: normal;"><b><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><div style="display: inline !important;">Team member interaction in meetings: team members will listen without interrupting; hold no side or competing conversations; follow the rules for effective meetings; attend the meeting on time; always work from an agenda; minutes will be recorded at each meeting; end meetings on time.</div></span></span></b></span></b></span></li>
<li><span class="Apple-style-span" style="font-family: 'Times New Roman';"><b><span class="Apple-style-span" style="font-weight: normal;"><b><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><div style="display: inline !important;">Team organization and function: leadership will rotate monthly; the team management sponsor will attend the meeting, at least, monthly.</div></span></span></b></span></b></span></li>
<li><span class="Apple-style-span" style="font-family: 'Times New Roman';"><b><span class="Apple-style-span" style="font-weight: normal;"><b><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><div style="display: inline !important;">Team communication with other employees including managers: team members will make certain they have agreement on what and when to communicate; complaints about team members will be addressed first in the team.</div></span></span></b></span></b></span></li>
<li><span class="Apple-style-span" style="font-family: 'Times New Roman';"><b><span class="Apple-style-span" style="font-weight: normal;"><b><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"><div style="display: inline !important;">Team problem solving, conflict resolution, and decision making: team members will make decisions by consensus, but majority will rule if timely consensus is not reached; conflicts will be resolved directly with the persons in conflict</div></span></span></b></span></b></span></li>
</ul></span></b></b>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-18930154683537458392010-02-25T22:07:00.000-08:002010-02-25T22:07:05.341-08:00Watij - Web App Testing In JavaWatij: is a pure Java api created to allow for the automation of web applications through a real browser. It performs the same actions you would in a browser: filling out forms, navigating, clicking random stuff, and verifying results.<br />
<br />
Did I mentioned, it was inspired by Watir - Web App testing in Ruby<br />
<br />
Basic terminology that Watij follows is:<br />
Container: Browser is a container.<br />
Document: The webpage you view<br />
<br />
To open new instance of IE, just see this www.watij.com or<br />
IE ie = new IE();<br />
ie.start();<br />
<br />
To open new url:<br />
<br />
Define URL = www.google.com<br />
<br />
IE ie = new IE();<br />
ie.start(URL);<br />
<br />
To close instance:<br />
ie.close();<br />
<br />
You can find API: http://watij.sourceforge.net/docs/api/index.html?watij/IE.html<br />
<br />
How to find elements using watij ?<br />
<br />
Elements can be found in watij using many approaches:<br />
1. Symbols: name, url, id, href, value, caption, title, alt, src, action, method, text, xpath, tag like:<br />
<br />
ie.textField(id,“SOME_ID”); <br />
<br />
2. Finders: exist for each symbol and also allow for more flexibility in defining ways to find elements like:<br />
<br />
ie.htmlElement(attribute(“myattr1”,”attribute1”)); <br />
<br />
3. Xpath: Watij provides support for using XPath as a Symbol or a Finder. Watij uses the local copy of the document for faster parsing like:<br />
<br />
ie.button(xpath, "//INPUT[@value='Hate Me']”);<br />
<br />
<br />
4. Reg Ex: Watij also provides support for finding elements using regular expressions like:<br />
<br />
ie.button(value, “/Hate Me/”);<br />
<br />
<br />
Watij provides direct support for Javascript alerts, confirm pop ups, file download dialogs and prompt dialogs. <br />
<br />
Here is an example of JS alert: <br />
AlertDialog alertDialog = ie.alertDialog(); <br />
alertDialog.ok();<br />
<br />
While automation there are a few things that everyone should keep in mind:<br />
<br />
1.Ensure that you are following good design principles.<br />
2.Try to model the application under test using a layer of abstraction.<br />
3. Your tests should be readable by your customer.<br />
<br />
The drawback is it only supports Windows and IE..hmmmUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-43128664109093028602010-02-11T10:27:00.000-08:002010-02-15T22:16:35.946-08:00Importance of pre-production like environmentPre-production environment plays pivotal role in defining test completion criteria. <span class="TutItemContentNoImg">System Performance and System Readiness testing rely on a stable system like Production - called Pre-prod environment. </span><span class="TutItemContentNoImg">These tests are final preparation for the new system and will dictate whether the Production environment is ready for actual production processing. In terms of completion criteria, both phases are all or nothing. This means, in both phases, tests either pass or fail as a whole based on pre-determined criteria from Business Users, Legacy Owners, and Process Owners. </span><br />
<br />
<span class="TutItemContentNoImg">The precautions an organization should take place: </span><br />
<ul><li><span class="TutItemContentNoImg">Entire infrastructure or architecture should be as close as production</span></li>
<li><span class="TutItemContentNoImg">Various kinds of testing to be preformed</span></li>
<li><span class="TutItemContentNoImg">Accounts to be used against these enviornments</span></li>
<li><span class="TutItemContentNoImg">Revenue impacts</span></li>
<li><span class="TutItemContentNoImg">Automated testing if any, which test scenarios to be executed<br />
</span><div style="text-align: left;"><span class="TutItemContentNoImg"></span><br />
<span class="TutItemContentNoImg"></span></div></li>
</ul><br />
<span class="TutItemContentNoImg">Since these environment is very close to real production environment, tons of weired behavior of application or product can be detected early on in release cycle in help avoiding last minutes or production emergencies.<br />
<br />
However, one should not perform entire testing on these environments. Say a day or 2 days execution of various tests is good enough!</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-88244610861348432112010-02-01T04:49:00.000-08:002010-02-19T01:52:35.095-08:00Dependency Injection in RubyI had an opportunity to use DI in one of my past company projects. Since I have made a switch to Ruby at work, just wanted explore DI in ruby world.<br />
<br />
Before that I should mention that Ruby is focus on simplicity and productivity. Syntax in ruby is elegant and easy to read/write.<br />
<br />
Initially I was under impression that DI equals Spring, but that's not entirely true. In simple terms, DI contributes to mitigate the proliferation of dependencies. A good example is use of factory class is most common way to implement DI.<br />
<br />
In ruby, DI concepts to creation of objects and wiring them...<br />
Example: TBAdded later...Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-72457445991038800402009-12-17T11:52:00.000-08:002009-12-17T11:52:15.314-08:00A day without work notebook or laptop :-)How would a day be without a notebook or laptop :-) My machine froze on me this morning, driver just died and now it just not coming up!! waiting to get a replacement. while waiting on machine, thinking how could be a day with no laptop or notebook ???Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-72181578557954430112009-11-13T12:44:00.001-08:002009-11-27T15:16:00.283-08:00Domain Based TestingDomain Based Testing: Usually carried out based on two concepts - domain analysis and domain modelling. Its intent is to focus on test rather than the action of the test.<br />
It wraps browser object into page object that provides API that returns the Html element object based on what you can do at the current page.<br />
For ex:<br />
<br />
login_page = LoginPage.new(@browser)<br />
login_page.username.type('username')<br />
login_page.password.type('password')<br />
login_page.logon_button.click<br />
<br />
It does require designing, implementing page, most common actions, verifications on page and Html elements. But it does pay off. With shared page classes, each tests only need to write code that is specific about that test case. This makes it easy to understand and maintain. Also, it provides an ease to find the code and change it when the element id or name changes.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-65863009966606660572009-10-20T21:13:00.001-07:002009-10-20T21:18:12.169-07:00Clearing IE cache and cookies before running Selenium tests<p>When using FireFox, it is quite easy to setup a profile to be used with your Selenium tests. FireFox allows configuration which can delete all cookies and cached files when shutting down. Internet Explorer neither allows a profile like FireFox nor deletes cookies and cache unless you delete them by using the Tools –> Internet Options menu.</p> <p>Deleting cache and cookies might be required for some web applications when testing via Selenium. Here is a easy way to incorporate documented Windows calls to delete cache and cookies via Ruby.</p> <p>The following script uses the system function to get access to the Windows command prompt. Run the following ruby script on a Windows based ruby installation to clear all cookies and cached files.</p> <p><font face="Courier New" color="#008000">#This script is meant for Ruby on Windows only for <br />#clearing all cache and cookies in Internet Explorer. <br />#Run this script from the command prompt like this <br />#C:\Ruby>ruby clear-ie-cache-cookies.rb <br /></font></p> <p><font face="Trebuchet MS"><font color="#008000">#To clear IE7 temporary Internet files <br /></font>system('RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8') </font></p> <p><font face="Trebuchet MS"><font color="#008000">#To clear IE7 browsing cookies <br /></font>system('RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2') </font></p> <p><font face="Trebuchet MS"><font color="#008000">#To clear IE7 browsing history </font> <br />system('RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1') </font></p> <p><font face="Trebuchet MS"><font color="#008000">#To clear IE7 form data </font> <br />system('RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16') </font></p> <p><font face="Trebuchet MS"><font color="#008000">#To clear IE7 remembered passwords for filling web login forms </font> <br />system('RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32') </font></p> <p><font face="Trebuchet MS"><font color="#008000">#To clear or delete all IE7 browsing history – all of the above! </font> <br />system('RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255') </font></p> <style type="text/css"><br /><p></p></div></div></div></div></div></div></div></div></div></div></div></body></html></style> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-68215859469184437742009-10-07T15:20:00.001-07:002009-10-07T15:27:01.626-07:00Running Selenium tests written in Ruby on Windows<p>Here is a follow-up to my earlier post about installing <a href="http://testnerdy.blogspot.com/2009/10/installing-ruby-and-selenium-on-windows.html">and using Ruby and Selenium on Windows</a>.</p> <p>Recording a Selenium test using Selenium IDE for FireFox.</p> <p>I used the Selenium IDE add-on with FireFox to record a quick example test in Ruby. I visited the Yahoo homepage and typed a search for Selenium RC. Here is the code in Ruby</p> <pre class="csharpcode">require <span class="str">"selenium"</span><br />require <span class="str">"test/unit"</span><br /><br /><span class="kwrd">class</span> SeleniumRubyWindowsTest < Test::Unit::TestCase<br /> def setup<br /> <span class="preproc">@verification_errors</span> = []<br /> <span class="kwrd">if</span> $selenium<br /> <span class="preproc">@selenium</span> = $selenium<br /> <span class="kwrd">else</span><br /> <span class="preproc">@selenium</span> = Selenium::SeleniumDriver.<span class="kwrd">new</span>(<span class="str">"localhost"</span>, 4444, <span class="str">"*chrome"</span>, <span class="str">"http://www.yahoo.com/"</span>, 10000);<br /> @selenium.start<br /> end<br /> @selenium.set_context(<span class="str">"SeleniumRubyWindowsTest"</span>)<br /> end<br /> <br /> def teardown<br /> @selenium.stop unless $selenium<br /> assert_equal [], <span class="preproc">@verification_errors</span><br /> end<br /> <br /> def test_SeleniumRubyWindowsTest<br /> @selenium.open <span class="str">"/"</span><br /> assert_equal <span class="str">"Yahoo!"</span>, @selenium.get_title<br /> @selenium.type <span class="str">"p_13838465-p"</span>, <span class="str">"Selenium RC"</span><br /> @selenium.click <span class="str">"search-submit"</span><br /> @selenium.wait_for_page_to_load <span class="str">"30000"</span><br /> assert_equal <span class="str">"Selenium RC - Yahoo! Search Results"</span>, @selenium.get_title<br /> end<br />end</pre><br /><br /><pre class="csharpcode">Save this file as <font face="Courier New" size="3">SeleniumRubyWindowsTest.rb</font></pre><br /><br /><p>Now that a test is ready to be run, its time to start up the Selenium server.</p><br /><br /><h5>Running the Selenium server</h5><br /><br /><p>If you have followed the earlier post about <a href="http://testnerdy.blogspot.com/2009/10/installing-ruby-and-selenium-on-windows.html">installing Ruby</a>, then you open a command window and go to the directory where you copied the selenium jars. In short go to the directory where Ruby Gems are installed - <br /> <br /><font face="Courier New" size="3"><GEM_INSTALL_DIR>\Selenium-1.1.16\lib\selenium\openqa</font></p><br /><p>In this location, using the Java JRE installed in your system, start the Selenium server like this</p><br /><p><font face="Courier New" size="3"><GEM_INSTALL_DIR>\Selenium-1.1.16\lib\selenium\openqa java –jar selenium-server.jar</font></p><br /><p>See the screen shot </p><br /><p><a href="http://lh4.ggpht.com/_ne9YQShS95Q/Ss0UEzyrPzI/AAAAAAAAAFc/241oVHl81Xk/s1600-h/clip_image002%5B4%5D.jpg"><img title="clip_image002" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="228" alt="clip_image002" src="http://lh5.ggpht.com/_ne9YQShS95Q/Ss0UFP2TEZI/AAAAAAAAAFg/rxw8E18YzCE/clip_image002_thumb%5B1%5D.jpg?imgmax=800" width="438" border="0" /></a></p><br /><p>Now your Selenium Server should start running at the default port of 4444. See screen shot. </p><br /><br /><p><a href="http://lh5.ggpht.com/_ne9YQShS95Q/Ss0UFRHSNII/AAAAAAAAAFk/uuLdzgU92Xk/s1600-h/clip_image002%5B5%5D%5B3%5D.jpg"><img title="clip_image002[5]" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="231" alt="clip_image002[5]" src="http://lh6.ggpht.com/_ne9YQShS95Q/Ss0UFk8CNrI/AAAAAAAAAFo/67z1HKUZkos/clip_image002%5B5%5D_thumb%5B1%5D.jpg?imgmax=800" width="443" border="0" /></a></p><br /><br /><h5>Running your first Selenium test written in Ruby</h5><br /><p>The Selenium test has already been recorded using the Seleniun IDE add-on for FireFox - <font face="Courier New" size="3">SeleniumRubyWindowsTest.rb</font></p><br /><ul><br /> <li>Ensure that your Selenium server is still running </li><br /> <li>Run this test by going to <font face="Courier New" size="3">C:\Ruby</font> and typing the following command</li><br /> <li><font face="Courier New" size="3">C:\Ruby>ruby SeleniumRubyWindowsTest.rb</font></li><br /> <li>Selenium RC window should launch in Internet Explorer </li><br /> <li>A separate FireFox window should launch and show the web pages as per the test <font face="Courier New" size="3">SeleniumRubyWindowsTest.rb</font></li><br /></ul><br /><br /><h5>Running tests in Internet Explorer on Windows XP and Windows Vista</h5><br /><p>I have tried the above test using Internet Explorer 7 on Windows XP as well as Internet Explorer 8 on Windows Vista. There were no problems in running the test on IE7 with Win XP. Offcourse you must turn off your popup blocker before running tests. Extra steps are required to run on Windows Vista, as described in the next pargraph. </p><br /><br /><p>Code change required to make the example test run in IE is as simple as changing the following line</p><br /><br /><pre class="csharpcode"><span class="preproc">@selenium</span> = Selenium::SeleniumDriver.<span class="kwrd">new</span>(<span class="str">"localhost"</span>, 4444, <span class="str">"*chrome"</span>, http://www.yahoo.com/, 10000); </pre><br /><p>to </p><br /><pre class="csharpcode"><span class="preproc">@selenium</span> = Selenium::SeleniumDriver.<span class="kwrd">new</span>(<span class="str">"localhost"</span>, 4444, <span class="str">"*iexplore"</span>, http://www.yahoo.com/, 10000); </pre><br /><br /><h5>Steps to run the same test on Windows Vista and IE8</h5><br /><p>However, you need to take a few more steps to run the tests without any problems on Windows Vista and IE8.</p><br /><ul><br /> <li>Create a Desktop shortcut for running the Selenium Server. </li><br /> <li>Start the Selenium server by right clicking the shortcut, and then selecting Run as Administrator option </li><br /> <li>Once server starts running, you can use the same steps as described above for running your test from the command line. </li><br /></ul><br /><p>One more tip – IE8 has a popup blocker turned on by default. Turn it off before you start running your tests.</p><br /><br/>Thats all there is to using Ruby and Selenium on your Windows machine! Happy testing :)<br /><style type="text/css"><br />.csharpcode, .csharpcode pre<br />{<br /> font-size: small;<br /> color: black;<br /> font-family: consolas, "Courier New", courier, monospace;<br /> background-color: #ffffff;<br /> /*white-space: pre;*/<br />}<br />.csharpcode pre { margin: 0em; }<br />.csharpcode .rem { color: #008000; }<br />.csharpcode .kwrd { color: #0000ff; }<br />.csharpcode .str { color: #006080; }<br />.csharpcode .op { color: #0000c0; }<br />.csharpcode .preproc { color: #cc6633; }<br />.csharpcode .asp { background-color: #ffff00; }<br />.csharpcode .html { color: #800000; }<br />.csharpcode .attr { color: #ff0000; }<br />.csharpcode .alt <br />{<br /> background-color: #f4f4f4;<br /> width: 100%;<br /> margin: 0em;<br />}<br />.csharpcode .lnum { color: #606060; }</style> Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8574976919848418647.post-34802522274740975762009-10-07T14:44:00.001-07:002009-10-07T14:44:03.851-07:00Installing Ruby and Selenium on Windows<p>Though Ruby is primarily used on *nix and Mac OS X, I wanted to run it on Windows. So I went about setting up a ruby instance on Windows with the aim of writing web application tests using Selenium.</p> <h5>Aim: To set up Ruby and Selenium on Windows to be able to run Selenium based tests against a web application</h5> <p>There is a lot of information out there, but its in bits and pieces for Windows. So here is an attempt to make this a one stop resource for setting up Ruby and Selenium on Windows.</p> <h5>Pre-requisites:</h5> <p>Since Selenium server needs to be started from the provided jar, you will need to have a JRE on your Windows machine. </p> <ul> <li> <p>The latest Java JDK or JRE (ver 1.5 or later) should be properly installed on the Windows computer. </p> </li> <li> <p>Download and installation directions are available here <a href="http://java.sun.com/javase/downloads/index.jsp">http://java.sun.com/javase/downloads/index.jsp</a></p> </li> </ul> <h5>Getting and installing Ruby on Windows:</h5> <ul> <li> <p>Go to the following site <a href="http://rubyforge.org/frs/?group_id=167">http://rubyforge.org/frs/?group_id=167</a></p> </li> <li> <p>Download the latest Ruby Installer for windows. Example - <a href="http://rubyforge.org/frs/download.php/47082/ruby186-27_rc2.exe">ruby186-27_rc2.exe</a></p> </li> <li> <p>Run this file to install Ruby.</p> </li> <li> <p>When installing you will get to see options that need to be installed. Ensure that you select ‘Enable RubyGems’ to be installed. See screen shot. Click Next.</p> </li> </ul> <a href="http://lh4.ggpht.com/_ne9YQShS95Q/Ss0LnI_GWcI/AAAAAAAAAE8/9HKeNXsQQr8/s1600-h/clip_image002%5B4%5D.jpg"><img title="clip_image002" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="302" alt="clip_image002" src="http://lh3.ggpht.com/_ne9YQShS95Q/Ss0LnZJQDdI/AAAAAAAAAFA/dS1nMzSz-wM/clip_image002_thumb%5B1%5D.jpg?imgmax=800" width="385" border="0" /></a> <ul> <li> <p>Install Ruby in a top level directory like C:\Ruby as per screen shot. Click Next. </p> </li> </ul> <p><a href="http://lh6.ggpht.com/_ne9YQShS95Q/Ss0LnmEy5nI/AAAAAAAAAFE/oYJSURGnxTM/s1600-h/clip_image002%5B5%5D%5B3%5D.jpg"><img title="clip_image002[5]" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="313" alt="clip_image002[5]" src="http://lh6.ggpht.com/_ne9YQShS95Q/Ss0LnopW3eI/AAAAAAAAAFI/IdakIpV2mr4/clip_image002%5B5%5D_thumb%5B1%5D.jpg?imgmax=800" width="399" border="0" /></a></p> <ul> <li> <p>Accept defaults on rest of the screens and complete the installation.</p> </li> </ul> <h5>Installing the Ruby Selenium Gem on Windows</h5> <ul> <li> <p>Go to the following site <a href="http://selenium.rubyforge.org/">http://selenium.rubyforge.org/</a></p> </li> <li> <p>Navigate to the Downloads section (<a href="http://selenium.rubyforge.org/download.html">http://selenium.rubyforge.org/download.html</a>) or go to the latest builds here <a href="http://selenium.rubyforge.org/builds/">http://selenium.rubyforge.org/builds/</a> and download the latest version. </p> <p>Example – Selenium-1.1.16.gem </p> </li> <li> <p>Save this file to the “C:\Ruby” directory where you installed Ruby for Windows </p> </li> <li> <p>Now start a command prompt and go to C:\Ruby</p> </li> <li> <p>Type the command C:\Ruby>gem install Selenium</p> </li> <li> <p>Wait for the Selenium gem to be installed. </p> </li> <li> <p>Note that Selenium should be with uppercase <strong>S</strong> and not lowercase <strong>s</strong>. See screen shot. </p> </li> </ul> <p><a href="http://lh6.ggpht.com/_ne9YQShS95Q/Ss0LoOksebI/AAAAAAAAAFM/lxBjOPmFPw4/s1600-h/clip_image002%5B7%5D%5B3%5D.jpg"><img title="clip_image002[7]" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="218" alt="clip_image002[7]" src="http://lh6.ggpht.com/_ne9YQShS95Q/Ss0LoUSrr2I/AAAAAAAAAFQ/5kAXmDMtbGw/clip_image002%5B7%5D_thumb%5B1%5D.jpg?imgmax=800" width="415" border="0" /></a></p> <h5>Installing Selenium Remote Control for Windows</h5> <p>Selenium Remote Control (RC) is required so that the Selenium Jetty Server can start running and then tests written in Ruby can be run against the web application under test using Selenium Ruby Client driver.</p> <p>Tests can be executed against any Windows browser like Internet Explorer and FireFox.</p> <ul> <li> <p>Go to the following site and download the latest Selenium RC driver <a href="http://seleniumhq.org/download/">http://seleniumhq.org/download/</a></p> </li> <li> <p>Example – Selenium RC 1.0.1 </p> </li> <li> <p>Extract this zip file </p> </li> <li> <p>Copy only the following two folders to the <font face="Courier New" size="3">C:\Ruby</font> folder. Refer screen shot. </p> <ul></ul> <p>1. selenium-server-1.0.1</p> <p>2. selenium-ruby-client-driver-1.0.1</p> </li> </ul> <p><a href="http://lh5.ggpht.com/_ne9YQShS95Q/Ss0LopMx_-I/AAAAAAAAAFU/JkCU-7JmVH0/s1600-h/clip_image002%5B9%5D%5B3%5D.jpg"><img title="clip_image002[9]" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="178" alt="clip_image002[9]" src="http://lh4.ggpht.com/_ne9YQShS95Q/Ss0Lo__3UlI/AAAAAAAAAFY/ikZNDeCrsVo/clip_image002%5B9%5D_thumb%5B1%5D.jpg?imgmax=800" width="444" border="0" /></a></p> <ul> <li> <p>Now go to the folder C:\Ruby\selenium-server-1.0.1</p> </li> <li> <p>Copy the selenium-server.jar file from here to the following location </p> <p><font face="Courier New" size="3">C:\Ruby\lib\ruby\gems\1.8\gems\Selenium-1.1.16\lib\selenium\openqa</font></p> </li> <li> <p>In short locate the directory where Ruby Gems are installed <font face="Courier New" size="3"><GEM_INSTALL_DIR>\Selenium-1.1.16\lib\selenium\openqa</font></p> </li> </ul> <p><strong>You are done with all installations!</strong> Now the next step is to run the Selenium RC via the Jetty Server bundled with Selenium. I will post about this later on.</p> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8574976919848418647.post-41682143724505524672009-09-30T15:15:00.000-07:002009-09-30T23:01:52.224-07:00QA/Testing - Interview Questions<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"><b>Automated testing vs Manual testing ?</b></span></span><br />
<span class="Apple-style-span" style="color: #585859; line-height: 16px;"></span><br />
<div align="justify" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-style: inherit; font-weight: inherit; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">Modern web applications are characterized by a multitude of elements and possible interactions within the GUI which all have to be considered during testing.</span></span><br />
</div><div align="justify" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-style: inherit; font-weight: inherit; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">Besides the possibility of reducing the testing effort, there is another reason to choose automated web testing: Especially extensive GUIs with lots of elements can push the testers to their limits when tested manually. Entering the same or similar data in hundreds of input masks for example is not an intellectual challenge but requires full concentration and can lead to a decreasing motivation and inattentiveness.</span></span><br />
</div><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"><b>How would you decide what to automate or not to automate ?</b></span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">1. </span></span><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">Automate only that which needs automating.</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">2. Design and build for maintainability.</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">3. Whether or not to automate: rules of thumb </span></span><b><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">: </span></span></b><br />
<ol><li><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">GUIs are difficult to automate. Despite software vendors telling you how easy it is to use record-and-playback functionality, graphical interfaces are notoriously difficult to automate with any sort of maintainability. Application interfaces tend to become static quicker than Web pages and are thus a bit easier to automate. Also, I have found that using Windows hooks is more reliable than the DOM interface. Keys to look for when deciding to automate a GUI is how static it is (the less it changes, the easier it will be to automate) and how close the application is tied to Windows standard libraries (custom objects can be difficult to automate).</span></span></li>
<li><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">If possible, automate on the command-line or API level. Removing the GUI interface dramatically helps reliability in test scripts. If the application has a command-line interface, not only does it lend itself to reliable automation but is also somewhat data driven, another green light to go forward with automation.</span></span></li>
<li><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">Automate those things that a human cannot do. If you suspect a memory leak by performing a certain function but can’t seem to reproduce it in a reasonable amount of time, automate it. Also particularly interesting to automate are time-sensitive actions (requiring precise timing to capture a state change, for example) and very rapid actions (e.g., loading a component with a hundred operations a second).</span></span></li>
<li><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">Stick with the golden rule in automation: do one thing, and do it well. A robust test case that does a single operation will pay off more than a test case that covers more but requires heavy maintenance. If you design your test cases (or library functions, preferably) to do single actions, and you write them robustly, pretty soon you can execute a series of them together to perform those broad test cases that you would have written into a single test case.</span></span></li>
</ol><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"><b>Given a product to test with no product specifications or functional specification, how would you go about testing ?</b></span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">Go through UI. Look at various flows. Run through application - various transactions and actions. Note down the behavior noticed for these transactions and actions. These can be your expected behavior. Meet with development teams, product management team, user experience team. Learn more about most common operations. </span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"><b>How would you test a calculator ?</b></span></span><br />
<span style="font-family: 'Trebuchet MS', sans-serif;"><span class="Apple-style-span" style="font-size: small;">Divide your test cases into positive test cases and negative test cases.</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"><b>Tell me test scenarios for testing traffic lights ?</b></span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">Divide your test cases into positive test cases and negative test cases. These kind of questions are more to learn about your thought process and imagination.</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"><b>Given a website with 2 inputs, what test cases you will perform ?</b></span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">Same as above. Divide test cases in positive and negative test cases.</span></span><br />
<span style="font-family: 'Trebuchet MS', sans-serif;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"><b>what is Boundary value analysis ?</b></span></span><br />
<span class="Apple-style-span" style="line-height: 19px;"><b><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">Boundary value analysis</span></span></b><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"> is a </span></span><a href="http://en.wikipedia.org/wiki/Software_testing" style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-position: initial initial; background-repeat: initial; color: #002bb8; text-decoration: none;" title="Software testing"><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">software testing</span></span></a><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"> design technique in which tests are designed to include representatives of boundary values. Values on the edge of an </span></span><a href="http://en.wikipedia.org/wiki/Equivalence_partitioning" style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-position: initial initial; background-repeat: initial; color: #002bb8; text-decoration: none;" title="Equivalence partitioning"><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">equivalence partition</span></span></a><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"> or at the smallest value on either side of an edge. The values could be either input or output ranges of a software component. Since these boundaries are common locations for errors that result in software </span></span><a href="http://en.wikipedia.org/wiki/Fault_(technology)" style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-position: initial initial; background-repeat: initial; color: #002bb8; text-decoration: none;" title="Fault (technology)"><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">faults</span></span></a><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"> they are frequently exercised in </span></span><a href="http://en.wikipedia.org/wiki/Test_case" style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-position: initial initial; background-repeat: initial; color: #002bb8; text-decoration: none;" title="Test case"><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">test cases</span></span></a><span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">.</span></span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"><b>What matrix you can think of ?</b></span></span><br />
<span style="font-family: 'Trebuchet MS', sans-serif;"><span class="Apple-style-span" style="font-size: small;">Bugs - Major/show stopper, open P0/P1, fixed/verified, open bugs etc</span></span><br />
<span style="font-family: 'Trebuchet MS', sans-serif;"><span class="Apple-style-span" style="font-size: small;">Automation results - Pass/Fail/Not executed/blocked.</span></span><br />
<span style="font-family: 'Trebuchet MS', sans-serif;"><span class="Apple-style-span" style="font-size: small;">Load and performance - Expected benchmark/actual benchmark, history data/stats, results per package or functions, memeory leaks, information about CPU/disk etc</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">Msll: Test repository results etc</span></span><br />
<span style="font-family: 'Trebuchet MS', sans-serif;"><span class="Apple-style-span" style="font-size: small;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;"><b>What should QA dashboard look like ? What all it should be on QA dashboard ?</b></span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span style="font-family: 'Trebuchet MS', sans-serif;">Please refer to my blog about QA dashboad.</span></span>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8574976919848418647.post-13228524711145986582009-09-24T20:17:00.000-07:002009-09-24T20:17:06.978-07:00JAVA / J2EE / SWING Interview Questions W/ Solutions<div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Sharing Java interview questions being asked for mid-level to senior-level test engineering positions at well-established companies:<br />
</div><ol><li>What's the difference between a String and a StringBuffer?</li>
<li>What's the difference between EJB and Hibernate?</li>
<li>What's the difference between final, finally, and finalize?</li>
<li>Difference between ArrayList and HashMap ?</li>
<li>Expalin Swing Action architecture ?</li>
<li>How will you communicate between two Applets ?</li>
<li>How would you detect and minimize memory leaks in Java ? (Very important question)</li>
<li>Explain SOA ?</li>
<li>Explain Web and EJB containers ?</li>
<li>Which Java pattern you have used, explain ?</li>
<li>How to get a pop-up window when clicking on a button ?</li>
<li>Given following code what will be output ?</li>
<li>Explain exception handling in java ?</li>
<li>Garbage collection - Can you force it ? (Very important)</li>
<li>What is RMI ?</li>
<li>How do you check that a date given as a combination of day, month and year is a valid date? For instance a date 2008-02-31 (as in yyyy-mm-dd) would be invalid date ?</li>
</ol><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Solution:<br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="font-size: small;"><span style="color: #20124d;"> <span class="Apple-style-span" style="font-size: x-small;">Date parseDate(String maybeDate, String format, boolean lenient) {</span></span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> Date date = null;</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> // test date string matches format structure using regex</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> // - weed out illegal characters and enforce 4-digit year</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> // - create the regex based on the local format string</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> String reFormat = Pattern.compile("d+|M+").matcher(Matcher.quoteReplacement(format)).replaceAll("\\\\d{1,2}");</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> reFormat = Pattern.compile("y+").matcher(reFormat).replaceAll("\\\\d{4}");</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> if ( Pattern.compile(reFormat).matcher(maybeDate).matches() ) {</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> // date string matches format structure, </span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> // - now test it can be converted to a valid date</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> SimpleDateFormat sdf = (SimpleDateFormat)DateFormat.getDateInstance();</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> sdf.applyPattern(format);</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> sdf.setLenient(lenient);</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> try { date = sdf.parse(maybeDate); } catch (ParseException e) { }</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> } </span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> return date;</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> } </span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> // used like this:</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> Date date = parseDate( "21/5/2009", "d/M/yyyy", false);</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;">OR</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;">package <></span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;">import java.text.ParseException;</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;">import java.text.SimpleDateFormat;</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"><br />
</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;">public class ValidateDate {</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> public static boolean isValidDateStr(String date, String format) {</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> try {</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> SimpleDateFormat sdf = new SimpleDateFormat(format);</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> sdf.setLenient(false);</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> sdf.parse(date);</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> } catch (ParseException e) {</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> System.out.println(e.getMessage());</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> return false;</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> } catch (IllegalArgumentException e) {</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> System.out.println(e.getMessage());</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> return false;</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> }</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> return true;</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> }</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> public static void main(String[] args) {</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> System.out.println(" 1900-12-13 valid ? "</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> + ValidateDate.isValidDateStr("1900-12-13", "yyyy-MM-dd"));</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> // "1990-12/13" throws a ParseException</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> System.out.println(" 1900-12/13 valid ? "</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> + ValidateDate.isValidDateStr("1900-12/13", "yyyy-MM-dd"));</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> // "1990-13-12" throws a IllegalArgumentException</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> System.out.println(" 1900-13-12 valid ? "</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> + ValidateDate.isValidDateStr("1900-13-12", "yyyy-MM-dd"));</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> /*</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> * output : 1900-12-13 valid ? true 1900-12/13 valid ? false 1900-13-12</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> * valid ? false</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> */</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> //LEAP YEAR</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> System.out.println("2009-02-29 valid ? "</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> + ValidateDate.isValidDateStr("2009-02-29", "yyyy-MM-dd")); //EPOCH TIME</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> System.out.println("1969-01-01 valid ? "</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> + ValidateDate.isValidDateStr("1969-01-01", "yyyy-MM-dd"));</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;"> }</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="color: #20124d;"><span class="Apple-style-span" style="font-size: x-small;">}</span></span></span><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"><br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">How to test Private or Protected methods ?<br />
</div><div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">Solution: You can not test Private methods they have to be made either protected or public. Though using Goovy framework you could achieve it, look for the same on web. Protected methods are for sub-classing so sub-class it and have a public method that will "exercise" the protected method in the unit test of that subclass. thats just a quick thought.<br />
</div><div></div>Unknownnoreply@blogger.com0