Support for multiple reporting configuration and variable simulation duration in lte-ue-measurements-handover test suite
authorBudiarto Herman <budiarto.herman@magister.fi>
Sun, 01 Sep 2013 21:57:42 +0300
changeset 10342 7c2328aee0b1
parent 10341 5ef446cb8252
child 10343 7035a2f8a1f1
Support for multiple reporting configuration and variable simulation duration in lte-ue-measurements-handover test suite
src/lte/doc/source/lte-testing.rst
src/lte/test/lte-test-ue-measurements.cc
src/lte/test/lte-test-ue-measurements.h
--- a/src/lte/doc/source/lte-testing.rst	Sun Sep 01 19:28:33 2013 +0300
+++ b/src/lte/doc/source/lte-testing.rst	Sun Sep 01 21:57:42 2013 +0300
@@ -161,7 +161,7 @@
 Inter-cell Interference Tests
 -----------------------------
 
-The test suite `lte-interference`` provides system tests recreating an
+The test suite `lte-interference` provides system tests recreating an
 inter-cell interference scenario with two eNBs, each having a single
 UE attached to it and employing Adaptive Modulation and Coding both in
 the downlink and in the uplink. The topology of the scenario
@@ -197,9 +197,9 @@
 UE Measurements Tests
 ---------------------
 
-The test suite `lte-ue-measurements`` provides system tests recreating an
+The test suite `lte-ue-measurements` provides system tests recreating an
 inter-cell interference scenario identical of the one defined for
