PowerMock
Published August 24th, 2009 Under Open Source Tools, Software Testing | Leave a Comment
PowerMock can be used to test code normally regarded as untestable! Have you ever heard anyone say that you should never use static or final methods in your code because it makes them impossible to test? Have you ever changed a method from private to protected for the sake of testability? What about avoiding “new”? Think again! PowerMock lets you mock static methods, remove static initializers, allow mocking without dependency injection and much much more. And it works just as well for J2EE as J2ME! This presentation will give the audience a good understanding on how to easily unit-test your code without the limitations of the common mock frameworks such as EasyMock and JMock.
John Ferguson Smart Devoxx Interview
Published June 2nd, 2009 Under Configuration Management, Open Source Tools, Software Testing | Leave a Comment
John Ferguson Smart is a freelance consultant and author of Java Power Tools. During the JavaPosse.com interview John, Dick and Carl talk about Continuous Integration tools, parameterized unit tests and what other test approaches the near future will probably bring.
The Value of Small Tests
Published January 7th, 2009 Under Software Testing | Leave a Comment
Whenever unit-tests are written, chances are good that the code is not isolated. Many tests run against a given class/interface/function. The design didn’t consider isolating the dependencies of this function, which makes tests slower, larger, less focused, and likely depending on external dependencies (e.g. database access) which decreases the reliability. In addition, it disables much of the interaction-based testing or verification of behavior at error conditions. In this session I will demonstrate the value of small, isolated tests and explain good engineering practices for how to structure them. I will review examples in several programming languages and domains including C++ and Java, but also on web applications, UMTS Protocol Design and Testing (Device Testing), and other platforms. Talk give at the Third Annual Google Test Automation Conference (GTAC), Seattle, WA, Oct. 23rd and 24th. Speaker: Christopher Semturs.
Testing as an Architectural Concern
Published November 24th, 2008 Under Architecture, Software Testing | Leave a Comment
In this session, Kevin Seal will present some recent experiences of testing a JavaEE project and how coverage was a double-edged sword, unit testing a blessing and a curse, and a pragmatic mix of test approaches was eventually invaluable in refining the architecture and development process. Kevin Seal talks about the role of testing in design and development processes. Unit testing has several benefits, like providing easy refactoring, simplified integration, and improved documentation. However, while most developers know how to write unit tests, they do not necessarily know what they are testing. In other words, unit testing is not reliable for catching integration errors or broader system-level errors.
Kevin goes on to discuss how the testing process needs to be weighed in balance. If System Integration Tests (SIT) and User Acceptance Tests (UAT) are left for late in the development process or not given enough importance, the cost of errors at the architectural level are likely to be much more than the ones at the programming level. Unit testing is easy but architectural testing is more important. It is always better, he says, to treat the system as a whole, because unit tests do not give a feeling of complete consistency. Finally, Kevin stresses the importance of making sure that developers and architects use the same language when they talking about units, mock objects, fake objects, etc. The talk is followed by a round-table discussion where the role of testing in real world applications is discussed further.
JUnit Tutorial
Published November 14th, 2008 Under Open Source Tools, Software Testing, User Interface | Leave a Comment
A brief tutorial on how to use the JUnit testing framework for Java.
« go back — keep looking »