netextzhwa wrote: > > What should I do to run unit test and web test separately? and manage > their dependency? >
One way is to put both unit and web tests into src/test/groovy, and dependencies on the testCompile or testRuntime class path. Then all you'll need is another test task that includes web tests by a package or class naming convention. The existing test task will have to exclude the web tests. Another way is to create a separate source set and separate webTestCompile/webTestRuntime configurations for the web tests. For an example on how to do this, see samples/java/withIntegrationTests in the full Gradle distribution. Additionally you'll probably need two tasks to start and stop the web server, unless you do this from within your tests or want the tests to run against an already running server. -- Peter Niederwieser Developer, Gradle http://www.gradle.org Trainer & Consultant, Gradleware http://www.gradleware.com Creator, Spock Framework http://spockframework.org -- View this message in context: http://gradle.1045684.n5.nabble.com/where-to-put-different-test-file-in-project-structure-tp3407720p3408011.html Sent from the gradle-user mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
