JUnit: Difference between revisions

From Wiki RB4
Line 6: Line 6:
===@Test===
===@Test===
Annotation @Test identifies that this method is a test method.
Annotation @Test identifies that this method is a test method.
==Running Test==
===Eclipse===
* right click class -> Run As JUnit

Revision as of 23:30, 13 March 2021

Introduction

JUnit is a test framework which uses annotation to identify the methods which contain tests. JUnit assumes that all test methods can be performed in an arbitrary order. Therefore tests should not depend other tests.

Annotations

@Test

Annotation @Test identifies that this method is a test method.

Running Test

Eclipse

  • right click class -> Run As JUnit