{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-restdocs/issues/89","labels_url":"https://api.github.com/repos/spring-projects/spring-restdocs/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-restdocs/issues/89/comments","events_url":"https://api.github.com/repos/spring-projects/spring-restdocs/issues/89/events","html_url":"https://github.com/spring-projects/spring-restdocs/issues/89","id":95599593,"number":89,"title":"Document how to separate REST documenting tests from 'real' Junit tests ","user":{"login":"marceloverdijk","id":197004,"avatar_url":"https://avatars.githubusercontent.com/u/197004?v=3","gravatar_id":"","url":"https://api.github.com/users/marceloverdijk","html_url":"https://github.com/marceloverdijk","followers_url":"https://api.github.com/users/marceloverdijk/followers","following_url":"https://api.github.com/users/marceloverdijk/following{/other_user}","gists_url":"https://api.github.com/users/marceloverdijk/gists{/gist_id}","starred_url":"https://api.github.com/users/marceloverdijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marceloverdijk/subscriptions","organizations_url":"https://api.github.com/users/marceloverdijk/orgs","repos_url":"https://api.github.com/users/marceloverdijk/repos","events_url":"https://api.github.com/users/marceloverdijk/events{/privacy}","received_events_url":"https://api.github.com/users/marceloverdijk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-restdocs/labels/documentation","name":"documentation","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-17T06:46:28Z","updated_at":"2015-09-09T18:55:52Z","closed_at":null,"body":"When following the http://docs.spring.io/spring-restdocs/docs/1.0.0.M1/reference/html5/#getting-started-build-configuration-gradle setup the documenting tests are in the same 'scope' as the normal junit tests.\r\n\r\nI think this is a bad practice. When you have a fairly big project with a lot of 'real' junit tests it means when generating the docs all junit tests will be run as well. This is time consuming if you just want to work on documentation.\r\n\r\nFurther more the unit tests for the documentation are also included in the project's test report, which is also not desired.\r\n\r\nI haven't looked into it but with Gradle I think I can setup different `SourceSets` to separate them.\r\nI think it would be good to add something like this to the docs or maybe even making it easier for users by providing a specific restdocs plugin which setups these `SrouceSets` automatically."},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-restdocs/issues/comments/139007776","html_url":"https://github.com/spring-projects/spring-restdocs/issues/89#issuecomment-139007776","issue_url":"https://api.github.com/repos/spring-projects/spring-restdocs/issues/89","id":139007776,"user":{"login":"steviemo","id":1449377,"avatar_url":"https://avatars.githubusercontent.com/u/1449377?v=3","gravatar_id":"","url":"https://api.github.com/users/steviemo","html_url":"https://github.com/steviemo","followers_url":"https://api.github.com/users/steviemo/followers","following_url":"https://api.github.com/users/steviemo/following{/other_user}","gists_url":"https://api.github.com/users/steviemo/gists{/gist_id}","starred_url":"https://api.github.com/users/steviemo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steviemo/subscriptions","organizations_url":"https://api.github.com/users/steviemo/orgs","repos_url":"https://api.github.com/users/steviemo/repos","events_url":"https://api.github.com/users/steviemo/events{/privacy}","received_events_url":"https://api.github.com/users/steviemo/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T18:55:52Z","updated_at":"2015-09-09T18:55:52Z","body":"This is a good guide on how to separate out your documentation tests from your regular src/test/java tests: http://www.petrikainulainen.net/programming/gradle/getting-started-with-gradle-integration-testing/\r\nUsing this guide I created a new sourceSet with a task docs (src/docs/test, src/docs/resources) and run the documentation task in a separate CI build"}}