Paul Labis: This is a personal blog where everyone can read my experiences, ideas and thoughts about programming, latest gadgets and other information technology related topics, lifestyle and many other stuff I would like to share to the public.

DDSteps Testing with Ant Tutorial

It has been almost a year that I've been using DDSteps for testing a back-end project module and I haven't been able to share or create an article about it. So to those people reading this article, I hope this helps you get started on DDSteps testing.
DDSteps is an integrated tool stack, combining the best open source testing tools for Java and adding the ability to resuse test cases and test data.


DataDriven so that when you want to test "sign up" on your site, you can test the same flow with both "George Bush" and "Владимир Путин". Just add another row to spreadsheet, that's all! - by ddsteps.org 
In this tutorial, I will discuss a little about this simple java application I made focus on testing and generating html test results using ant. We will not deal much on the theories since those kind of information are already provided on www.ddsteps.org. I usually use eclipse as my preferred IDE in developing the application. The application makes use of ant to generate the HTML JUnit reports.
Alright! To get started with the app, I created first the project. Observe the files and directory structure. Below is the screenshot of my eclipse project.




  • Calculator.java - Is a simple app that contains calculateTotal(...) method that simply adds to float parameter.
  • CalculateDDStepTestCase.java - Is the class that extends DDStepsSpringTestCase. This class maps the fields(columns) and methods(sheet name) on the excel file. This is also the test class. 
  • CalculateDDStepTestCase-applicationContext.xml - Contains configuration and related settings for the data source definition and many other...
  • CalculateDDStepTestCase.xls - Contains test cases. Each row is a scenario. Every column represents a field. Every sheet represents a test method.
  • ddsteps-context.properties - It is where you put config variables or properties.
  • build.xml - Has the ant script responsible for running and generating html test results.


Alright then! I just gave you a little overview on project I did. For you to be able to experiment more, you should download this project. Click HERE to download!






DDSteps is pretty simple to implement and its great testing tool. I hope this example project helps!