Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2015-07-07 07:56:38 +0000
committerMarkus Tiede2015-07-07 07:56:38 +0000
commitb2e6d8c32ec554b8bd52ef8f45621f6251c2b692 (patch)
tree1ecbba835d09c4b79e30b69e06510f353e6d36cc /org.eclipse.jubula.documentation/developerManual
parent125f07dd7917b07597326997569052a2915a7989 (diff)
downloadorg.eclipse.jubula.core-b2e6d8c32ec554b8bd52ef8f45621f6251c2b692.tar.gz
org.eclipse.jubula.core-b2e6d8c32ec554b8bd52ef8f45621f6251c2b692.tar.xz
org.eclipse.jubula.core-b2e6d8c32ec554b8bd52ef8f45621f6251c2b692.zip
Sprint task - documentation for: Provide deployable and testable widget extension for JavaFXv8.1.6.022
Diffstat (limited to 'org.eclipse.jubula.documentation/developerManual')
-rw-r--r--org.eclipse.jubula.documentation/developerManual/en/docbook/clientAPI/chapter.xml2
-rw-r--r--org.eclipse.jubula.documentation/developerManual/en/docbook/toolkitExtension/sectionAPIExtension.xml90
-rw-r--r--org.eclipse.jubula.documentation/developerManual/en/docbook/toolkitExtension/sectionExtensionExamples.xml85
-rw-r--r--org.eclipse.jubula.documentation/developerManual/en/docbook/toolkitExtension/toolkitExtension.xml9
4 files changed, 122 insertions, 64 deletions
diff --git a/org.eclipse.jubula.documentation/developerManual/en/docbook/clientAPI/chapter.xml b/org.eclipse.jubula.documentation/developerManual/en/docbook/clientAPI/chapter.xml
index aaecc5de7..a6c7be0ee 100644
--- a/org.eclipse.jubula.documentation/developerManual/en/docbook/clientAPI/chapter.xml
+++ b/org.eclipse.jubula.documentation/developerManual/en/docbook/clientAPI/chapter.xml
@@ -9,7 +9,7 @@
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xl="http://www.w3.org/1999/xlink" xml:id="clientAPI" version="5.0">
<?dbhtml dir="clientAPI"?>
- <title>Writing UI tests via API</title>
+ <title>Writing UI tests via client API</title>
<section>
<title>The general idea</title>
<figure xml:id="api-idea">
diff --git a/org.eclipse.jubula.documentation/developerManual/en/docbook/toolkitExtension/sectionAPIExtension.xml b/org.eclipse.jubula.documentation/developerManual/en/docbook/toolkitExtension/sectionAPIExtension.xml
new file mode 100644
index 000000000..b827e531e
--- /dev/null
+++ b/org.eclipse.jubula.documentation/developerManual/en/docbook/toolkitExtension/sectionAPIExtension.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2015 BREDEX GmbH. 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 -->
+<section xml:id="apiExtension" xmlns="http://docbook.org/ns/docbook"
+ xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xl="http://www.w3.org/1999/xlink">
+ <title>Addressing custom controls via the client API</title>
+ <para>
+ In order to execute CAPs on custom controls / custom CAPs via
+ the client API you have to perform two additional steps.
+ </para>
+ <para>
+ At first you have to register the responsible tester class for
+ the fully qualified new components class name by using:
+ </para>
+ <programlisting>
+<![CDATA[
+public interface org.eclipse.jubula.toolkit.ToolkitInfo {
+ /**
+ * Allows adding of a tester class for a component class into a toolkit
+ * @param componentClassName fully qualified name of the component class
+ * @param testerClassName fully qualified name of the tester class
+ * @return previously registered tester class for the component class
+ * or <code>null</code> if there was none
+ */
+ @Nullable public String registerTesterClass(
+ @NonNull String componentClassName,
+ @NonNull String testerClassName);
+
+...
+]]>
+ </programlisting>
+ <para>
+ This extended ToolkitInformation is then used for retrieving
+ the AUT from the AUT-Agent:
+ </para>
+ <programlisting>
+<![CDATA[
+public interface org.eclipse.jubula.client.AUTAgent extends Remote {
+...
+
+ /**
+ * @param autID
+ * the autID to get an AUT for
+ * @param information
+ * the information about the toolkit
+ * @return an AUT - note: currently the underlying implementation only
+ * supports <b>ONE</b> connection at a time to a remotely running AUT;
+ * multiple connections may only be established sequentially!
+ * @throws CommunicationException
+ * in case of communication problems with the remote side
+ */
+ AUT getAUT(AUTIdentifier autID, ToolkitInfo information)
+ throws CommunicationException;
+
+...
+]]>
+ </programlisting>
+ <para>
+ And then you can use the CapBuilder to create
+ custom CAP-instances:
+ </para>
+ <programlisting>
+<![CDATA[
+public class org.eclipse.jubula.toolkit.CapBuilder {
+...
+ public CapBuilder addParameter(@NonNull String value) {...}
+ public CapBuilder addParameter(@NonNull Integer value) {...}
+ public CapBuilder addParameter(@NonNull Boolean value) {...}
+
+ public CapBuilder setComponentIdentifier(@Nullable ComponentIdentifier ci) {...}
+
+ public CAP build() {}
+...
+}
+]]>
+ </programlisting>
+ <para>
+ These custom CAP instances can then be executed as usual
+ within an AUT context.
+ </para>
+ <para role="warning">
+ The built method signature (by subsequently calling
+ addParameter(...)) has to match the one that's
+ called remotely on
+ the given tester class with the given
+ rcMethodName.
+ </para>
+</section> \ No newline at end of file
diff --git a/org.eclipse.jubula.documentation/developerManual/en/docbook/toolkitExtension/sectionExtensionExamples.xml b/org.eclipse.jubula.documentation/developerManual/en/docbook/toolkitExtension/sectionExtensionExamples.xml
index aef2de60e..e40e17a60 100644
--- a/org.eclipse.jubula.documentation/developerManual/en/docbook/toolkitExtension/sectionExtensionExamples.xml
+++ b/org.eclipse.jubula.documentation/developerManual/en/docbook/toolkitExtension/sectionExtensionExamples.xml
@@ -9,70 +9,35 @@
<section xml:id="extensionExamples" xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xl="http://www.w3.org/1999/xlink">
- <title>ITE and remote control extension examples</title>
+ <title>ITE, client API and remote control extension examples</title>
<para>
- In the installation, there are source code examples for extending supported toolkits.
- The examples can be found in the directory
- <emphasis role="input">examples/development/extension</emphasis>,
- which contains the following sub-folders:
+ Each installation contains source code examples for extending the supported toolkits.
+ The examples can be found as source- and binary-features in the local p2-repository
+ <emphasis role="input">development/org.eclipse.jubula.repo.zip</emphasis>,
+ and are out-of-the-box ready to be installed into the ITE.
</para>
- <variablelist>
- <varlistentry>
- <term>
- src
- </term>
- <listitem>
- <para>
- Contains some zip-files with example source code projects,
- which can be imported by Eclipse:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="input">RCPExtension.zip</emphasis><?linebreak?>
- An extension supporting <emphasis role="input">Group</emphasis> for SWT including client
- and remote control projects. After deploying these projects you should be able to test the
- <emphasis role="input">Group</emphasis> in RCP applications.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="input">SwingAUT.zip</emphasis><?linebreak?>
- An AUT using <emphasis role="input">JSlider</emphasis> from Swing.
- </para>
- </listitem>
+ <para>
+ <itemizedlist>
<listitem>
- <para>
- <emphasis role="input">SwingExtension.zip</emphasis><?linebreak?>
- The extension supporting <emphasis role="input">JSlider</emphasis> for Swing including client
- and remote control projects. After deploying these projects you should be able to test the
- <emphasis role="input">JSlider</emphasis> in the Swing example AUT.
- </para>
+ <para>Jubula Example - Toolkit Extension - JavaFX: PieChart</para>
</listitem>
<listitem>
- <para>
- <emphasis role="input">SwingRendererExtension.zip</emphasis><?linebreak?>
- A remote control extension supporting a custom graphics component for
- Swing.
- </para>
+ <para>Jubula Example - Toolkit Extension - Swing: JSlider</para>
</listitem>
- </itemizedlist>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- AUT
- </term>
- <listitem>
- <para>
- Contains the binary file <emphasis role="input">JSlider.jar</emphasis>, which
- is a simple example AUT using the normally unsupported
- component <emphasis role="input">JSlider</emphasis>. After installing the
- <emphasis role="input">JSlider</emphasis> example extension from the
- <emphasis role="strong">src</emphasis> folder, you will be
- able to test this new component.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
+ </itemizedlist>
+ </para>
+ <para>
+ Each toolkit extension consists of four individual modules:
+ </para>
+ <programlisting>
+<![CDATA[
+org.eclipse.jubula.examples.extension.<toolkitName>.api : holds the custom client API information
+org.eclipse.jubula.examples.extension.<toolkitName>.api.test : holds an example JUnit based client API test for the AUT
+org.eclipse.jubula.examples.extension.<toolkitName>.rc : holds the remote control implementation
+org.eclipse.jubula.examples.extension.<toolkitName>.toolkit : holds the declarative toolkit description for the ITE
+]]>
+ </programlisting>
+ <para>
+ The individual AUTs showing the capability of these extensions are located in "examples/development/extension/AUT".
+ </para>
</section> \ No newline at end of file
diff --git a/org.eclipse.jubula.documentation/developerManual/en/docbook/toolkitExtension/toolkitExtension.xml b/org.eclipse.jubula.documentation/developerManual/en/docbook/toolkitExtension/toolkitExtension.xml
index dccf83b3d..3dfc950c1 100644
--- a/org.eclipse.jubula.documentation/developerManual/en/docbook/toolkitExtension/toolkitExtension.xml
+++ b/org.eclipse.jubula.documentation/developerManual/en/docbook/toolkitExtension/toolkitExtension.xml
@@ -37,11 +37,13 @@
actions. This chapter begins by listing the requirements followed by
showing the necessary steps for creating an ITE and remote control
extension. The ITE toolkit extension is described in <xref linkend="iteExtension"/>
- and the implementation for the remote control extension in <xref linkend="remoteControlExtension"/>.
+ and the implementation for the remote control extension in <xref linkend="remoteControlExtension"/>.
+ Additionally the <xref linkend="apiExtension"/> describes the usage of custom CAPs within
+ the context of the client API.
</para>
<para>
- Extension examples with source code can be found in the subdirectory
- <emphasis role="input">examples/development/extension/src/</emphasis>
+ Extension examples with source code can be found in the p2-repository
+ <emphasis role="input">"development/org.eclipse.jubla.repo.zip"</emphasis>
of the installation.
</para>
<para>
@@ -69,6 +71,7 @@
<xi:include href="sectionRequirements.xml"/>
<xi:include href="sectionITEExtension.xml"/>
<xi:include href="sectionRemoteControlExtension.xml"/>
+ <xi:include href="sectionAPIExtension.xml"/>
<xi:include href="sectionExtensionExamples.xml"/>
</chapter> \ No newline at end of file

Back to the top