Author: lfryc(a)redhat.com
Date: 2010-07-30 09:23:25 -0400 (Fri, 30 Jul 2010)
New Revision: 18294
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
Log:
set the currentConfiguration in each state of test (start, sucess, failure, skip) to be
available in test attributes
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-07-30
12:38:54 UTC (rev 18293)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-07-30
13:23:25 UTC (rev 18294)
@@ -93,10 +93,6 @@
}
}
- public void onTestStart(ITestResult result) {
- result.setAttribute("matrix-configuration", currentConfiguration);
- }
-
private boolean isAfterConfiguration(ITestNGMethod m) {
return m.isAfterClassConfiguration() || m.isAfterGroupsConfiguration() ||
m.isAfterMethodConfiguration()
|| m.isAfterSuiteConfiguration() || m.isAfterTestConfiguration();
@@ -414,34 +410,34 @@
throw new UnsupportedOperationException();
}
}
+
+ public void onTestStart(ITestResult result) {
+ setCurrentConfigurationToTestResultAttributes(result);
+ }
public void onTestSuccess(ITestResult result) {
- // TODO Auto-generated method stub
-
+ setCurrentConfigurationToTestResultAttributes(result);
}
public void onTestFailure(ITestResult result) {
- // TODO Auto-generated method stub
-
+ setCurrentConfigurationToTestResultAttributes(result);
}
public void onTestSkipped(ITestResult result) {
- // TODO Auto-generated method stub
-
+ setCurrentConfigurationToTestResultAttributes(result);
}
public void onTestFailedButWithinSuccessPercentage(ITestResult result) {
- // TODO Auto-generated method stub
-
+ setCurrentConfigurationToTestResultAttributes(result);
}
+
+ private void setCurrentConfigurationToTestResultAttributes(ITestResult result) {
+ result.setAttribute("matrix-configuration", currentConfiguration);
+ }
public void onStart(ITestContext context) {
- // TODO Auto-generated method stub
-
}
public void onFinish(ITestContext context) {
- // TODO Auto-generated method stub
-
}
}
Show replies by date