-`lte-interference`` test-suite. However, in this test the quantities to be
+`lte-interference` test-suite. However, in this test the quantities to be
 tested are represented by RSRP and RSRQ measurements performed by the UE in two
 different points of the stack: the source, which is UE PHY layer, and the
 destination, that is the eNB RRC.
@@ -395,12 +395,13 @@
 this purpose, the simulation will construct 2 eNodeBs with different UE
 measurement configuration, and the UE will perform handover from one cell to
 another. The UE will be located on a straight line between the 2 eNodeBs, and
-the handover will be invoked manually.
+the handover will be invoked manually. The simulation duration is 2 seconds and
+the handover is triggered at +1.0s.
 
 The `lte-ue-measurements-handover` test suite covers various types of
-configuration differences. The first one is the difference in report interval:
-the first eNodeB is configured with 480 ms report interval, while the second
-eNodeB is configured with 240 ms report interval. Therefore, when the UE
+configuration differences. The first one is the difference in report interval,
+e.g. the first eNodeB is configured with 480 ms report interval, while the
+second eNodeB is configured with 240 ms report interval. Therefore, when the UE
 performed handover to the second cell, the new report interval must take effect.
 As in piecewise configuration, the timing and the content of each measurement
 report received by the eNodeB will be verified.
--- a/src/lte/test/lte-test-ue-measurements.cc	Sun Sep 01 19:28:33 2013 +0300
+++ b/src/lte/test/lte-test-ue-measurements.cc	Sun Sep 01 21:57:42 2013 +0300
@@ -1379,17 +1379,19 @@
 LteUeMeasurementsHandoverTestSuite::LteUeMeasurementsHandoverTestSuite ()
   : TestSuite ("lte-ue-measurements-handover", SYSTEM)
 {
+  std::list<LteRrcSap::ReportConfigEutra> sourceConfigList;
+  std::list<LteRrcSap::ReportConfigEutra> targetConfigList;
   std::vector<Time> expectedTime;
   std::vector<uint8_t> expectedRsrp;
 
-  // === Report interval difference ===
-
   LteRrcSap::ReportConfigEutra sourceConfig;
   sourceConfig.triggerType = LteRrcSap::ReportConfigEutra::EVENT;
   sourceConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
   sourceConfig.threshold1.choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
   sourceConfig.threshold1.range = 0;
   sourceConfig.triggerQuantity = LteRrcSap::ReportConfigEutra::RSRP;
+  sourceConfig.reportInterval = LteRrcSap::ReportConfigEutra::MS240;
+  sourceConfigList.push_back (sourceConfig);
 
   LteRrcSap::ReportConfigEutra targetConfig;
   targetConfig.triggerType = LteRrcSap::ReportConfigEutra::EVENT;
@@ -1397,201 +1399,220 @@
   targetConfig.threshold1.choice = LteRrcSap::ThresholdEutra::THRESHOLD_RSRP;
   targetConfig.threshold1.range = 0;
   targetConfig.triggerQuantity = LteRrcSap::ReportConfigEutra::RSRP;
+  targetConfig.reportInterval = LteRrcSap::ReportConfigEutra::MS240;
+  targetConfigList.push_back (targetConfig);
+
+  // === Report interval difference ===
 
   // decreasing report interval
-  sourceConfig.reportInterval = LteRrcSap::ReportConfigEutra::MS480;
-  targetConfig.reportInterval = LteRrcSap::ReportConfigEutra::MS240;
+  sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS480;
+  targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
   expectedTime.clear ();
   expectedTime << 200 << 680 << 1200 << 1440 << 1680 << 1920;
   expectedRsrp.clear ();
   expectedRsrp << 55 << 55 << 53 << 53 << 53 << 53;
   AddTestCase (new LteUeMeasurementsHandoverTestCase ("Handover test case - decreasing report interval",
-                                                      sourceConfig, targetConfig,
-                                                      expectedTime, expectedRsrp),
+                                                      sourceConfigList, targetConfigList,
+                                                      expectedTime, expectedRsrp,
+                                                      Seconds (2)),
                TestCase::TAKES_FOREVER);
 
   // increasing report interval
-  sourceConfig.reportInterval = LteRrcSap::ReportConfigEutra::MS120;
-  targetConfig.reportInterval = LteRrcSap::ReportConfigEutra::MS640;
+  sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS120;
+  targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS640;
   expectedTime.clear ();
   expectedTime << 200 << 320 << 440 << 560 << 680 << 800 << 920 << 1200 << 1840;
   expectedRsrp.clear ();
   expectedRsrp << 55 << 55 << 55 << 55 << 55 << 55 << 55 << 53 << 53;
   AddTestCase (new LteUeMeasurementsHandoverTestCase ("Handover test case - increasing report interval",
-                                                      sourceConfig, targetConfig,
-                                                      expectedTime, expectedRsrp),
+                                                      sourceConfigList, targetConfigList,
+                                                      expectedTime, expectedRsrp,
+                                                      Seconds (2)),
                TestCase::QUICK);
 
   // === Event difference ===
 
-  sourceConfig.reportInterval = LteRrcSap::ReportConfigEutra::MS240;
-  targetConfig.reportInterval = LteRrcSap::ReportConfigEutra::MS240;
-  sourceConfig.threshold1.range = 54;
-  sourceConfig.threshold2.range = 54;
-  sourceConfig.a3Offset = 1;
-  targetConfig.threshold1.range = 54;
-  targetConfig.threshold2.range = 54;
-  targetConfig.a3Offset = 1;
+  sourceConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
+  targetConfigList.front ().reportInterval = LteRrcSap::ReportConfigEutra::MS240;
+  sourceConfigList.front ().threshold1.range = 54;
+  sourceConfigList.front ().threshold2.range = 54;
+  sourceConfigList.front ().a3Offset = 1;
+  targetConfigList.front ().threshold1.range = 54;
+  targetConfigList.front ().threshold2.range = 54;
+  targetConfigList.front ().a3Offset = 1;
 
   // Event A1 to Event A2
-  sourceConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
-  targetConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
+  sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
+  targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
   expectedTime.clear ();
   expectedTime << 200 << 440 << 680 << 920 << 1200 << 1440 << 1680 << 1920;
   expectedRsrp.clear ();
   expectedRsrp << 55 << 55 << 55 << 55 << 53 << 53 << 53 << 53;
   AddTestCase (new LteUeMeasurementsHandoverTestCase ("Handover test case - Event A1 to Event A2",
-                                                      sourceConfig, targetConfig,
-                                                      expectedTime, expectedRsrp),
+                                                      sourceConfigList, targetConfigList,
+                                                      expectedTime, expectedRsrp,
+                                                      Seconds (2)),
                TestCase::EXTENSIVE);
 
   // Event A2 to Event A1
-  sourceConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
-  targetConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
+  sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
+  targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
   expectedTime.clear ();
   expectedRsrp.clear ();
   AddTestCase (new LteUeMeasurementsHandoverTestCase ("Handover test case - Event A2 to Event A1",
-                                                      sourceConfig, targetConfig,
-                                                      expectedTime, expectedRsrp),
+                                                      sourceConfigList, targetConfigList,
+                                                      expectedTime, expectedRsrp,
+                                                      Seconds (2)),
                TestCase::TAKES_FOREVER);
 
   // Event A3 to Event A4
-  sourceConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
-  targetConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
+  sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
+  targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
   expectedTime.clear ();
   expectedTime << 1200 << 1440 << 1680 << 1920;
   expectedRsrp.clear ();
   expectedRsrp << 53 << 53 << 53 << 53;
   AddTestCase (new LteUeMeasurementsHandoverTestCase ("Handover test case - Event A3 to Event A4",
-                                                      sourceConfig, targetConfig,
-                                                      expectedTime, expectedRsrp),
+                                                      sourceConfigList, targetConfigList,
+                                                      expectedTime, expectedRsrp,
+                                                      Seconds (2)),
                TestCase::TAKES_FOREVER);
 
   // Event A4 to Event A3
-  sourceConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
-  targetConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
+  sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
+  targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
   expectedTime.clear ();
   expectedTime << 1200 << 1440 << 1680 << 1920;
   expectedRsrp.clear ();
   expectedRsrp << 53 << 53 << 53 << 53;
   AddTestCase (new LteUeMeasurementsHandoverTestCase ("Handover test case - Event A4 to Event A3",
-                                                      sourceConfig, targetConfig,
-                                                      expectedTime, expectedRsrp),
+                                                      sourceConfigList, targetConfigList,
+                                                      expectedTime, expectedRsrp,
+                                                      Seconds (2)),
                TestCase::QUICK);
 
   // Event A2 to Event A3
-  sourceConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
-  targetConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
+  sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
+  targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
   expectedTime.clear ();
   expectedTime << 1200 << 1440 << 1680 << 1920;
   expectedRsrp.clear ();
   expectedRsrp << 53 << 53 << 53 << 53;
   AddTestCase (new LteUeMeasurementsHandoverTestCase ("Handover test case - Event A2 to Event A3",
-                                                      sourceConfig, targetConfig,
-                                                      expectedTime, expectedRsrp),
+                                                      sourceConfigList, targetConfigList,
+                                                      expectedTime, expectedRsrp,
+                                                      Seconds (2)),
                TestCase::EXTENSIVE);
 
   // Event A3 to Event A2
-  sourceConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
-  targetConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
+  sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
+  targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
   expectedTime.clear ();
   expectedTime << 1200 << 1440 << 1680 << 1920;
   expectedRsrp.clear ();
   expectedRsrp << 53 << 53 << 53 << 53;
   AddTestCase (new LteUeMeasurementsHandoverTestCase ("Handover test case - Event A3 to Event A2",
-                                                      sourceConfig, targetConfig,
-                                                      expectedTime, expectedRsrp),
+                                                      sourceConfigList, targetConfigList,
+                                                      expectedTime, expectedRsrp,
+                                                      Seconds (2)),
                TestCase::TAKES_FOREVER);
 
   // Event A4 to Event A5
-  sourceConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
-  targetConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
+  sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
+  targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
   expectedTime.clear ();
   expectedTime << 1200 << 1440 << 1680 << 1920;
   expectedRsrp.clear ();
   expectedRsrp << 53 << 53 << 53 << 53;
   AddTestCase (new LteUeMeasurementsHandoverTestCase ("Handover test case - Event A4 to Event A5",
-                                                      sourceConfig, targetConfig,
-                                                      expectedTime, expectedRsrp),
+                                                      sourceConfigList, targetConfigList,
+                                                      expectedTime, expectedRsrp,
+                                                      Seconds (2)),
                TestCase::TAKES_FOREVER);
 
   // Event A5 to Event A4
-  sourceConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
-  targetConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
+  sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
+  targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
   expectedTime.clear ();
   expectedTime << 1200 << 1440 << 1680 << 1920;
   expectedRsrp.clear ();
   expectedRsrp << 53 << 53 << 53 << 53;
   AddTestCase (new LteUeMeasurementsHandoverTestCase ("Handover test case - Event A5 to Event A4",
-                                                      sourceConfig, targetConfig,
-                                                      expectedTime, expectedRsrp),
+                                                      sourceConfigList, targetConfigList,
+                                                      expectedTime, expectedRsrp,
+                                                      Seconds (2)),
                TestCase::EXTENSIVE);
 
   // === Threshold/offset difference ===
 
-  sourceConfig.threshold1.range = 52;
-  targetConfig.threshold1.range = 56;
+  sourceConfigList.front ().threshold1.range = 52;
+  targetConfigList.front ().threshold1.range = 56;
 
   // Event A1
-  sourceConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
-  targetConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
+  sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
+  targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A1;
   expectedTime.clear ();
   expectedTime << 200 << 440 << 680 << 920;
   expectedRsrp.clear ();
   expectedRsrp << 55 << 55 << 55 << 55;
   AddTestCase (new LteUeMeasurementsHandoverTestCase ("Handover test case - Event A1 threshold difference",
-                                                      sourceConfig, targetConfig,
-                                                      expectedTime, expectedRsrp),
+                                                      sourceConfigList, targetConfigList,
+                                                      expectedTime, expectedRsrp,
+                                                      Seconds (2)),
                TestCase::EXTENSIVE);
 
   // Event A2
-  sourceConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
-  targetConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
+  sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
+  targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A2;
   expectedTime.clear ();
   expectedTime << 1200 << 1440 << 1680 << 1920;
   expectedRsrp.clear ();
   expectedRsrp << 53 << 53 << 53 << 53;
   AddTestCase (new LteUeMeasurementsHandoverTestCase ("Handover test case - Event A2 threshold difference",
-                                                      sourceConfig, targetConfig,
-                                                      expectedTime, expectedRsrp),
+                                                      sourceConfigList, targetConfigList,
+                                                      expectedTime, expectedRsrp,
+                                                      Seconds (2)),
                TestCase::QUICK);
 
   // Event A3
-  sourceConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
-  sourceConfig.a3Offset = -30;
-  targetConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
-  targetConfig.a3Offset = 30;
+  sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
+  sourceConfigList.front ().a3Offset = -30;
+  targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A3;
+  targetConfigList.front ().a3Offset = 30;
   expectedTime.clear ();
   expectedTime << 200 << 440 << 680 << 920;
   expectedRsrp.clear ();
   expectedRsrp << 55 << 55 << 55 << 55;
   AddTestCase (new LteUeMeasurementsHandoverTestCase ("Handover test case - Event A3 offset difference",
-                                                      sourceConfig, targetConfig,
-                                                      expectedTime, expectedRsrp),
+                                                      sourceConfigList, targetConfigList,
+                                                      expectedTime, expectedRsrp,
+                                                      Seconds (2)),
                TestCase::QUICK);
 
   // Event A4
-  sourceConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
-  targetConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
+  sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
+  targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A4;
   expectedTime.clear ();
   expectedTime << 200 << 440 << 680 << 920;
   expectedRsrp.clear ();
   expectedRsrp << 55 << 55 << 55 << 55;
   AddTestCase (new LteUeMeasurementsHandoverTestCase ("Handover test case - Event A4 threshold difference",
-                                                      sourceConfig, targetConfig,
-                                                      expectedTime, expectedRsrp),
+                                                      sourceConfigList, targetConfigList,
+                                                      expectedTime, expectedRsrp,
+                                                      Seconds (2)),
                TestCase::EXTENSIVE);
 
   // Event A5
-  sourceConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
-  sourceConfig.threshold2.range = 52;
-  targetConfig.eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
-  targetConfig.threshold2.range = 56;
+  sourceConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
+  sourceConfigList.front ().threshold2.range = 52;
+  targetConfigList.front ().eventId = LteRrcSap::ReportConfigEutra::EVENT_A5;
+  targetConfigList.front ().threshold2.range = 56;
   expectedTime.clear ();
   expectedRsrp.clear ();
   AddTestCase (new LteUeMeasurementsHandoverTestCase ("Handover test case - Event A5 threshold difference",
-                                                      sourceConfig, targetConfig,
-                                                      expectedTime, expectedRsrp),
+                                                      sourceConfigList, targetConfigList,
+                                                      expectedTime, expectedRsrp,
+                                                      Seconds (2)),
                TestCase::EXTENSIVE);
 
 } // end of LteUeMeasurementsHandoverTestSuite::LteUeMeasurementsHandoverTestSuite
@@ -1605,15 +1626,16 @@
 
 LteUeMeasurementsHandoverTestCase::LteUeMeasurementsHandoverTestCase (
   std::string name,
-  LteRrcSap::ReportConfigEutra sourceConfig,
-  LteRrcSap::ReportConfigEutra targetConfig,
-  std::vector<Time> expectedTime,
-  std::vector<uint8_t> expectedRsrp)
+  std::list<LteRrcSap::ReportConfigEutra> sourceConfigList,
+  std::list<LteRrcSap::ReportConfigEutra> targetConfigList,
+  std::vector<Time> expectedTime, std::vector<uint8_t> expectedRsrp,
+  Time duration)
   : TestCase (name),
-    m_sourceConfig (sourceConfig),
-    m_targetConfig (targetConfig),
+    m_sourceConfigList (sourceConfigList),
+    m_targetConfigList (targetConfigList),
     m_expectedTime (expectedTime),
-    m_expectedRsrp (expectedRsrp)
+    m_expectedRsrp (expectedRsrp),
+    m_duration (duration)
 {
   // input sanity check
   uint16_t size = m_expectedTime.size ();
@@ -1710,13 +1732,25 @@
   enbDevs = lteHelper->InstallEnbDevice (enbNodes);
   ueDevs = lteHelper->InstallUeDevice (ueNodes);
 
-  // Setup UE measurement configuration in source eNodeB
+  // Setup UE measurement configuration in eNodeBs
+  uint8_t measId;
+  std::list<LteRrcSap::ReportConfigEutra>::const_iterator itReportConfig;
   Ptr<LteEnbRrc> enbRrc1 = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ()->GetRrc ();
-  m_expectedSourceCellMeasId = enbRrc1->AddUeMeasReportConfig (m_sourceConfig);
+  Ptr<LteEnbRrc> enbRrc2 = enbDevs.Get (1)->GetObject<LteEnbNetDevice> ()->GetRrc ();
 
-  // Setup UE measurement configuration in target eNodeB
-  Ptr<LteEnbRrc> enbRrc2 = enbDevs.Get (1)->GetObject<LteEnbNetDevice> ()->GetRrc ();
-  m_expectedTargetCellMeasId = enbRrc2->AddUeMeasReportConfig (m_targetConfig);
+  for (itReportConfig = m_sourceConfigList.begin ();
+       itReportConfig != m_sourceConfigList.end (); itReportConfig++)
+    {
+      measId = enbRrc1->AddUeMeasReportConfig (*itReportConfig);
+      m_expectedSourceCellMeasId.insert (measId);
+    }
+
+  for (itReportConfig = m_targetConfigList.begin ();
+       itReportConfig != m_targetConfigList.end (); itReportConfig++)
+    {
+      measId = enbRrc2->AddUeMeasReportConfig (*itReportConfig);
+      m_expectedTargetCellMeasId.insert (measId);
+    }
 
   // Install the IP stack on the UEs
   internet.Install (ueNodes);
@@ -1749,11 +1783,11 @@
                                  this));
 
   // Schedule handover
-  lteHelper->HandoverRequest (Seconds (1), ueDevs.Get (0), enbDevs.Get (0),
-                              enbDevs.Get (1));
+  lteHelper->HandoverRequest (MilliSeconds (m_duration.GetMilliSeconds () / 2),
+                              ueDevs.Get (0), enbDevs.Get (0), enbDevs.Get (1));
 
   // Run simulation
-  Simulator::Stop (Seconds (2));
+  Simulator::Stop (m_duration);
   Simulator::Run ();
   Simulator::Destroy ();
 
@@ -1775,23 +1809,26 @@
   std::string context, uint64_t imsi, uint16_t cellId, uint16_t rnti,
   LteRrcSap::MeasurementReport report)
 {
-  NS_LOG_FUNCTION (this << context);
+  uint8_t measId = report.measResults.measId;
+  NS_LOG_FUNCTION (this << context << (uint16_t) measId);
 
-  uint8_t correctMeasId;
+  bool isCorrectMeasId;
   if (cellId == 1)
     {
-      correctMeasId = m_expectedSourceCellMeasId;
+      std::set<uint8_t>::iterator itMeasId = m_expectedSourceCellMeasId.find (measId);
+      isCorrectMeasId = (itMeasId != m_expectedSourceCellMeasId.end ());
     }
   else if (cellId == 2)
     {
-      correctMeasId = m_expectedTargetCellMeasId;
+      std::set<uint8_t>::iterator itMeasId = m_expectedTargetCellMeasId.find (measId);
+      isCorrectMeasId = (itMeasId != m_expectedTargetCellMeasId.end ());
     }
   else
     {
       NS_FATAL_ERROR ("Invalid cell ID " << cellId);
     }
 
-  if (report.measResults.measId == correctMeasId)
+  if (isCorrectMeasId)
     {
       // verifying the report completeness
       LteRrcSap::MeasResults measResults = report.measResults;
--- a/src/lte/test/lte-test-ue-measurements.h	Sun Sep 01 19:28:33 2013 +0300
+++ b/src/lte/test/lte-test-ue-measurements.h	Sun Sep 01 21:57:42 2013 +0300
@@ -26,14 +26,15 @@
 
 #include <ns3/test.h>
 #include <ns3/lte-rrc-sap.h>
+#include <ns3/nstime.h>
+#include <list>
+#include <set>
 #include <vector>
 
-
 namespace ns3 {
 
 
 class MobilityModel;
-class Time;
 
 
 // ===== LTE-UE-MEASUREMENTS TEST SUITE ==================================== //
@@ -300,17 +301,18 @@
  * \brief Testing UE measurements in LTE with simulation of 2 eNodeB and 1 UE in
  *        a handover configuration.
  *
- * The simulation will run for 2 seconds, while the handover command will be
- * issued at second +1s.
+ * The simulation will run for the specified duration, while the handover
+ * command will be issued exactly at the middle of simulation.
  */
 class LteUeMeasurementsHandoverTestCase : public TestCase
 {
 public:
   LteUeMeasurementsHandoverTestCase (std::string name,
-                                     LteRrcSap::ReportConfigEutra sourceConfig,
-                                     LteRrcSap::ReportConfigEutra targetConfig,
+                                     std::list<LteRrcSap::ReportConfigEutra> sourceConfigList,
+                                     std::list<LteRrcSap::ReportConfigEutra> targetConfigList,
                                      std::vector<Time> expectedTime,
-                                     std::vector<uint8_t> expectedRsrp);
+                                     std::vector<uint8_t> expectedRsrp,
+                                     Time duration);
 
   virtual ~LteUeMeasurementsHandoverTestCase ();
 
@@ -344,14 +346,16 @@
   virtual void DoTeardown ();
 
   /**
-   * \brief The active report triggering configuration for the source eNodeB.
+   * \brief The list of active report triggering configuration for the source
+   *        eNodeB.
    */
-  LteRrcSap::ReportConfigEutra m_sourceConfig;
+  std::list<LteRrcSap::ReportConfigEutra> m_sourceConfigList;
 
   /**
-   * \brief The active report triggering configuration for the target eNodeB.
+   * \brief The list of active report triggering configuration for the target
+   *        eNodeB.
    */
-  LteRrcSap::ReportConfigEutra m_targetConfig;
+  std::list<LteRrcSap::ReportConfigEutra> m_targetConfigList;
 
   /**
    * \brief The list of expected time when measurement reports are received by
@@ -378,18 +382,23 @@
   std::vector<uint8_t>::iterator m_itExpectedRsrp;
 
   /**
-   * \brief The measurement identity being tested in source cell. Measurement
-   *        reports with different measurement identity (e.g. from handover
-   *        algorithm) will be ignored.
+   * \brief Duration of simulation.
    */
-  uint8_t m_expectedSourceCellMeasId;
+  Time m_duration;
 
   /**
-   * \brief The measurement identity being tested in target cell. Measurement
-   *        reports with different measurement identity (e.g. from handover
-   *        algorithm) will be ignored.
+   * \brief The list of measurement identities being tested in the source cell.
+   *        Measurement reports with different measurement identity (e.g. from
+   *        handover algorithm and ANR) will be ignored.
    */
-  uint8_t m_expectedTargetCellMeasId;
+  std::set<uint8_t> m_expectedSourceCellMeasId;
+
+  /**
+   * \brief The list of measurement identities being tested in the target cell.
+   *        Measurement reports with different measurement identity (e.g. from
+   *        handover algorithm and ANR) will be ignored.
+   */
+  std::set<uint8_t> m_expectedTargetCellMeasId;
 
 }; // end of class LteUeMeasurementsHandoverTestCase