Skip to content

Commit

Permalink
remove junit test target
Browse files Browse the repository at this point in the history
  • Loading branch information
jclausen committed Sep 26, 2016
1 parent faaaf4c commit 7f23306
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 85 deletions.
75 changes: 0 additions & 75 deletions tests/test.xml
Expand Up @@ -4,15 +4,11 @@ This ANT build can be used to execute your tests with automation using our inclu
You can executes directories, bundles and so much more. It can also produce JUnit reports using the
ANT junitreport tag. This is meant to be a template for you to spice up.
There are two targets you can use: run and run-junit
Execute the default 'run' target
ant -f test.xml
OR
ant -f test.xml run
Execute the 'run-junit' target
ant -f test.xml run-junit
PLEASE NOTE THAT YOU MUST ALTER THE RUNNER'S URL ACCORDING TO YOUR ENVIRONMENT.
-->
Expand Down Expand Up @@ -140,75 +136,4 @@ PLEASE NOTE THAT YOU MUST ALTER THE RUNNER'S URL ACCORDING TO YOUR ENVIRONMENT.
<fail if="test.failed"/>
</target>

<target name="run-junit" depends="init" description="Run our tests and produce ANT JUnit reports">

<!-- Directory Runner
Executes recursively all tests in the passed directory and stores the results in the
'dest' param. So if you want to rename the file, do so here.
Available params for directory runner:
- Reporter = ANTJunit fixed
- Directory
- Recurse
- Labels
- ReportPath : The path where reports will be stored, by default it is the ${report.dir} directory.
-->
<get dest="${report.dir}/results.xml"
src="${url.runner}&amp;directory=${test.directory}&amp;recurse=${test.recurse}&amp;reporter=ANTJunit&amp;labels=${test.labels}&amp;reportPath=${report.dir}&amp;propertiesSummary=true&amp;directoryExcludes=${test.directoryExcludes}&amp;cfid=123&amp;cftoken=123"
verbose="true"/>

<!-- Bundles Runner
You can also run tests for specific bundles by using the runner with the bundles params
Available params for runner:
- Reporter
- Bundles
- Labels
<get dest="${report.dir}/results.html"
src="${url.runner}&amp;bundles=${test.bundles}&amp;reporter=${test.reporter}&amp;labels=${test.labels}&amp;propertiesSummary=true"
verbose="true"/>
-->

<!-- Check if file was created -->
<if>
<available file="${report.dir}/TEST.properties" />
<then>
</then>
<else>
<fail message="Build failed as ${report.dir}/TEST.properties was not found!" />
</else>
</if>

<!-- Create fancy junit reports -->
<junitreport todir="${junitreport.dir}">
<fileset dir="${report.dir}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${junitreport.dir}">
<param name="TITLE" expression="My Awesome TestBox Results"/>
</report>
</junitreport>

<!-- Create fancy junit reports -->
<junitreport todir="${junitreport.dir}">
<fileset dir="${report.dir}">
<include name="TEST-*.xml"/>
</fileset>
<report format="noframes" todir="${junitreport.dir}">
<param name="TITLE" expression="My Awesome TestBox Results"/>
</report>
</junitreport>
<!-- Rename report -->
<move file="${junitreport.dir}/junit-noframes.html" tofile="${junitreport.dir}/index.html" />
<!-- Read Result Properties -->
<property file="${report.dir}/TEST.properties"/>
<!-- Echo them out -->
<echoproperties regex="^(test|total).*"/>
<!-- update permissions again -->
<antcall target="update.permissions" />
<!-- Fail build if they failed -->
<fail if="test.failed"/>
</target>

</project>
11 changes: 1 addition & 10 deletions workbench/build.xml
Expand Up @@ -141,16 +141,7 @@
<!-- Run Tests For Platform -->
<target name="run-tests" description="Run TestBox Tests" depends="init">
<echo>Running Tests for ${project.name}</echo>
<!-- Determine Test target: Are we jenkins or local or travis -->
<if>
<not><equals arg1="${environment}" arg2="auto" /></not>
<then>
<property name="test.target" value="run" />
</then>
<else>
<property name="test.target" value="run-junit" />
</else>
</if>
<property name="test.target" value="run" />
<!-- Run for Core -->
<subant target="${test.target}">
<fileset dir="tests" includes="test.xml"/>
Expand Down

0 comments on commit 7f23306

Please sign in to comment.