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
-allto test all pods installed
fan xfant xmlfan xfant xml::PullTestfan xfant xml::PullTest.testPi
In order to create a Fantom project with 'xfant' follow the next steps.
- Install the
xfantpod. - Create a
Freestyle projectin Jenkins. - Add a
buildstepexecute shellwith this code:
export FAN_ENV=util::PathEnv
export FAN_ENV_PATH=$WORKSPACE
fan build.fanto compile the pod.
- Add another
buildstepexecute shellwith this code:
export FAN_ENV=util::PathEnv
export FAN_ENV_PATH=$WORKSPACE
fan xfant your_pod_name > your_pod_name.xmlto execute the tests and write the report in a file.
- Add a
Post-buildaction namedPublish JUnit test result report. Intest report XMLsuse*.xml
- Capture the standard output and standard error during the tests.
- Each testsuite has an attribute called 'id' with the number of testsuite.