Essentials of Testing: The Tools You Need to Know

Tech. Long Talk
Thursday, 3 June 2010, 10:30-11:20, Arena 6

Bettina Polasek
AdNovum Informatik


Marco Cicolini
AdNovum Informatik

Abstract
Introduction
How many testing tools do you need to find out whether your new Java application is ready to go live?

As a producer of individual software solutions, we had to find an answer to this question. From the ever-growing number of testing tools, frameworks, and technologies, we have therefore compiled a selection of testing tools that we carefully and continuously maintain to ensure that the quality of our testing complies with our standards at all times.

Motivation
All code degenerates by nature as a growing number of people add their changes. To ensure compliance with quality standards and that the software still works as before, automated tests should be run after every major change. The earlier you discover a bug, the less it will cost to fix it.
However, we also know that most developers do not like to sacrifice their time to the writing of test code. And we know that a high-quality testing environment motivates engineers to write better tests. Our testing toolbox provides a solid base for effective testing, and in our opinion, this is indispensable in professional software craftsmanship to help you achieve your quality goals.

The Toolbox
In our talk, we want to give you a general overview of available testing tools and best practices, followed by some hints on how such tools can be integrated into a professional development and integration environment. We will then introduce you to a layered approach for testing your applications. Starting from the base, i.e. unit tests, we will move up through the persistence layer, the business layer, and then reach the presentation layer. For each tool, we will let you know why we chose this tool over other tools, which experiences we made with the tool, and how certain pitfalls and problems can be avoided.

The Test Execution Framework: JUnit 4
As a general test execution framework, we decided to use JUnit 4, which comes already with a lot of support and a good maturity level. It is highly integrated with our custom-made continuous integration tool called NightlyBuild. This enables us to visualize test results and track reports over time.

Testing frameworks
Persistence tier testing requires a framework that reduces complexity in database and data handling. DBUnit is a handy helper in this context. It enables the tester to easily add and remove data from the database.
On the business tier, which tool is most suitable depends on your focus. Cactus is our tool of choice for in-container testing, while for unit tests, we prefer an embeddable container such as OpenEJB and for the testing of business components a container-simulation framework such as EJB3Unit. For the presentation tier, we present various tools that are used to either simulate or drive a browser, among them Selenium and HTMLUnit.

Mocking frameworks
Usually, in a testing setup, you will be confronted with incomplete components, which implies that you will need some kind of mocking tool. In our talk, we will introduce you to Mockito, a mocking framework we have integrated in our environment. Mockito will not only help you by mocking incomplete components, but will also enable you to easily manipulate components for more comprehensive testing.

Programming languages
The programming languages used for the writing of test code should ideally also be handled in a toolbox. Domain-specific languages can help you keep the test code simple, readable, and maintainable. We will show you how the use of a language such as Scala or Groovy can improve the quality of your test code. As these languages are less verbose than Java, your code will be easier to read.

Methodologies
To complete our tour of the toolbox, we will then present a set of methodologies for the testing of multi-layered applications such as Test-Driven Development (TDD) or Behavior-Driven Development (BDD). We will show you how to improve readability and maintainability of your tests and, most importantly, install controls to ensure that all tests are integrated and executed regularly (Continuous Integration, Continuous Testing).

Conclusion
A testing toolbox is a powerful tool – provided it is maintained and updated on a regular basis. Try not to integrate too many different tools, because you will have to maintain them. Also, make sure you have an adequate tool for every layer of your application. And never forget that test code should be first-class code – at least as good as productive code, if not better.

Tuesday, 1 June 2010
Wednesday, 2 June 2010
Thursday, 3 June 2010
Tech. Long Talk
Thursday, 3 June 2010, 10:30-11:20, Arena 6

Bettina Polasek
AdNovum Informatik


Marco Cicolini
AdNovum Informatik

Abstract
Introduction
How many testing tools do you need to find out whether your new Java application is ready to go live?

As a producer of individual software solutions, we had to find an answer to this question. From the ever-growing number of testing tools, frameworks, and technologies, we have therefore compiled a selection of testing tools that we carefully and continuously maintain to ensure that the quality of our testing complies with our standards at all times.

Motivation
All code degenerates by nature as a growing number of people add their changes. To ensure compliance with quality standards and that the software still works as before, automated tests should be run after every major change. The earlier you discover a bug, the less it will cost to fix it.
However, we also know that most developers do not like to sacrifice their time to the writing of test code. And we know that a high-quality testing environment motivates engineers to write better tests. Our testing toolbox provides a solid base for effective testing, and in our opinion, this is indispensable in professional software craftsmanship to help you achieve your quality goals.

The Toolbox
In our talk, we want to give you a general overview of available testing tools and best practices, followed by some hints on how such tools can be integrated into a professional development and integration environment. We will then introduce you to a layered approach for testing your applications. Starting from the base, i.e. unit tests, we will move up through the persistence layer, the business layer, and then reach the presentation layer. For each tool, we will let you know why we chose this tool over other tools, which experiences we made with the tool, and how certain pitfalls and problems can be avoided.

The Test Execution Framework: JUnit 4
As a general test execution framework, we decided to use JUnit 4, which comes already with a lot of support and a good maturity level. It is highly integrated with our custom-made continuous integration tool called NightlyBuild. This enables us to visualize test results and track reports over time.

Testing frameworks
Persistence tier testing requires a framework that reduces complexity in database and data handling. DBUnit is a handy helper in this context. It enables the tester to easily add and remove data from the database.
On the business tier, which tool is most suitable depends on your focus. Cactus is our tool of choice for in-container testing, while for unit tests, we prefer an embeddable container such as OpenEJB and for the testing of business components a container-simulation framework such as EJB3Unit. For the presentation tier, we present various tools that are used to either simulate or drive a browser, among them Selenium and HTMLUnit.

Mocking frameworks
Usually, in a testing setup, you will be confronted with incomplete components, which implies that you will need some kind of mocking tool. In our talk, we will introduce you to Mockito, a mocking framework we have integrated in our environment. Mockito will not only help you by mocking incomplete components, but will also enable you to easily manipulate components for more comprehensive testing.

Programming languages
The programming languages used for the writing of test code should ideally also be handled in a toolbox. Domain-specific languages can help you keep the test code simple, readable, and maintainable. We will show you how the use of a language such as Scala or Groovy can improve the quality of your test code. As these languages are less verbose than Java, your code will be easier to read.

Methodologies
To complete our tour of the toolbox, we will then present a set of methodologies for the testing of multi-layered applications such as Test-Driven Development (TDD) or Behavior-Driven Development (BDD). We will show you how to improve readability and maintainability of your tests and, most importantly, install controls to ensure that all tests are integrated and executed regularly (Continuous Integration, Continuous Testing).

Conclusion
A testing toolbox is a powerful tool – provided it is maintained and updated on a regular basis. Try not to integrate too many different tools, because you will have to maintain them. Also, make sure you have an adequate tool for every layer of your application. And never forget that test code should be first-class code – at least as good as productive code, if not better.

Tuesday, 1 June 2010
Wednesday, 2 June 2010
Thursday, 3 June 2010

Networking Groups

Follow Jazoon

        
Follow Jazoon

        

Jazoon in a Nutshell

Jazoon Rookie

Platinum Sponsors

Gold Sponsor

Silver Sponsors







Supporter

 
Home