dbsystel / microservice-integrationtest-gradle-plugin Goto Github PK
View Code? Open in Web Editor NEWGradle Plugin to execute Microservice Integrationtests
License: Mozilla Public License 2.0
Gradle Plugin to execute Microservice Integrationtests
License: Mozilla Public License 2.0
Some generic functionality in the test-framework library works very closely with the plugin (eg ServiceUriResolver). Those should be delivered with the plugin itself and not required to be hosted/integrated separately.
Those classes should implicitly be part of the classpath for the integrationTest configuration.
Please fix the license so that GitHub will recognize it as MPL-2.0
See sample project at https://github.com/xellsys/msintplugin-kotlin
โ msintplugin-kotlin git:(master) ./gradlew integrationTest -is
Initialized native services in: /Users/benjaminh/.gradle/native
Found daemon DaemonInfo{pid=66387, address=[cf6a85c5-fd0f-4ff3-b658-bcf3683f180d port:53155, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Idle, lastBusy=1525792954334, context=DefaultDaemonContext[uid=cfe347a8-c9a0-4b93-ba41-a0e228fc47c7,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home,daemonRegistryDir=/Users/benjaminh/.gradle/daemon,pid=66387,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=DE,-Duser.language=en,-Duser.variant]} however its context does not match the desired criteria.
At least one daemon option is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home,daemonRegistryDir=/Users/benjaminh/.gradle/daemon,pid=68643,idleTimeout=null,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=cfe347a8-c9a0-4b93-ba41-a0e228fc47c7,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home,daemonRegistryDir=/Users/benjaminh/.gradle/daemon,pid=66387,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=DE,-Duser.language=en,-Duser.variant]
Looking for a different daemon...
The client will now receive all logging from the daemon (pid: 67478). The daemon log file: /Users/benjaminh/.gradle/daemon/4.5.1/daemon-67478.out.log
Starting 19th build in daemon [uptime: 35 mins 39.744 secs, performance: 99%, no major garbage collections]
Using 4 worker leases.
Starting Build
Settings evaluated using settings file '/Users/benjaminh/repos/opensource/msintplugin-kotlin/settings.gradle'.
Projects loaded. Root project using build file '/Users/benjaminh/repos/opensource/msintplugin-kotlin/build.gradle'.
Included projects: [root project 'msintplugin-kotlin']
> Configure project :
Evaluating root project 'msintplugin-kotlin' using build file '/Users/benjaminh/repos/opensource/msintplugin-kotlin/build.gradle'.
Applying dependency management to configuration 'apiElements' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'archives' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'bootArchives' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'compile' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'compileClasspath' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'compileOnly' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'default' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'implementation' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'kapt' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'kaptTest' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'runtime' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'runtimeClasspath' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'runtimeElements' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'runtimeOnly' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'testCompile' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'testCompileClasspath' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'testCompileOnly' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'testImplementation' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'testRuntime' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'testRuntimeClasspath' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'testRuntimeOnly' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'integrationTestCompile' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'integrationTestRuntime' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'integrationTestImplementation' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'integrationTestCompileOnly' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'integrationTestCompileClasspath' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'integrationTestRuntimeOnly' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'integrationTestRuntimeClasspath' in project 'msintplugin-kotlin'
Applying dependency management to configuration 'kaptIntegrationTest' in project 'msintplugin-kotlin'
Starting process 'command 'mkdir''. Working directory: /Users/benjaminh/repos/opensource/msintplugin-kotlin Command: mkdir -p build/docker
Successfully started process 'command 'mkdir''
Starting process 'command 'cp''. Working directory: /Users/benjaminh/repos/opensource/msintplugin-kotlin Command: cp -r src/main/docker/ build/docker
Successfully started process 'command 'cp''
Starting process 'command 'cp''. Working directory: /Users/benjaminh/repos/opensource/msintplugin-kotlin Command: cp build/libs/msintplugin-kotlin-1.0.jar build/docker/msintplugin-kotlin.jar
Successfully started process 'command 'cp''
Starting process 'command 'docker''. Working directory: /Users/benjaminh/repos/opensource/msintplugin-kotlin Command: docker build build/docker/ -t kotlinhelloworld
Successfully started process 'command 'docker''
Sending build context to Docker daemon 20.98MB
Step 1/7 : FROM openjdk:8-jre
---> b8ce7cab8ed3
Step 2/7 : COPY msintplugin-kotlin.jar /
---> Using cache
---> 7c8d7b73b6d6
Step 3/7 : COPY entrypoint.sh /
---> Using cache
---> 34a38c351418
Step 4/7 : RUN chmod +x /entrypoint.sh
---> Using cache
---> f0d09ef262a0
Step 5/7 : ENV JAVA_DEBUG true
---> Using cache
---> c2fb20077596
Step 6/7 : ENTRYPOINT ["/entrypoint.sh"]
---> Using cache
---> d86ce0bcc05b
Step 7/7 : EXPOSE 8080 5005
---> Using cache
---> 7bfd8c039bb1
Successfully built 7bfd8c039bb1
Successfully tagged kotlinhelloworld:latest
All projects evaluated.
Selected primary task 'integrationTest' from project :
FAILURE: Build failed with an exception.
* What went wrong:
Circular dependency between the following tasks:
:assemble
+--- :bootJar
| \--- :classes
| \--- :processResources
| \--- :integrationTestUp
| \--- :build
| +--- :assemble (*)
| \--- :check
| \--- :test
| +--- :classes (*)
| +--- :compileTestKotlin
| | \--- :classes (*)
| \--- :testClasses
| \--- :compileTestJava
| +--- :classes (*)
| \--- :compileTestKotlin (*)
\--- :jar
\--- :classes (*)
(*) - details omitted (listed previously)
* Try:
Run with --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.CircularReferenceException: Circular dependency between the following tasks:
:assemble
+--- :bootJar
| \--- :classes
| \--- :processResources
| \--- :integrationTestUp
| \--- :build
| +--- :assemble (*)
| \--- :check
| \--- :test
| +--- :classes (*)
| +--- :compileTestKotlin
| | \--- :classes (*)
| \--- :testClasses
| \--- :compileTestJava
| +--- :classes (*)
| \--- :compileTestKotlin (*)
\--- :jar
\--- :classes (*)
(*) - details omitted (listed previously)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.onOrderingCycle(DefaultTaskExecutionPlan.java:499)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.determineExecutionPlan(DefaultTaskExecutionPlan.java:321)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.ensurePopulated(DefaultTaskGraphExecuter.java:217)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.populate(DefaultTaskGraphExecuter.java:119)
at org.gradle.initialization.DefaultGradleLauncher$CalculateTaskGraph.run(DefaultGradleLauncher.java:275)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.initialization.DefaultGradleLauncher.constructTaskGraph(DefaultGradleLauncher.java:175)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:130)
at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:109)
at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:78)
at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:75)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152)
at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:100)
at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:75)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$1.run(RunAsBuildOperationBuildActionRunner.java:43)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:40)
at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:49)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:32)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:57)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:32)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:64)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:29)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:45)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
VCS Checkout Cache (/Users/benjaminh/repos/opensource/msintplugin-kotlin/.gradle/vcsWorkingDirs) has not been cleaned up in 0 days
Currently we have to provide this dependency along our tests:
// this dependency is required for the later test runner image to execute the junit tests compile 'org.junit.platform:junit-platform-console-standalone:1.1.1'
This should be provided by the plugin.
To validate gradle versions compatibility (at least to a certain degree), we want to implement corresponding tests.
To validate docker backwards compatibility (at least to a certain degree), we want to implement corresponding tests.
To conveniently identify what image version is being used in a setup during integrationTestUp we want to print out a version.
The most generic solution that comes to mind is looking for a label with the key matching ^version|VERSION|Version$
To avoid increasing the project version manually (git tag/build.gradle) we would like to incorporate a gradle versioning plugin: https://bmuschko.com/blog/gradle-release-strategy/
Similar to the HTTP health check we also want to allow a TCP health check which tries to establish a simple TCP connection to an endpoint. OK on success, FAILED after timeout, PENDING in between.
It would be convenient to have a human readable html report generated from the JUnit XMLs.
Currently we support only a custom implementation of health checks. Docker did come up with its own health check format.
We should support that as well.
In order to resolve this plugin without having to build and host it, we want to publish it to the official gradle plugins repository at https://plugins.gradle.org/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.