|
TestingRestReleases
A strategy for testing the REST module before release
Phase-QA IntroductionWhen a release is built automated tests ensure that the system is behaving as normal. However, before releasing a build it is important to ensure that a human has installed and tested the release. The document describes the minimum that you should do in order to test a build of the rest module ready for release. You are strongly encouraged to try variations around the themes outlined in this document. The more thorough you test the build, the less likely there will be a significant bug in the release. PreparationYou must have installed a Servlet engine on your machine, we suggest Jetty or Apache Tomcat. Download the REST api war and drop it into your servlet container, then start up the container. You will also need CURL to run these tests. DetailsStart the REST serverPurpose of testTo ensure the REST server is running. Commandshttp://localhost:8080/simal-rest-0.2 Expected behaviourA page is displayed telling you that the simal rest is available on this server. Import RDF DataTo ensure a document can be imported from the local filesystem via the REST interface. Commandscurl --data "rdf=<RDF/>" http://localhost:8080/simal-rest-0.2/simal-rest/addProject Expected BehaviourHTTP response 200. Get all projects as JSONTo ensure we can retrieve projects in JSON format Commandscurl -G http://localhost:8080/simal-rest-0.2/simal-rest/allProjects/json Expected BehaviourA list of all projects in the repository in JSON format. Get all people as JSONTo ensure we can retrieve people in JSON format Commandscurl -G http://localhost:8080/simal-rest-0.2/simal-rest/allPeople/json Expected BehaviourA list of all people in the repository in JSON format. | |