ru.yandex.qatools.allure.data.plugins.MigrationPlugin.groovy Maven / Gradle / Ivy
package ru.yandex.qatools.allure.data.plugins
import ru.yandex.qatools.allure.model.Status
import ru.yandex.qatools.allure.model.TestCaseResult
import static ru.yandex.qatools.allure.config.AllureModelUtils.createSeverityLabel
/**
* eroshenkoam
* 25/02/15
*/
class MigrationPlugin implements PreparePlugin {
@Override
void prepare(TestCaseResult data) {
migrateSeverityFieldToLabel(data)
migrateSkippedStatusToCanceled(data)
}
@Override
Class getType() {
TestCaseResult
}
static void migrateSkippedStatusToCanceled(TestCaseResult data) {
if (data.status.equals(Status.SKIPPED)) {
data.status = Status.CANCELED;
}
}
static void migrateSeverityFieldToLabel(TestCaseResult data) {
if (data.severity) {
data.labels.add(createSeverityLabel(data.severity))
data.severity = null
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy