Skip to main content
View by: Most Recent | Topic | Community | Webloggers   
Monthly Archives:    

Blogs by topic: Testing

• Accessibility • Ajax • Blogging • Business • Community 
• Databases • Deployment • Distributed • Eclipse • Education 
• EJB • Extreme Programming • Games • GlassFish • Grid 
• GUI • IDE • Instant Messaging • J2EE • J2ME 
• J2SE • Jakarta • JavaFX • JavaOne • Jini 
• JSP • JSR • JXTA • LDAP • Linux 
• Mobility • NetBeans • Open Source • OpenSolaris • OSGi 
• P2P • Patterns • Performance • Porting • Programming 
• Research • RMI • RSS Feeds • Search • Security 
• Servlets • Struts • Swing • Testing • Tools 
• Virtual Machine • Web Applications • Web Design • Web Development Tools • Web Services and XML 


Testing

This week I received one of that lovely and tricky tasks: to learn Canoo webtest, test it and prove its usefulness to the project in three days - convincing the managers that it should be part of the project. The goal of the project is to produce a finance report with ~200 pages and that report should be validated through a zero-errors acceptance test. Several tools were considered, including...
on Nov 18, 2009
Avid readers of the glassfish aliases know that we are frequently asked questions about why their server isn't responding, or why it is slow, or how many requests are being worked on. And the first thing we always say is to look at the jstack output. So you're running on a Sun 5120 with 128 hardware threads and so you have 368 request processing threads and the jstack output is 10K lines. Now...
on Oct 16, 2009
A new Java Power Tools Newsletter is out! In this issue, we study the theory and practice of Mock Objects, including the subtle differences between mocks and stubs, and a simple case study using Mockito, the new kid on the block of Mock Objects frameworks for Java. Check it out!
on Sep 13, 2009
I am absolutely thrilled to anounce that I will be talking at the Canberra JUG meeting next week (on Wednesday, September 9, to be exact), about BDD in general, and Easyb and JDave in particular: Behaviour-Driven Development, or BDD, is an excellent development strategy that can help bridge the traditional gap between requirements and implementation. This talk will go discuss the basic...
on Sep 2, 2009
At JavaOne this year I did a short talk on using JMX in test-driven development. The talk was based on what I discovered working with JMX on another project, and delved deeper into while adding JMX support to SomnifugiJMS as part of release 21. Test-driven development worked extremely well when combined with JMX. JMX should help testing systems with some defined life cycle. Test Driven...
on Jun 8, 2008
Let's not be pedantic. Write unit tests before you code a method, or after it - in my experience, it matters little, as long as you think about and write the tests at roughly the same time as you write the code. It's coming back to do the tests later (or not coming back at all) which causes problems. Personally, I like to write unit tests just before or immediately after writing small chunks...
on Jun 2, 2008
Architecture This framework is created using ANT, TestNG and Selenium. Through this framework, a user is able to create an automated test case which can be run later by executing a single command. The uses of different frameworks are as follows: Selenium: This framework is needed for recording a testcase, exporting it into Java, and executing it on a browser TestNG: This framework is...
on May 20, 2008
PMD is an excellent static code analysis tool, with a rich set of rules regarding coding best practices and potential errors. The trick is working out which rules apply for your code. Out of curiosity, I ran some benchmarks on the Optimization PMD rules, to see how they measure up to the latest JDKs. The results were, interesting... Consider the AvoidEmptyStrings rule. PMD Rule:...
on Apr 18, 2008
I came across an interesting issue with the Hamcrest asserts today. I have a method that returns a list of domain objects, as shown here:     List<Stakeholder> stakeholders = stakeholderManager.findByName("Telecom"); This is a good example of how Hamcrest can make testing with collections easier. For example, to test the findByName() method, you should be...
on Apr 1, 2008
The ultimate aim of writing software is to produce a product that satisfies the end user and the project sponsor (sometimes they are the same, sometimes they are different). How can we make sure testing helps us obtain these goals in a cost-efficient manner? To satisfy the end user (the person who ends up relying on your software to make his or her work easier), you need to provide the optimal...
on Feb 19, 2008
body { font-family: arial, helvetica, sans-serif; font-size: 10pt; } pre.listing { display: table; color: black; background-color: lightgray; border-style: solid; border-width: 1px; border-color: darkgray; margin: 8px 0px 5px 0px; padding: 2px; width: auto; overflow: auto; font-family: monospace; } .warning { color: red...
on Nov 13, 2007
It's a simple thing -- but it does wonders to inform management and motivate developers! For that last 9 months I've had an Ambient Orb connected to my Hudson continuous integration server. When one of three critical software builds fail (including any of the tests that they automatically kick off), the Orb turns red and throbs in intensity: When all three critical builds (and associated...
on Aug 14, 2007
I test open source software that scales to thousands of nodes. In the course of my work, I occasionally hear from the project developers that certain test cases are "corner cases" -- that is, the test cases are covering rare or infrequent situations. Recently I was explaining this developer behavior to a colleague. I explained to him how I was weary of test cases being passed off as "corner...
on Jul 25, 2007
The long-awaited final version of jMock 2 was released today. There are some big changes since version one. For example, you can now write Cat cat = mock(Cat.class); and then set expectations on the returned cat object itself: checking(new Expectations() {{    one(cat).miaow();}}); (This means that the miaow method is expected to be called exactly once on the cat object.)...
on Apr 11, 2007
Seems like the process of bring Java under an open source license hasraised the question of Java platform quality even higher. Inparticular the question of reliability has been discussed more andmore widely among my peers over last few months. Thus, I decided toshare a couple of thoughts on the topic. Hopefully, you'll like whatyou'll about to see.What realibility means for us.According...
on Mar 29, 2007
This article is addressed to those interested in JavaTest TM harness and its open source version JT harness. Its goal is to serve as an example of using JavaTest harness outside of the world of productized test suites.  The story describes our experience of using JavaTest-style test format and JavaTest itself as a test harness for functional and regression tests. The tested item is a command...
on Feb 17, 2007
We kept breaking our XML catalog resolution in the course of developing an application. We would refactor the parser code, or we would upgrade a schema and forget to upgrade the catalog. The application wouldn't break, but it took longer to run since resources were being retrieved over the network rather than using the local catalog. Because we didn't time our test runs, and because we had lots...
on Feb 8, 2007
In Literate Programming with jMock I enthused about jMock's idea of constraints and flexible assertions. Now the jMock team has released version 1.0 of Hamcrest, the constraints part of jMock. Hamcrest matchers (what were called constraints in jMock) are actually useful for more than just writing unit tests, but it is their application in writing assertions where they really shine and will...
on Dec 22, 2006
Nowadays, Java developers have a choice of several unit testing frameworks used by Java developers these days: The old, venerable, widely-used JUnit 3.x. The cutting-edge TestNG, which tries to address issues found in JUnit 3.x, and take unit testing into the world of Java 5, annotations and IOC. The long overdue JUnit 4, which is basically JUnit's answer to TestNG. Now I don't think I'm all...
on Nov 12, 2006

Mobility

4 New Screencasts: LWUIT, JDTF, JSR 290, and JavaCard Our documentation team has put together four brand-new screencasts on current subjects. They are 5 minutes each in length and a great way to get introduced quickly to the highlights of each topic. I encourage you to have a look: LWUIT (Lightweight User Interface Toolkit) screencast A 5-minute overview to jump-start your understanding of LWUIT...
on Sep 4, 2009