diff options
author | Juergen Haug | 2015-09-06 19:23:08 +0000 |
---|---|---|
committer | Juergen Haug | 2015-09-06 19:23:08 +0000 |
commit | 674f49dd4ee544d32e7ffb11fd8e905431be96b8 (patch) | |
tree | c649b80f2744937e799e4cf96805f9737305eff5 /tests | |
parent | 3141ffd46d63ce27cb4afd1f7caee2b4e35e1a41 (diff) | |
download | org.eclipse.etrice-674f49dd4ee544d32e7ffb11fd8e905431be96b8.tar.gz org.eclipse.etrice-674f49dd4ee544d32e7ffb11fd8e905431be96b8.tar.xz org.eclipse.etrice-674f49dd4ee544d32e7ffb11fd8e905431be96b8.zip |
[ui] improved ui.rcptests
Change-Id: I55f879b3b053a3729ef4b093af0fe9c8b44b1544
Diffstat (limited to 'tests')
10 files changed, 160 insertions, 83 deletions
diff --git a/tests/org.eclipse.etrice.ui.rcptests/build.xml b/tests/org.eclipse.etrice.ui.rcptests/build.xml index ba392678e..8c29236f5 100644 --- a/tests/org.eclipse.etrice.ui.rcptests/build.xml +++ b/tests/org.eclipse.etrice.ui.rcptests/build.xml @@ -1,13 +1,34 @@ -<project name="org.eclipse.etrice.ui.rcptests" basedir="." default="test"> - <!-- May use external testContainer containing: AUT, runner + their workspaces --> - <property name="testContainer.path" location="C:/Users/Juergen/workspaces/rcpTests-headless" /> +<!-- + Copyright (c) 2015 protos software gmbh (http://www.protos.de). + 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: + Juergen Haug (initial contribution) + + Local UI unit/release tests based on Eclipse RCPTT +--> - <property name="aut.path" location="${testContainer.path}/aut/eclipse" /> - <property name="aut.workspace" location="${testContainer.path}/aut-workspace-" /> - <property name="runner.path" location="${testContainer.path}/runner/eclipse" /> - <property name="runner.workspace" location="${testContainer.path}/runner-workspace" /> +<project name="org.eclipse.etrice.ui.rcptests" basedir="." default="run_unitTests_local"> + + <!--Prerequisite: download rcptt runner 2.0.0 https://www.eclipse.org/rcptt/download/ --> + <property name="rcpttRunner.path" location="C:\Users\Juergen\Eclipse\rcpttRunner" /> + + <!--Prerequisite: test container == "workspace" for test execution --> + <property name="testContainer.path" location="C:\Users\Juergen\workspaces\rcpTests-headless" /> + + <!-- AUT == application under Test == eclipse installation without eTrice --> + <property name="autLocal.path" location="${eclipse.home}" /> + <property name="autRelease.path" location="C:\Users\Juergen\Eclipse\eTrice" /> + + <!-- local exported eTrice feature: use org.eclipse.etrice.feature/build_local.xml--> + <property name="eTriceExport.path" location="../../features/org.eclipse.etrice.feature/export" /> <!-- private properties--> + <property name="aut.workspace" location="${testContainer.path}/aut-workspace-" /> + <property name="runner.workspace" location="${testContainer.path}/runner-workspace" /> <property name="output" value="./output" /> <!-- show ALL used variables --> @@ -16,10 +37,9 @@ <echo> test.results = ${test.results} </echo> <echo> output = ${output} </echo> <echo> basedir = ${basedir} </echo> - <echo> aut.path = ${aut.path} </echo> - <echo> aut.workspace = ${aut.workspace} </echo> - <echo> runner.path = ${runner.path} </echo> - <echo> runner.workspace = ${runner.workspace} </echo> + <echo> autBasis.path = ${autBasis.path} </echo> + <echo> rcpttRunner.path = ${rcpttRunner.path} </echo> + <echo> testContainer.path = ${testContainer.path} </echo> </target> <target name="set_local_tr" unless="test.results"> @@ -31,50 +51,81 @@ <target name="init" depends="setVars"> <delete dir="${output}" quiet="true" /> <delete dir="${test.results}" quiet="true" /> + <mkdir dir="${output}" /> <mkdir dir="${test.results}" /> + <mkdir dir="${testContainer.path}" /> </target> + <!-- + Release tests of nightly: performing installation from nightly update site + unit tests + Use appropriate eclipse installation + --> + <target name="run_releaseTestsNightly" depends="init"> + <echo>AUT should match END-USER eclipse installation</echo> + <delete dir="${testContainer.path}" quiet="true" /> + <mkdir dir="${testContainer.path}" /> + <runTest autPath="${autRelease.path}"> + <arg value="-suites" /> + <arg value="ReleaseTests_nightly" /> + </runTest> + </target> - <target name="test" depends="init"> - <java jar="${runner.path}/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar" output="${output}/runner.txt" fork="true"> - <arg value="-application" /> - <arg value="org.eclipse.rcptt.runner.headless" /> + <!-- + Prerequisite: + 1. exported eTrice feature: executed org.eclipse.etrice.feature/build_local.xml + 2. AUT == eclipse installation containing eTrice dependencies + --> + <target name="run_unitTests_local" depends="init"> + <echo>expecting exported eTrice feature</echo> + <echo>expecting AUT with all eTrice dependencies</echo> + <runTest autPath="${autLocal.path}"> + <arg value="-suites" /> + <arg value="UnitTests" /> + <arg value="-injection:dir" /> + <arg value="${eTriceExport.path}" /> + </runTest> + </target> - <arg value="-data" /> - <arg value="${runner.workspace}" /> + <macrodef name="runTest"> + <attribute name="autPath" /> + <element name="argElements" implicit="yes" /> + <sequential> + <echo>starting runner</echo> + <!-- https://www.eclipse.org/rcptt/documentation/userguide/runner/arguments/ --> + <java jar="${rcpttRunner.path}/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar" output="${output}/runner.txt" failonerror="true" fork="true"> + <arg value="-application" /> + <arg value="org.eclipse.rcptt.runner.headless" /> - <arg value="-aut" /> - <arg value="${aut.path}" /> + <arg value="-data" /> + <arg value="${runner.workspace}" /> - <arg value="-autWsPrefix" /> - <arg value="${aut.workspace}" /> + <arg value="-aut" /> + <arg value="@{autPath}" /> - <arg value="-autConsolePrefix" /> - <arg value="${output}/aut-out-" /> + <arg value="-autWsPrefix" /> + <arg value="${aut.workspace}" /> - <arg value="-autVMArgs" /> - <arg value="-Xmx1024m;-XX:MaxPermSize=512m" /> + <arg value="-autConsolePrefix" /> + <arg value="${output}/aut-out-" /> - <!-- - <arg value="-htmlReport" /> - <arg value="${html-report}" /> ---> - <arg value="-junitReport" /> - <arg value="${test.results}/ui.rcpTests.xml" /> + <arg value="-autVMArgs" /> + <arg value="-Xms40m;-Xmx512m;-XX:MaxPermSize=256m;-ea" /><!--<arg value="-Xmx1024m;-XX:MaxPermSize=512m" />--> - <arg value="-import" /> - <arg value="${basedir}" /> + <arg value="-htmlReport" /> + <arg value="${test.results}/uiTests.html" /> - <arg value="-testOptions" /> - <arg value="testExecTimeout=300;execTimeout=3600" /> + <arg value="-junitReport" /> + <arg value="${test.results}/uiTests.xml" /> - <arg value="-suites" /> - <arg value="AllTests" /><!-- <arg value="AllTests_Release" /> --> - <!-- - <arg value="-injection:site" /> - <arg value="file:/C:/Users/Juergen/Desktop/update_site;eTrice" /> - --> - </java> - </target> + <arg value="-import" /> + <arg value="${basedir}" /> + + <arg value="-testOptions" /> + <arg value="testExecTimeout=300;execTimeout=3600" /> + + <argElements /> + </java> + </sequential> + </macrodef> </project> diff --git a/tests/org.eclipse.etrice.ui.rcptests/doc/setup.txt b/tests/org.eclipse.etrice.ui.rcptests/doc/setup.txt new file mode 100644 index 000000000..4e0c0f6ec --- /dev/null +++ b/tests/org.eclipse.etrice.ui.rcptests/doc/setup.txt @@ -0,0 +1,7 @@ +1. download rcptt ide 2.0.0 from [1] +2. import this project +3. you can use your current eclipse as aut +4. rcptt getting started [2] + +[1] https://www.eclipse.org/rcptt/download/ +[2] https://www.eclipse.org/rcptt/documentation/userguide/getstarted/
\ No newline at end of file diff --git a/tests/org.eclipse.etrice.ui.rcptests/rcptt.properties b/tests/org.eclipse.etrice.ui.rcptests/rcptt.properties index 9f6175d3f..38ba80e3f 100644 --- a/tests/org.eclipse.etrice.ui.rcptests/rcptt.properties +++ b/tests/org.eclipse.etrice.ui.rcptests/rcptt.properties @@ -1,9 +1,10 @@ ---- RCPTT testcase --- +--- RCPTT project settings --- Format-Version: 1.0 +Contexts: _ooFVgFR1EeWL_82lLx1QoA Element-Name: Project Settings Element-Type: projectMetadata Element-Version: 2.0 Id: _66q7UFFwEeWwuNzjicD2TQ Runtime-Version: 2.0.0.201506120617 -Save-Time: 9/2/15 2:48 PM +Save-Time: 9/6/15 11:07 AM diff --git a/tests/org.eclipse.etrice.ui.rcptests/tests/AllTests_Release.suite b/tests/org.eclipse.etrice.ui.rcptests/tests/ReleaseTests_nightly.suite index c83c06c12..9f81bb1e2 100644 --- a/tests/org.eclipse.etrice.ui.rcptests/tests/AllTests_Release.suite +++ b/tests/org.eclipse.etrice.ui.rcptests/tests/ReleaseTests_nightly.suite @@ -1,17 +1,17 @@ --- RCPTT testcase --- Format-Version: 1.0 -Element-Name: AllTests_Release +Element-Name: ReleaseTests_nightly Element-Type: testsuite Element-Version: 2.0 Id: _in-_MFJPEeW6mYfJrKLXVg Runtime-Version: 2.0.0.201506120617 -Save-Time: 9/3/15 5:22 PM +Save-Time: 9/6/15 10:58 AM ------=_testcase-items-62c497da-4241-31f4-811a-6b453a3ecff8 Content-Type: text/testcase Entry-Name: testcase-items -_BOu6YFFxEeWwuNzjicD2TQ // kind: 'suite' name: 'DocuTestSuite' path: 'docTests/DocuTestSuite.suite' -_7i9L0FJLEeW6mYfJrKLXVg // kind: 'test' name: 'InstallNewSoftwareETrice' path: 'release/InstallNewSoftwareETrice.test' +_BOu6YFFxEeWwuNzjicD2TQ // +_7i9L0FJLEeW6mYfJrKLXVg // ------=_testcase-items-62c497da-4241-31f4-811a-6b453a3ecff8-- diff --git a/tests/org.eclipse.etrice.ui.rcptests/tests/AllTests.suite b/tests/org.eclipse.etrice.ui.rcptests/tests/UnitTests.suite index 8d147c79f..a4ff4ce27 100644 --- a/tests/org.eclipse.etrice.ui.rcptests/tests/AllTests.suite +++ b/tests/org.eclipse.etrice.ui.rcptests/tests/UnitTests.suite @@ -1,16 +1,16 @@ --- RCPTT testcase --- Format-Version: 1.0 -Element-Name: AllTests +Element-Name: UnitTests Element-Type: testsuite Element-Version: 2.0 Id: _x63CsFGnEeWk3rbvuPRQHg Runtime-Version: 2.0.0.201506120617 -Save-Time: 9/2/15 9:22 PM +Save-Time: 9/6/15 10:58 AM ------=_testcase-items-62c497da-4241-31f4-811a-6b453a3ecff8 Content-Type: text/testcase Entry-Name: testcase-items -_BOu6YFFxEeWwuNzjicD2TQ // kind: 'suite' name: 'DocuTestSuite' path: 'docu/DocuTestSuite.suite' +_BOu6YFFxEeWwuNzjicD2TQ // ------=_testcase-items-62c497da-4241-31f4-811a-6b453a3ecff8-- diff --git a/tests/org.eclipse.etrice.ui.rcptests/tests/common/EnvironmentScript.ctx b/tests/org.eclipse.etrice.ui.rcptests/tests/common/EnvironmentScript.ctx new file mode 100644 index 000000000..164f1c515 --- /dev/null +++ b/tests/org.eclipse.etrice.ui.rcptests/tests/common/EnvironmentScript.ctx @@ -0,0 +1,20 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Context-Type: org.eclipse.rcptt.ctx.ecl +Element-Name: EnvironmentScript +Element-Type: context +Element-Version: 2.0 +Id: _ooFVgFR1EeWL_82lLx1QoA +Runtime-Version: 2.0.0.201506120617 +Save-Time: 9/6/15 1:19 PM + +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998 +Content-Type: text/ecl +Entry-Name: .ecl.context + +global [if [substitute-variables "${system_property:os.name}" | str | invoke contains Linux] { + val targetOS Linux +} -else { + val targetOS Windows +}] +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998-- diff --git a/tests/org.eclipse.etrice.ui.rcptests/tests/common/Targets.ctx b/tests/org.eclipse.etrice.ui.rcptests/tests/common/Targets.ctx deleted file mode 100644 index d7e152db1..000000000 --- a/tests/org.eclipse.etrice.ui.rcptests/tests/common/Targets.ctx +++ /dev/null @@ -1,22 +0,0 @@ ---- RCPTT testcase --- -Format-Version: 1.0 -Context-Type: org.eclipse.rcptt.ctx.super -Element-Name: Targets -Element-Type: context -Element-Version: 2.0 -Id: _0hYOcFGmEeWk3rbvuPRQHg -Runtime-Version: 2.0.0.201506120617 -Save-Time: 9/2/15 9:14 PM - -------=_.q7.content-3d2e0690-ce48-3609-83e0-c704d49f1eaf -Content-Type: q7/binary -Entry-Name: .q7.content - -UEsDBBQACAgIAAAAIQAAAAAAAAAAAAAAAAAIAAAALmNvbnRlbnSNkV1LwzAUhu8F/0M49yazejFKu10M -W0VEnQPn1ejSszbafJika/XXmykdyBjs9uR5n/ORZNrLhmzROqFVCpd0BAQV16VQVQqt31yMYTo5P0u0 -rSjyRhiH1HLjPXUcVWGFjl9ag3amlcfek16KeK+LdrrQQLk41FOovTcxY13XUS0rGpxs+XA3IMdb7JPD -8y75izCpS2zYAIa8tghEFRJTWBS2Qu+AiDKF1ah+e+RZLm/w9ePKrrft0/z5tgLCa9GUiy8TAocTcN9T -U9ig82EpCJcgJOF/u85xgzYcC91k9R6139dZvvwvT9gheswQ3Y8/uywvTjEk7MTvCOwPUEsHCEJhYA79 -AAAA4gEAAFBLAQIUABQACAgIAAAAIQBCYWAO/QAAAOIBAAAIAAAAAAAAAAAAAAAAAAAAAAAuY29udGVu -dFBLBQYAAAAAAQABADYAAAAzAQAAAAA= -------=_.q7.content-3d2e0690-ce48-3609-83e0-c704d49f1eaf-- diff --git a/tests/org.eclipse.etrice.ui.rcptests/tests/common/Target_C.ctx b/tests/org.eclipse.etrice.ui.rcptests/tests/docTests/tutorials/TutorialTarget_C.ctx index 7fb8ce5ea..d26bf9e90 100644 --- a/tests/org.eclipse.etrice.ui.rcptests/tests/common/Target_C.ctx +++ b/tests/org.eclipse.etrice.ui.rcptests/tests/docTests/tutorials/TutorialTarget_C.ctx @@ -1,26 +1,25 @@ --- RCPTT testcase --- Format-Version: 1.0 Context-Type: org.eclipse.rcptt.ctx.parameters -Element-Name: Target_C +Element-Name: TutorialTarget_C Element-Type: context Element-Version: 2.0 Id: _j2uz4FGXEeWk3rbvuPRQHg Runtime-Version: 2.0.0.201506120617 -Save-Time: 9/2/15 8:43 PM +Save-Time: 9/6/15 1:24 PM ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa Content-Type: text/plain Entry-Name: .description -targetOS = 'Windows' or 'Linux' +targetOS: see EnvironmentScript ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa-- ------=_.parameters.context-2e023de5-3294-36a9-ac1d-6701f05a40ee Content-Type: text/properties Entry-Name: .parameters.context -#Wed Sep 02 20:43:26 CEST 2015 +#Sun Sep 06 13:24:21 CEST 2015 projectName=org.eclipse.etrice.template.c targetLanguage=C -targetOS=Windows ------=_.parameters.context-2e023de5-3294-36a9-ac1d-6701f05a40ee-- diff --git a/tests/org.eclipse.etrice.ui.rcptests/tests/common/Target_Java.ctx b/tests/org.eclipse.etrice.ui.rcptests/tests/docTests/tutorials/TutorialTarget_Java.ctx index d541c778d..5105aa1f4 100644 --- a/tests/org.eclipse.etrice.ui.rcptests/tests/common/Target_Java.ctx +++ b/tests/org.eclipse.etrice.ui.rcptests/tests/docTests/tutorials/TutorialTarget_Java.ctx @@ -1,20 +1,19 @@ --- RCPTT testcase --- Format-Version: 1.0 Context-Type: org.eclipse.rcptt.ctx.parameters -Element-Name: Target_Java +Element-Name: TutorialTarget_Java Element-Type: context Element-Version: 2.0 Id: _2K8qwFGaEeWk3rbvuPRQHg Runtime-Version: 2.0.0.201506120617 -Save-Time: 9/2/15 9:07 PM +Save-Time: 9/6/15 1:24 PM ------=_.parameters.context-2e023de5-3294-36a9-ac1d-6701f05a40ee Content-Type: text/properties Entry-Name: .parameters.context -#Wed Sep 02 21:07:39 CEST 2015 +#Sun Sep 06 13:24:16 CEST 2015 projectName=TemplateModel targetLanguage=Java -targetOS= ------=_.parameters.context-2e023de5-3294-36a9-ac1d-6701f05a40ee-- diff --git a/tests/org.eclipse.etrice.ui.rcptests/tests/docTests/tutorials/TutorialTargets.ctx b/tests/org.eclipse.etrice.ui.rcptests/tests/docTests/tutorials/TutorialTargets.ctx new file mode 100644 index 000000000..c5c152e6d --- /dev/null +++ b/tests/org.eclipse.etrice.ui.rcptests/tests/docTests/tutorials/TutorialTargets.ctx @@ -0,0 +1,22 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Context-Type: org.eclipse.rcptt.ctx.super +Element-Name: TutorialTargets +Element-Type: context +Element-Version: 2.0 +Id: _0hYOcFGmEeWk3rbvuPRQHg +Runtime-Version: 2.0.0.201506120617 +Save-Time: 9/6/15 1:25 PM + +------=_.q7.content-3d2e0690-ce48-3609-83e0-c704d49f1eaf +Content-Type: q7/binary +Entry-Name: .q7.content + +UEsDBBQACAgIAAAAIQAAAAAAAAAAAAAAAAAIAAAALmNvbnRlbnSNkV1LwzAUhu8F/0PIvcmsXozSbBdi +q4ios+C8GjE9a6PNh0m6Vn+9mdKBjMFuT573OR/J5oNq0Qacl0YzfE4mGIEWppK6ZrgL67Mpns9OTzLj +agKildYDccKGQLwAzZ006XNnwV0ZHWAIaFAy3emSrS420D6NdYabEGxKad/3xKiaRCdd3t+OyOEWu+T4 +vE3+IlSZClo6gjFvHGCkuQKGyy4YJ3lbcldD8BjJiuHVpHl9EHmhruHl48K9bbrHxdNNjZFoZFuVXzYG +9ycRYSCWu6gNcTkcL4JQJv52XsAaXDwa+NnqPem+L/Ni+V+e0X30kCG5m372ecGPMWT0yG+J7A9QSwcI +aNW+MQIBAADqAQAAUEsBAhQAFAAICAgAAAAhAGjVvjECAQAA6gEAAAgAAAAAAAAAAAAAAAAAAAAAAC5j +b250ZW50UEsFBgAAAAABAAEANgAAADgBAAAAAA== +------=_.q7.content-3d2e0690-ce48-3609-83e0-c704d49f1eaf-- |