Permalink
Browse files

Slides and content - part 8

  • Loading branch information...
MarkusTiede committed Oct 13, 2017
1 parent 9fabd52 commit bfa11014de6eeff3c3f2b75a7a63c3d58e07a9b0
@@ -166,8 +166,38 @@ <h2 class="fragment fade-up"><b>DEMO</b>nstrate</h2>
<section>
<section data-background="#E5F3F9">
<h2>Object Mapping</h2>
<p>required for CAPs without default mapping</p>
<p>required for nearly all CAPs</p>
<p>Application and MenuBar use "default mapping"</p>
<p>represents GUI widget instance in source code</p>
</section>
<section data-background="#E5F3F9">
<h2>Exercise04.java</h2>
<img src="../img/aut-ensemble.png" width="30%">
<h3>search for "FXML Login Demo"</h3>
</section>
<section data-background="#E8F9E5">
<h2>Exercise04o.java</h2>
<img src="../img/aut-ensemble.png" width="30%">
<h3>launch AUT</h3>
<h3>collect search textfield</h3>
<h2 class="fragment fade-up"><b>DEMO</b>nstrate</h2>
</section>
<section data-background="#E8F9E5">
<h2>Exercise04.java</h2>
<img src="../img/aut-ensemble.png" width="30%">
<h3>add component identifier into OM.java</h3>
<h3>run Exercise04</h3>
<h2 class="fragment fade-up"><b>DEMO</b>nstrate</h2>
</section>
</section>
<section>
<section data-background="#E8F9E5">
<h2>Exercise05.java</h2>
<img src="../img/appLOGIN.png" width="25%">
<p>enter username and password:<pre><code data-trim data-noescape>
"demo/demo"</code></pre></p>
<p>and login afterwards</p>
<h2 class="fragment fade-up"><b>DEMO</b>nstrate</h2>
</section>
</section>
</div>
@@ -33,6 +33,7 @@ <h2>Topics</h2>
<p class="fragment grow">UI Toolkits</p>
<p class="fragment grow">Event Handling</p>
<p class="fragment grow">Screenshots</p>
<p class="fragment grow">Object Mapping heuristic</p>
</section>
</div>
</div>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi/src/org/eclipse/jubula/examples/api/jdk/javafx/ensemble/osgi/Exercise04.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi.Exercise04"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi"/>
</launchConfiguration>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi/src/org/eclipse/jubula/examples/api/jdk/javafx/ensemble/osgi/Exercise04o.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi.Exercise04o"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi"/>
</launchConfiguration>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi/src/org/eclipse/jubula/examples/api/jdk/javafx/ensemble/osgi/Exercise05.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi.Exercise05"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi"/>
</launchConfiguration>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi/src/org/eclipse/jubula/examples/api/jdk/javafx/ensemble/osgi/Exercise06.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi.Exercise06"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi"/>
</launchConfiguration>
@@ -13,31 +13,28 @@
import org.eclipse.jubula.client.AUTAgent;
import org.eclipse.jubula.client.MakeR;
import org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi.env.LocalSettings;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
public class Exercise01 {
/** the AUT-Agent */
private AUTAgent m_agent;
private static AUTAgent agent;
/** prepare */
@Before
public void setUp() throws Exception {
m_agent = MakeR.createAUTAgent(LocalSettings.AUT_AGENT_HOSTNAME,
LocalSettings.AUT_AGENT_PORT);
m_agent.connect();
@BeforeClass
public static void setUp() throws Exception {
agent = MakeR.createAUTAgent(LocalSettings.AUT_AGENT_HOSTNAME,
LocalSettings.AUT_AGENT_PORT);
agent.connect();
}
@Test
public void test() {
Assert.assertTrue(m_agent.isConnected());
public void testAUTAgentConnection() {
Assert.assertTrue(agent.isConnected());
}
/** cleanup */
@After
public void tearDown() throws Exception {
m_agent.disconnect();
@AfterClass
public static void tearDown() throws Exception {
agent.disconnect();
}
}
@@ -16,44 +16,40 @@
import org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi.env.LocalSettings;
import org.eclipse.jubula.toolkit.javafx.JavafxComponents;
import org.eclipse.jubula.tools.AUTIdentifier;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
/** @author BREDEX GmbH */
public class Exercise02 {
/** the AUT-Agent */
private AUTAgent m_agent;
/** the AUT */
private AUT m_aut;
private static AUTAgent agent;
protected static AUT aut;
/** prepare */
@Before
public void setUp() throws Exception {
m_agent = MakeR.createAUTAgent(LocalSettings.AUT_AGENT_HOSTNAME,
@BeforeClass
public static void setUp() throws Exception {
agent = MakeR.createAUTAgent(LocalSettings.AUT_AGENT_HOSTNAME,
LocalSettings.AUT_AGENT_PORT);
m_agent.connect();
agent.connect();
AUTIdentifier id = m_agent.startAUT(LocalSettings.myAUTStartConfig());
AUTIdentifier id = agent.startAUT(LocalSettings.myAUTStartConfig());
if (id != null) {
m_aut = m_agent.getAUT(id, JavafxComponents.getToolkitInformation());
m_aut.connect();
aut = agent.getAUT(id, JavafxComponents.getToolkitInformation());
aut.connect();
} else {
Assert.fail("AUT start has failed!"); //$NON-NLS-1$
}
}
@Test
public void test() {
Assert.assertTrue(m_aut.isConnected());
public void testAUTConnection() {
Assert.assertTrue(aut.isConnected());
}
/** cleanup */
@After
public void tearDown() throws Exception {
m_aut.disconnect();
m_agent.stopAUT(m_aut.getIdentifier());
m_agent.disconnect();
@AfterClass
public static void tearDown() throws Exception {
aut.disconnect();
agent.stopAUT(aut.getIdentifier());
agent.disconnect();
}
}
@@ -10,60 +10,24 @@
*******************************************************************************/
package org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi;
import org.eclipse.jubula.client.AUT;
import org.eclipse.jubula.client.AUTAgent;
import org.eclipse.jubula.client.MakeR;
import org.eclipse.jubula.client.Result;
import org.eclipse.jubula.communication.CAP;
import org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi.env.LocalSettings;
import org.eclipse.jubula.toolkit.concrete.components.Application;
import org.eclipse.jubula.toolkit.enums.ValueSets.Operator;
import org.eclipse.jubula.toolkit.javafx.JavafxComponents;
import org.eclipse.jubula.tools.AUTIdentifier;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
/** @author BREDEX GmbH */
public class Exercise03 {
/** the AUT-Agent */
private AUTAgent m_agent;
/** the AUT */
private AUT m_aut;
/** prepare */
@Before
public void setUp() throws Exception {
m_agent = MakeR.createAUTAgent(LocalSettings.AUT_AGENT_HOSTNAME,
LocalSettings.AUT_AGENT_PORT);
m_agent.connect();
AUTIdentifier id = m_agent.startAUT(LocalSettings.myAUTStartConfig());
if (id != null) {
m_aut = m_agent.getAUT(id, JavafxComponents.getToolkitInformation());
m_aut.connect();
} else {
Assert.fail("AUT start has failed!"); //$NON-NLS-1$
}
}
public class Exercise03 extends Exercise02 {
@Test
public void test() {
public void testCAP() {
Application app = JavafxComponents.createStage();
CAP waitForWindow = app.waitForWindow(".*Ensmble.*",
Operator.matches,
15 * 1000,
1000);
Result<String> result = m_aut.execute(waitForWindow, "method payload");
Result<String> result = aut.execute(waitForWindow, "method payload");
Assert.assertTrue(result.isOK());
}
/** cleanup */
@After
public void tearDown() throws Exception {
m_aut.disconnect();
m_agent.stopAUT(m_aut.getIdentifier());
m_agent.disconnect();
}
}
@@ -0,0 +1,51 @@
/*******************************************************************************
* Copyright (c) 2017 Markus Tiede
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Markus Tiede - initial API and implementation and/or initial documentation
*******************************************************************************/
package org.eclipse.jubula.examples.api.jdk.javafx.ensemble.osgi;
import org.eclipse.jubula.toolkit.base.components.TextInputComponent;
import org.eclipse.jubula.toolkit.concrete.components.Application;
import org.eclipse.jubula.toolkit.enums.ValueSets.Modifier;
import org.eclipse.jubula.toolkit.enums.ValueSets.Operator;
import org.eclipse.jubula.toolkit.javafx.JavafxComponents;
import org.eclipse.jubula.toolkit.javafx.components.TextField;
import org.eclipse.jubula.tools.ComponentIdentifier;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
/** @author BREDEX GmbH */
public class Exercise04 extends Exercise02 {
@Before
public void localSetUp() throws Exception {
aut.execute(JavafxComponents.createStage()
.waitForWindow(".*Ensemble.*",
Operator.matches,
15 * 1000,
1000), null);
}
@Test
public void fillEnsembleSearchField() {
ComponentIdentifier<TextField> ensembleSearchCI = OM.ensembleSearch;
TextInputComponent ensembleSearch = JavafxComponents.createTextField(ensembleSearchCI);
aut.execute(ensembleSearch.replaceText("FXML Login Demo"), null);
}
@After
public void localTearDown() throws Exception {
Modifier[] none = { Modifier.none };
Application stage = JavafxComponents.createStage();
aut.execute(stage.delay(2 * 1000), null);
aut.execute(stage.keyCombination(none, "DOWN"), null);
aut.execute(stage.keyCombination(none, "ENTER"), null);
aut.execute(stage.delay(10 * 1000), null);
}
}
Oops, something went wrong.

0 comments on commit bfa1101

Please sign in to comment.