Xfant is a fant
like tool that exports the test results in XML format.
- Outputs xml is compatible with JUnit's XML.
- Can be used with Jenkins to show test reports.
fanr install -r http://eggbox.fantomfactory.org/fanr/ xfant
fan xfant target
Where target can be:
- A pod name,
- A type qualified name,
- A method qualified name or
-all
to test all pods installed
fan xfant xml
fan xfant xml::PullTest
fan xfant xml::PullTest.testPi
In order to create a Fantom project with 'xfant' follow the next steps.
- Install the
xfant
pod. - Create a
Freestyle project
in Jenkins. - Add a
build
stepexecute shell
with this code:
export FAN_ENV=util::PathEnv
export FAN_ENV_PATH=$WORKSPACE
fan build.fan
to compile the pod.
- Add another
build
stepexecute shell
with this code:
export FAN_ENV=util::PathEnv
export FAN_ENV_PATH=$WORKSPACE
fan xfant your_pod_name > your_pod_name.xml
to execute the tests and write the report in a file.
- Add a
Post-build
action namedPublish JUnit test result report
. Intest report XMLs
use*.xml
- Capture the standard output and standard error during the tests.
- Each testsuite has an attribute called 'id' with the number of testsuite.