ERServer is the sample application for the Pluralsight course Unit Testing Legacy Code in Java. It is a Java application to support a hospital emergency room's operation. The packages are arranged by course modules.
- Java 8 or higher is required to compile and run ERServer.
- Maven 3.5+ is also required.
- And git, of course
You will need to use Maven at the command line or from your IDE to compile ERServer. Once built, there is a Java main program that can be run.
mvn clean install
should compile and build ERServer.
To launch ERServer, first run the ERStubSystem class as a Java main, which will start up on http://localhost:4567. This represents an external dependency: an ambulance / patient transport service to the emergency room - not really part of the ERServer application.
Then start ERServer itself by running the class ERServerRunner as a Java main, which will launch ERServer on http://localhost:8088.
Although not needed to learn the techniques in the course, Fitnesse is included as an example of how customer-facing fitnesse tests may help expose the critical business logic of a legacy application to customers for documentation and confirmation purposes.
Fitnesse is a java jar, and is contained in the fitnesse folder of the project. Simply CD to this directory and launch fitnesse on desired port (8081 in this example):
java -jar fitnesse-standalone.jar -p 8081
If you would like to run the Postman tests as shown in the class, there is a JSON file at the project root that contains all the requests shown during the course. Just import these to Postman.