SE Tools Lab 4 JUnit Testing
SE Tools Lab 4 JUnit Testing
JUnit Testing
1. Project preparation
Create a new project called JunitwithAnt.
1|Page
(SE TOOLS AND PRACTICE) LAB 4, JUNIT TESTING
class Calculator {
y) { return x +
y;
Press the button and select the methods that you want to test.
2|Page
(SE TOOLS AND PRACTICE) LAB 4, JUNIT TESTING
If the JUnit library is not part of the classpath of your project, Eclipse will
prompt you to add it. Use this to add JUnit to your project.
import org.junit.Test;
3|Page
(SE TOOLS AND PRACTICE) LAB 4, JUNIT TESTING
4|Page