HTTP Server adhering to the Http Cob Spec
git clone git@github.com:gemcfadyen/Apprenticeship-HttpServer.git
cd Apprenticeship-HttpServer
./gradlew clean build
(you may wish to exclude the folder vendor
from being compiled. You can do this in IntelliJ by right clicking on the vendor folder and choosing 'Mark Directory As Excluded')
cd vendor/cob-spec
mvn package
java -jar fitnesse.jar -p 9090
Open your browser and go to http://localhost:9090. You should see the Cob Spec website.
The original 8th Light cob spec suite can be found here. The copy in this repository runs against the httpServer that this repository builds.
Your server jar needs to take two command line arguments.
-p which specifies the port to listen on. Default is 5000. -d which specifies the directory to serve files from. Default is the PUBLIC_DIR variable configured in Fitnesse, which points to the vendor/cob_spec/public folder in this repository. Running Tests
To run all tests, click the Suite button. If you have not already started your server, the test suite will start it for you. To run the simple http request tests, first click the ResponseTestSuite link, then click the Suite button. To run the tests that require threading, first click the SimultaniousTestSuite link, then click the Suite button. To run a test individually, first click on the test link, then click the Test button.
For info, you can start your server directly using the following command:
java -jar {enter-the-path-you-cloned-the-project}/build/libs/httpServer-1.0-SNAPSHOT.jar