|
|
||
Aditya Dada's BlogTesting ArchivesSelenium-ANT-TestNG (SAT) FrameworkPosted by aditya_dada on May 20, 2008 at 10:39 AM | Permalink | Comments (3)
This framework is created using ANT, TestNG and Selenium. Pre-requisites:Basic knowledge of Selenium IDE, Selenium RC, TestNG and ANT. Setup:1. Install Selenium IDE on your Firefox browser. 2. Make sure you have ANT installed. 3. Grab the testws.zip file from here. Unzip it into a directory of your choice. About the sample The config directory contains testng.xml file, and is a place holder for configuration files. How To:Write a test case The basic structure that one has to follow to create a test case is: 1. Record a testcase using Selenium IDE (Firefox browser only), Export the test case into Java 2. Edit the test case – java file, and add TestNG annotations 3. Execute the test case using ANT 1. Record test using selenium IDE and export it into Java: 2. Add TestNG to your test case: iii. Save the test file iv. Ensure that the test file you created is mentioned in the build.xml compile target. 3. Execute your test through ANT The Future of TestingPosted by aditya_dada on May 12, 2008 at 01:40 PM | Permalink | Comments (4)On May 7th, 2008, Varun Rupela and I gave a talk on "The Future of Testing: How Community Engagement Is Changing the Rules" at the JavaONE conference in San Francisco. At Sun's GlassFish Quality Engineering team, we have been seeing a trend for the past few years, ever since GlassFish joined the open source revolution, that more and more features are developed by the community, but these features are not tested by the community. While the burden of additional testing came to rest upon the in-house Quality Organziation, the resources are often not added to meet the additional requirements. So what does a resource-constrained Quality organization such as ours do? We follow project GlassFish, and go open source! The charter of GlassFish Quality Community is unique - something that gives us leverage in creating a niche for ourselves as an open-source community. We are the only organization under GlassFish, that can offer opportunities to learn latest technologies, interact with industry experts while also making the whole experience rewarding. And it is this strategic placement that helps us create a win-win solution. We not only attract students and young professionals who would like to get their feet wet with latest GlassFish technologies, but also attract quality engineers from other organizations that are already using GlassFish, and would like to stay on top of the quality status of GlassFish. And, we not only accept all contributions to help improve GlassFish Quality, we also incorporate many of the applciations into our nightly test base. And while young professionals in the field of JavaEE applications improve their skills in developing applications, our customers can get the defects fixed faster, and request new features more efficiently. This was the idea that was a novelty for many at JavaONE this year, and we won many praises and accolades for taking a step in the right direction. By the way, for those interested in the slides to our talk, they can be downloaded here (.odp) or here (.pdf). Finding Bugs Made EasyPosted by aditya_dada on January 26, 2006 at 10:43 AM | Permalink | Comments (0)I was introduced to FindBugs™ tool in April 2005. I attended professor Bill Pugh's presentation, and walked out impressed. Some of you may have met him at JavaOne in 2004 after his presentation. While he was visiting Sun Microsystems, Inc. campus in Santa Clara, CA, I had the opportunity to meet him, and discuss with him techniques to integrate FindBugs™ into our processes. Since then, I've tried to put FindBugs™ to good use by running it against Glassfish. And the results have been surprising. FindBugs™ is a static analysis tool, that uses bug patterns to search for common problems by analyzing Java byte-code. Its strength is its ability to discover problems like possible infinite recursive loops, impossible casts, possible typos in method names and many more. It catches errors that compilers let pass. It has powerful reporting that points out the defective class, the method and the line of code. The warnings produced can be categorized in many different ways, like: * High, Medium or Low * Correctness, Malicious Code, Performance or Style * Sorted by package or class Filter patterns may be written to exclude or include matching Classes and/or Warnings. I found the tools that were bundled with FindBugs™ really easy to use, and powerful. What's more - it helps brush up the core concepts of Java programming, and in using Java more effectively. Along with its many strengths, FindBugs™ also has some shortcomings. One of them is the inability to process nested jars (which the FindBugs™ team is aware of, and a fix may be available soon). Another is generation of 'False Positives' that may not be real product bugs. In my experience, the high priority warnings produced by FindBugs™ are best addressed first. The medium priority warnings need a bit of analysis, and the low priority may be ignored. The strengths of FindBugs™ far outweigh its weaknesses. FindBugs™ provides a low cost way of catching issues and defects. Since FindBugs™ is so easy to install, and requires minimal effort to use, I'd highly recommend using it to improve the quality of your code. | ||
|
|