java - TestFX and Gradle - NoNodeFoundException -


testfx works in eclipse , gui tests run successfully. not work gradle. gives me nonodefoundexception on button. if rid of line of code shows me same exception next line points on textfield.

it seems noone ever tried use testfx in combination gradle besides developer.

any idea how solve that?

gradle.build

apply plugin: 'java' apply plugin: 'maven' apply plugin: 'checkstyle' apply plugin: 'application' apply plugin: 'jacoco'   group = 'todomanager' version = '0.0.1' description = """aufgabenplanung""" 

//privacy protection mainclassname = "*********.todomanager.model.readandwrite"

defaulttasks 'clean', 'test', 'build', 'jacocotestreport','distzip','javadoc','wrapper'   repositories {     maven { url "http://repo.maven.apache.org/maven2" }      jcenter()      mavencentral() }   jar {     basename = 'todomanager'     version =  '0.5.0' }  dependencies {  /*     testcompile group: "org.loadui", name: "testfx", version: "3.1.2"     testcompile "org.testfx:testfx-core:4.0.+"     testcompile "org.testfx:testfx-junit:4.0.+"     compile files('lib/todomanagerlibrary-1.1.jar')     testcompile 'junit:junit:4.+'    */    testcompile group: "org.loadui", name: "testfx", version: "3.1.2"     testcompile "junit:junit:4.10"     testcompile "org.testfx:testfx-core:4.0.+"     testcompile "org.testfx:testfx-legacy:4.0.+", {         exclude group: "junit", module: "junit"     } }  checkstyle {     sourcesets = [sourcesets.main] }  jacoco {     toolversion = "0.7.1.201405082137"     reportsdir = file("$builddir/reports/jacoco") }  jacocotestreport {     reports {         xml.enabled false         csv.enabled false         html.destination "$builddir/reports/jacoco/html"     }         classdirectories = files('build/classes/') }  test {      jacoco {         append = false         destinationfile = file("$builddir/jacoco/jacocotest.exec")         classdumpfile = file("$builddir/jacoco/classpathdumps")     } } 

don't know if helpful here project structure. enter image description here

i started using testfx gradle.

here build.gradle:

plugins{     id 'application'     id 'com.github.johnrengelman.shadow' version '1.2.3' }  mainclassname = "dialogio.dialogio" repositories {     mavencentral() } dependencies{     compile 'com.google.guava:guava:19.0'     compile 'org.controlsfx:controlsfx:8.40.10'     testcompile 'org.loadui:testfx:3.1.0' } test {   testlogging.showstandardstreams = true } 

for reason, if had button loginbutton = find("#loginbutton");, exception mentioned though set fx:id. worked after set css id:

enter image description here


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -