soapUI JUnit integration
JUnit (http://junit.org/) is a framework to write repeatable tests in Java. As the name implies, the primary purpose of JUnit is to verify the functionality of individual units of code. However, by integrating with the external libraries, JUnit tests can be extended to verify integration as well as system tests.
Since the examples are the best way to describe something, without spending time on abstract descriptions, let's look into adding a JUnit test into our sample HotelReservation
project.
Open the
hotel_reservation
project in your favorite Integrated Development Environment (IDE). (Please revisit Chapter 2, The Sample Project to recap your memory on the project structure and location.)Create a
test
directory at the root of the project, that is,SAMPLE_PROJECT_HOME/test
(for example,/home/charitha/soapui-projects/sample-project/hotel_reservation-1.0/test
).Add a new package,
com.test.soapuitest
under thetest
directory and add a new JUnit TestCase with a single...