Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2014-11-07 09:30:30 +0000
committerMarkus Tiede2014-11-07 09:30:36 +0000
commit3283016fbf627be5019c988562a94fe14df6f66d (patch)
tree358a7fdf8e82efa7e70a1d820844d1a2354705a2 /org.eclipse.jubula.qa.api.rcp
parent9574693786500dfcd507a35d8a997f6945132263 (diff)
downloadorg.eclipse.jubula.core-3283016fbf627be5019c988562a94fe14df6f66d.tar.gz
org.eclipse.jubula.core-3283016fbf627be5019c988562a94fe14df6f66d.tar.xz
org.eclipse.jubula.core-3283016fbf627be5019c988562a94fe14df6f66d.zip
Non-sprint task - implement error handling in case of remote connection / termination problems.
Diffstat (limited to 'org.eclipse.jubula.qa.api.rcp')
-rw-r--r--org.eclipse.jubula.qa.api.rcp/src/main/java/org/eclipse/jubula/qa/api/TestSimpleAdderRCPAUT.java24
1 files changed, 14 insertions, 10 deletions
diff --git a/org.eclipse.jubula.qa.api.rcp/src/main/java/org/eclipse/jubula/qa/api/TestSimpleAdderRCPAUT.java b/org.eclipse.jubula.qa.api.rcp/src/main/java/org/eclipse/jubula/qa/api/TestSimpleAdderRCPAUT.java
index 5e382a897..fb58791a1 100644
--- a/org.eclipse.jubula.qa.api.rcp/src/main/java/org/eclipse/jubula/qa/api/TestSimpleAdderRCPAUT.java
+++ b/org.eclipse.jubula.qa.api.rcp/src/main/java/org/eclipse/jubula/qa/api/TestSimpleAdderRCPAUT.java
@@ -12,6 +12,7 @@ package org.eclipse.jubula.qa.api;
import java.net.URL;
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
import java.util.Locale;
@@ -28,6 +29,7 @@ import org.eclipse.jubula.communication.CAP;
import org.eclipse.jubula.toolkit.base.components.GraphicsComponent;
import org.eclipse.jubula.toolkit.base.components.TextComponent;
import org.eclipse.jubula.toolkit.base.components.TextInputComponent;
+import org.eclipse.jubula.toolkit.concrete.components.Application;
import org.eclipse.jubula.toolkit.concrete.components.MenuBarComponent;
import org.eclipse.jubula.toolkit.enums.ValueSets.InteractionMode;
import org.eclipse.jubula.toolkit.enums.ValueSets.Operator;
@@ -97,14 +99,10 @@ public class TestSimpleAdderRCPAUT {
autID,
"SimpleAdder.exe", //$NON-NLS-1$
"..\\examples\\AUTs\\SimpleAdder\\rcp\\win32\\win32\\x86\\", //$NON-NLS-1$
- new String[]{
- "-clean" , //$NON-NLS-1$
- "-configuration", //$NON-NLS-1$
- "@none", //$NON-NLS-1$
- "-data", //$NON-NLS-1$
- "@none"}, //$NON-NLS-1$
+ null,
Locale.getDefault(),
Locale.getDefault());
+
AUTIdentifier id = m_agent.startAUT(config);
if (id != null) {
m_aut = m_agent.getAUT(id, SwtComponents
@@ -133,6 +131,14 @@ public class TestSimpleAdderRCPAUT {
}
/** the actual test method */
+ @Test
+ public void testApplication() throws Exception {
+ Application app = SwtComponents.createApplication();
+ exec(app.wait(new Integer(1000)));
+ exec(app.waitForWindow(".*", Operator.matches, 1000, 100)); //$NON-NLS-1$
+ }
+
+ /** the actual test method */
@SuppressWarnings("null")
@Test(expected = CheckFailedException.class)
public void testTestFirstSimpleAdderSteps() throws Exception {
@@ -163,13 +169,11 @@ public class TestSimpleAdderRCPAUT {
* the result
*/
private void exec(CAP cap, List<Result> r) {
- Result<String> execute = m_aut.execute(cap,
- "some additional information"); //$NON-NLS-1$
+ Result<Date> execute = m_aut.execute(cap, new Date());
if (r != null) {
r.add(execute);
- } else {
- System.out.println(execute.getPayload());
}
+ System.out.println("CAP executed: " + execute.getPayload()); //$NON-NLS-1$
}
/**

Back to the top