Translate

Показ дописів із міткою JUnit. Показати всі дописи
Показ дописів із міткою JUnit. Показати всі дописи

понеділок, 29 липня 2013 р.

Run your Unit Tests in Parallel


It was about time when the developer of Unit Tests had the ability to run the tests in Parallel using annotations. In today's blog post, we will look at how you can make your traditional Junit Tests to run in parallel using annotations provided by Easytest. EasyTest is a Testing Framework build on top of JUnit to provide you ease of writing and maintaining your tests. It is focused on writing Data Driven Tests for your application.


Lets start by assuming a Class ItemService  that has a method 2 methods :
1) getItems that takes 2 arguments Double itemId and String itemType. The API class is described below.
2)    updateItem that takes an Item instance and updates it in the Database.

public class ItemService {

   public List getItems (Double itemId , String itemType);

   public void updateItem (Item item);

}

We will leave out the implementation for the sake of keeping the example simple.

Lets see the step by step approach of writing Parallel Unit Tests.