Automation With JUnit
Automation With JUnit
Meenakshi D’Souza
Test automation
What is JUnit?
JUnit features
Tests in JUnit
A simple example
public
class Calc
{
static public int calculator.add(int a, int b);
{
return a+b;
}
}
Outline JUnit JUnit through examples
A simple example
MinTest Class
The following constitute the test class for testing the Min Class:
Standard imports for all JUnit classes:
import static org.junit.Assert.*;
import org.junit.*;
import java.util.*;
Outline JUnit JUnit through examples
What next?
Credits
Part of the material used in these slides are derived from the
presentations of the book Introduction to Software Testing, by
Paul Ammann and Jeff Offutt.