ddc9a36ceaaad7b5326e2d027fd996f237832ee2
java/com.sap.sailing.windestimation.test/META-INF/MANIFEST.MF
| ... | ... | @@ -19,3 +19,4 @@ Require-Bundle: junit-jupiter-api;bundle-version="5.11.3", |
| 19 | 19 | net.bytebuddy.byte-buddy-agent;bundle-version="1.14.12", |
| 20 | 20 | org.mockito.mockito-core;bundle-version="4.8.1" |
| 21 | 21 | Automatic-Module-Name: com.sap.sailing.windestimation.test |
| 22 | +Import-Package: com.sap.sse.testutils |
java/com.sap.sailing.windestimation.test/src/com/sap/sailing/windestimation/integration/IncrementalMstHmmWindEstimationForTrackedRaceTest.java
| ... | ... | @@ -4,6 +4,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; |
| 4 | 4 | import static org.junit.jupiter.api.Assertions.assertTrue; |
| 5 | 5 | |
| 6 | 6 | import java.io.File; |
| 7 | +import java.io.IOException; |
|
| 7 | 8 | import java.net.URI; |
| 8 | 9 | import java.net.URL; |
| 9 | 10 | import java.text.SimpleDateFormat; |
| ... | ... | @@ -51,7 +52,6 @@ import com.sap.sailing.windestimation.data.CompetitorTrackWithEstimationData; |
| 51 | 52 | import com.sap.sailing.windestimation.data.RaceWithEstimationData; |
| 52 | 53 | import com.sap.sailing.windestimation.data.WindQuality; |
| 53 | 54 | import com.sap.sailing.windestimation.data.transformer.CompleteManeuverCurveWithEstimationDataToManeuverForEstimationTransformer; |
| 54 | -import com.sap.sailing.windestimation.model.exception.ModelPersistenceException; |
|
| 55 | 55 | import com.sap.sailing.windestimation.model.regressor.twdtransition.DistanceBasedTwdTransitionRegressorModelContext.DistanceValueRange; |
| 56 | 56 | import com.sap.sailing.windestimation.model.regressor.twdtransition.DurationBasedTwdTransitionRegressorModelContext.DurationValueRange; |
| 57 | 57 | import com.sap.sailing.windestimation.model.store.ClassPathReadOnlyModelStoreImpl; |
| ... | ... | @@ -66,6 +66,9 @@ import com.sap.sse.common.Util.Pair; |
| 66 | 66 | import com.sap.sse.common.impl.DegreeBearingImpl; |
| 67 | 67 | import com.sap.sse.common.impl.MillisecondsTimePoint; |
| 68 | 68 | import com.sap.sse.shared.util.Wait; |
| 69 | +import com.sap.sse.testutils.Measurement; |
|
| 70 | +import com.sap.sse.testutils.MeasurementCase; |
|
| 71 | +import com.sap.sse.testutils.MeasurementXMLFile; |
|
| 69 | 72 | |
| 70 | 73 | /** |
| 71 | 74 | * |
| ... | ... | @@ -148,7 +151,7 @@ public class IncrementalMstHmmWindEstimationForTrackedRaceTest extends OnlineTra |
| 148 | 151 | } |
| 149 | 152 | |
| 150 | 153 | @Test |
| 151 | - public void testIncrementalMstHmmWindEstimationForTrackedRace() throws NoWindException, ModelPersistenceException { |
|
| 154 | + public void testIncrementalMstHmmWindEstimationForTrackedRace() throws NoWindException, IOException { |
|
| 152 | 155 | assertTrue(windEstimationFactoryService.isReady(), "Wind estimation models are empty"); |
| 153 | 156 | DynamicTrackedRaceImpl trackedRace = getTrackedRace(); |
| 154 | 157 | WindTrack estimatedWindTrackOfTrackedRace = trackedRace |
| ... | ... | @@ -180,6 +183,9 @@ public class IncrementalMstHmmWindEstimationForTrackedRaceTest extends OnlineTra |
| 180 | 183 | new WindTrackCalculatorImpl(new MiddleCourseBasedTwdCalculatorImpl(), |
| 181 | 184 | new DummyBasedTwsCalculatorImpl())); |
| 182 | 185 | List<WindWithConfidence<Pair<Position, TimePoint>>> windFixes = targetWindEstimation.estimateWindTrack(race); |
| 186 | + final MeasurementXMLFile performanceReport = new MeasurementXMLFile(this.getClass()); |
|
| 187 | + final MeasurementCase performanceReportCase = performanceReport.addCase(getClass().getSimpleName()); |
|
| 188 | + performanceReportCase.addMeasurement(new Measurement("NumberOfTargetEstimationFixes", windFixes.size())); |
|
| 183 | 189 | List<Wind> targetWindFixes = new ArrayList<>(windFixes.size()); |
| 184 | 190 | for (WindWithConfidence<Pair<Position, TimePoint>> windFix : windFixes) { |
| 185 | 191 | Wind wind = windFix.getObject(); |
| ... | ... | @@ -233,6 +239,7 @@ public class IncrementalMstHmmWindEstimationForTrackedRaceTest extends OnlineTra |
| 233 | 239 | } |
| 234 | 240 | assertTrue((double) foundCount / (double) targetWindFixes.size() > PERCENT_QUANTILE, |
| 235 | 241 | "Expected ratio of matching fixes to be at least "+PERCENT_QUANTILE+" but was only "+(double) foundCount / (double) estimatedWindFixes.size()); |
| 242 | + performanceReport.write(); |
|
| 236 | 243 | } |
| 237 | 244 | |
| 238 | 245 | /** |