org.apache.felix.ipojo.junit4osgi.plugin
Class XMLReport
java.lang.Object
org.apache.felix.ipojo.junit4osgi.plugin.Report
org.apache.felix.ipojo.junit4osgi.plugin.XMLReport
public class XMLReport
- extends Report
This class generates test result as XML files compatible with Surefire.
- Author:
- Felix Project Team
Method Summary |
void |
generateReport(junit.framework.Test test,
junit.framework.TestResult tr,
File reportsDirectory,
BundleContext bc,
Map configuration)
Generates the XML reports. |
void |
testError(junit.framework.Test test,
Throwable e,
String out,
String err,
String log)
A test throws an unexpected errors. |
void |
testFailed(junit.framework.Test test,
Throwable e,
String out,
String err,
String log)
A test fails. |
void |
testSucceeded(junit.framework.Test test)
A test ends successfully. |
Methods inherited from class org.apache.felix.ipojo.junit4osgi.plugin.Report |
elapsedTimeAsString, getErrorSources, getFailureSources, getNumErrors, getNumFailures, getNumTests, getStackTrace, reset, testError, testFailed, testStarting, testSucceeded |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLReport
public XMLReport()
testSucceeded
public void testSucceeded(junit.framework.Test test)
- A test ends successfully.
- Parameters:
test
- the test executed successfully.
testError
public void testError(junit.framework.Test test,
Throwable e,
String out,
String err,
String log)
- A test throws an unexpected errors.
- Parameters:
test
- the test in errore
- the thrown exceptionout
- the output messages printed during the test executionerr
- the error messages printed during the test executionlog
- the messages logged during the test execution
testFailed
public void testFailed(junit.framework.Test test,
Throwable e,
String out,
String err,
String log)
- A test fails.
- Parameters:
test
- the failing teste
- the thrown failureout
- the output messages printed during the test executionerr
- the error messages printed during the test executionlog
- the messages logged during the test execution
generateReport
public void generateReport(junit.framework.Test test,
junit.framework.TestResult tr,
File reportsDirectory,
BundleContext bc,
Map configuration)
throws Exception
- Generates the XML reports.
- Parameters:
test
- the testtr
- the test resultreportsDirectory
- the directory in which reports are created.bc
- the bundle context (to get installed bundles)configuration
- the Felix configuration
- Throws:
Exception
- when the XML report cannot be generated correctly
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.