TechnionYP5777 / Smartcity-Smarthouse

Smartcity-Smarthouse
11 stars 5 forks source link

GUI Tests are not working on Travis #151

Closed RonGatenio closed 7 years ago

RonGatenio commented 7 years ago

il.ac.technion.cs.smarthouse.guitesting.MainSystemGuiTest is working on my computer, but failing on Travis.

The output of mvn test on travis for this commit be1a75e2dabf4e4402d236c279ec2bc71ededb90:

Running il.ac.technion.cs.smarthouse.guitesting.MainSystemGuiTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.032 sec <<< FAILURE!
testInstalation(il.ac.technion.cs.smarthouse.guitesting.MainSystemGuiTest)  Time elapsed: 0.003 sec  <<< ERROR!
java.lang.IllegalArgumentException: java.awt.AWTException: headless environment
    at org.loadui.testfx.FXScreenController.<init>(FXScreenController.java:32)
    at org.loadui.testfx.GuiTest.<init>(GuiTest.java:555)
    at il.ac.technion.cs.smarthouse.guitesting.MainSystemGuiTest.<init>(MainSystemGuiTest.java:16)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:217)
    at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:266)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.awt.AWTException: headless environment
    at java.awt.Robot.<init>(Robot.java:91)
    at org.loadui.testfx.FXScreenController.<init>(FXScreenController.java:28)
    ... 30 more

Note that before this commit this test was ignored by @ignore or by mvn test (the previous name of the class ended with *Tests and therefor it was ignored by maven)

RonGatenio commented 7 years ago

I found this on https://github.com/TestFX/TestFX:

RonGatenio commented 7 years ago

Broke it again: 145027a8e87848363e007186c8b1ecac630a2ff7 This time I think TestFX worked, but the tests are still failing:

RonGatenio commented 7 years ago

Still working on my local computer: capture