Quantcast
Viewing all articles
Browse latest Browse all 5661

Unit testing in gradle-based project

Hi all

Recently I started using libGDX library and gradle.

I have problem with unit tests (using JUnit4).

I created one simple test for one simple class. Both classes in the same module and the same package. Both in separate source trees src/* and test/*

I created Junit run configuration with classpath of this module and with my only test class as "Class".

When I'm trying to run it I get "Class not found" and this message refers to my test class selected as "Class" in run configuration!

 

On the other hand:

When started from gradle tool window I have log messages as follow in the right side of the Run window:

 

Testing started at 23:54 ...
23:54:20: Executing external tasks 'cleanTest test'...
Configuration on demand is an incubating feature.
:libgdx_dependent:cleanTest UP-TO-DATE
:libgdx_dependent:compileJava UP-TO-DATE
:libgdx_dependent:processResources UP-TO-DATE
:libgdx_dependent:classes UP-TO-DATE
:libgdx_dependent:compileTestJava UP-TO-DATE
:libgdx_dependent:processTestResources UP-TO-DATE
:libgdx_dependent:testClasses UP-TO-DATE
:libgdx_dependent:test
:libgdx_dependent:test UP-TO-DATE
BUILD SUCCESSFUL
Total time: 0.852 secs
23:54:21: External tasks execution finished 'cleanTest test'.

 

And on the left side:

 

Test events were not received

 

 

 

I have no idea what is going on.

Can anyone help?


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>