rodm/gradle-teamcity-plugin

Support running integration tests by starting and stopping the server and agent

rodm opened this issue · 0 comments

rodm commented

The Gradle test task is extension aware and could be enhanced to allow a TeamCity instance to be configured. The server and/or agent can be started before running the tests and stopped after the tests.

An example integration test task configuration

task integrationTest(type: Test) {
    group = 'verification'
    testClassesDir = sourceSets.integrtaionTest.output.classesDir
    classpath = sourceSets.integrataionTest.runtimeClasspath

    teamcity {
        environment = 'teamcity10'
    }
}

The environment property will reference a TeamCity installation defined in the environments section.

Currently the start server and start agent tasks don't wait until the server and agent are started and ready before continuing, this will be required before running the tests.

Tests may not be repeatable or reliable if using the same TeamCity configuration that the environments use.