{"action":"closed","issue":{"url":"https://api.github.com/repos/freme-project/technical-discussion/issues/29","labels_url":"https://api.github.com/repos/freme-project/technical-discussion/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/freme-project/technical-discussion/issues/29/comments","events_url":"https://api.github.com/repos/freme-project/technical-discussion/issues/29/events","html_url":"https://github.com/freme-project/technical-discussion/issues/29","id":85048339,"number":29,"title":"Specification: Integration tests","user":{"login":"jnehring","id":10537540,"avatar_url":"https://avatars.githubusercontent.com/u/10537540?v=3","gravatar_id":"","url":"https://api.github.com/users/jnehring","html_url":"https://github.com/jnehring","followers_url":"https://api.github.com/users/jnehring/followers","following_url":"https://api.github.com/users/jnehring/following{/other_user}","gists_url":"https://api.github.com/users/jnehring/gists{/gist_id}","starred_url":"https://api.github.com/users/jnehring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnehring/subscriptions","organizations_url":"https://api.github.com/users/jnehring/orgs","repos_url":"https://api.github.com/users/jnehring/repos","events_url":"https://api.github.com/users/jnehring/events{/privacy}","received_events_url":"https://api.github.com/users/jnehring/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/freme-project/technical-discussion/labels/Specification","name":"Specification","color":"bfd4f2"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/freme-project/technical-discussion/milestones/1","html_url":"https://github.com/freme-project/technical-discussion/milestones/FREME%200.2","labels_url":"https://api.github.com/repos/freme-project/technical-discussion/milestones/1/labels","id":1142329,"number":1,"title":"FREME 0.2","description":"","creator":{"login":"jnehring","id":10537540,"avatar_url":"https://avatars.githubusercontent.com/u/10537540?v=3","gravatar_id":"","url":"https://api.github.com/users/jnehring","html_url":"https://github.com/jnehring","followers_url":"https://api.github.com/users/jnehring/followers","following_url":"https://api.github.com/users/jnehring/following{/other_user}","gists_url":"https://api.github.com/users/jnehring/gists{/gist_id}","starred_url":"https://api.github.com/users/jnehring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnehring/subscriptions","organizations_url":"https://api.github.com/users/jnehring/orgs","repos_url":"https://api.github.com/users/jnehring/repos","events_url":"https://api.github.com/users/jnehring/events{/privacy}","received_events_url":"https://api.github.com/users/jnehring/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":4,"state":"open","created_at":"2015-06-01T07:33:09Z","updated_at":"2015-09-10T08:46:51Z","due_on":"2015-07-15T22:00:00Z","closed_at":null},"comments":0,"created_at":"2015-06-04T11:21:46Z","updated_at":"2015-09-10T08:46:51Z","closed_at":"2015-09-10T08:46:51Z","body":"We need automated integration tests: These tests test each API endpoint. Each test performs API calls via HTTP and evaluates the output. Test framework will be JUnit, all tests will be implemented in the Broker.\r\n\r\n# Joint test environment across all tests\r\n\r\nWe want to setup test environment (start broker) only once, then execute the whole test suite and tear down test environment afterwards. Right now the unit tests are executed using maven surefire plugin. I believe for integration tests the [Maven failsafe plugin](http://maven.apache.org/surefire/maven-failsafe-plugin/) is better because it supports setting up a joint test environment across several test classes. An extensive discussion about this topic is [here](http://stackoverflow.com/questions/82949/before-and-after-suite-execution-hook-in-junit-4-x). An alternate solution discussed there is to use maven surefire plugin and register a \"RunListener\" to manage joint test environment but this sounds like a dirty hack - maven failsafe plugin sounds way better.\r\n\r\n# Standalone test tool\r\n\r\nA nice to have feature would be to export a runnable jar from the test cases. We can then use this jar to verify any currently running FREME API which is especially useful to verify that the live installation of FREME works correct. That seams to be quiet easy as described [here](http://stackoverflow.com/questions/4648341/how-to-export-junit-test-suite-as-executable-jar). The base url for the api under test can be passed as a command line parameter. This feature can provide a basis for constant monitoriong of FREME API.\r\n\r\n# Timeline and feature set for FREME 0.2\r\n\r\nIn FREME 0.2 we will create the framework for integration testing as described here. Then in FREME 0.3 we will program integration tests for all api endpoints. The reason for not doing the complete work package in FREME 0.2 is\r\n* We already have a long feature list for FREME 0.2\r\n* We are going to hire students that start 1.7. / 15.7.. They will program the API tests. They start too late to do this work."}}