Skip to content

Implement functional testing Framework #173

Open
@eholum

Description

@eholum

Hopefully on top of 167...

This is for GUI tests relative the actual Iris application. Includes fixing this:

Hi all,

Though I doubt we'd expect to run the integration tests with a SAMP hub already running, I figure I'd post this info anyhow.

BuilderMainViewIT fails when a SAMP hub is already running before the test is run.

$ mvn -U verify

.....

Running cfa.vo.gui.BuilderMainViewIT
Launching GUI...
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 62.592 sec <<< FAILURE! - in cfa.vo.gui.BuilderMainViewIT
testNewSegment(cfa.vo.gui.BuilderMainViewIT) Time elapsed: 62.588 sec <<< FAILURE!
java.lang.AssertionError: No window was shown (timeout expired)
at org.junit.Assert.fail(Assert.java:93)
at org.uispec4j.assertion.testlibrairies.JUnitLibrary.fail(JUnitLibrary.java:7)
at org.uispec4j.assertion.testlibrairies.AssertAdapter.fail(AssertAdapter.java:11)
at org.uispec4j.interception.handlers.ShownInterceptionDetectionHandler.waitWindow(ShownInterceptionDetectionHandler.java:39)
at org.uispec4j.interception.WindowInterceptor.run(WindowInterceptor.java:324)
at org.uispec4j.interception.WindowInterceptor.run(WindowInterceptor.java:290)
at cfa.vo.iris.test.SampUISpecAdapter.getMainWindow(SampUISpecAdapter.java:36)
at org.uispec4j.UISpecTestCase.getMainWindow(UISpecTestCase.java:84)
at cfa.vo.gui.BuilderMainViewIT.setUp(BuilderMainViewIT.java:48)

The source code around BuilderMainViewIT.java:48:

public void setUp() throws Exception {
    super.setUp();
    setAdapter(new SampUISpecAdapter(Iris.class));
    mainWindow = getMainWindow();                     // <--  fails here
    desktop = mainWindow.getDesktop();

Is this expected? I'll look into this, but I figure I'd ask if there's a quick answer first. Or if it's worth looking into :)

Iris is supposed to automatically connect to a SAMP hub if one is already running. Though I don't think it matters if this isn't expected too much, since the user would never run this test.

At least we'll know why this test might fail if we run the ITs locally.

Thanks,
Jamie

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions