diff --git a/test/scenario/audio_stream.cc b/test/scenario/audio_stream.cc
index 076b4ea..8359bd0 100644
--- a/test/scenario/audio_stream.cc
+++ b/test/scenario/audio_stream.cc
@@ -152,6 +152,7 @@
 
 void SendAudioStream::Start() {
   send_stream_->Start();
+  sender_->call_->SignalChannelNetworkState(MediaType::AUDIO, kNetworkUp);
 }
 
 ColumnPrinter SendAudioStream::StatsPrinter() {
@@ -192,6 +193,11 @@
   receiver_->call_->DestroyAudioReceiveStream(receive_stream_);
 }
 
+void ReceiveAudioStream::Start() {
+  receive_stream_->Start();
+  receiver_->call_->SignalChannelNetworkState(MediaType::AUDIO, kNetworkUp);
+}
+
 AudioStreamPair::~AudioStreamPair() = default;
 
 AudioStreamPair::AudioStreamPair(
diff --git a/test/scenario/audio_stream.h b/test/scenario/audio_stream.h
index 601a375..3ab0a1f 100644
--- a/test/scenario/audio_stream.h
+++ b/test/scenario/audio_stream.h
@@ -50,6 +50,7 @@
  public:
   RTC_DISALLOW_COPY_AND_ASSIGN(ReceiveAudioStream);
   ~ReceiveAudioStream();
+  void Start();
 
  private:
   friend class Scenario;
diff --git a/test/scenario/scenario.cc b/test/scenario/scenario.cc
index 9dcdcbe..7589878 100644
--- a/test/scenario/scenario.cc
+++ b/test/scenario/scenario.cc
@@ -75,6 +75,8 @@
 }
 
 Scenario::~Scenario() {
+  if (start_time_.IsFinite())
+    Stop();
   if (!real_time_mode_)
     rtc::SetClockForTesting(nullptr);
 }
@@ -305,35 +307,18 @@
 }
 
 void Scenario::RunFor(TimeDelta duration) {
-  RunUntil(duration, TimeDelta::PlusInfinity(), []() { return false; });
+  RunUntil(Duration() + duration);
+}
+
+void Scenario::RunUntil(TimeDelta max_duration) {
+  RunUntil(max_duration, TimeDelta::PlusInfinity(), []() { return false; });
 }
 
 void Scenario::RunUntil(TimeDelta max_duration,
                         TimeDelta poll_interval,
                         std::function<bool()> exit_function) {
-  start_time_ = Timestamp::us(clock_->TimeInMicroseconds());
-  for (auto& activity : repeated_activities_) {
-    activity->SetStartTime(start_time_);
-  }
-
-  for (auto& stream_pair : video_streams_)
-    stream_pair->receive()->receive_stream_->Start();
-  for (auto& stream_pair : audio_streams_)
-    stream_pair->receive()->receive_stream_->Start();
-  for (auto& stream_pair : video_streams_) {
-    if (stream_pair->config_.autostart) {
-      stream_pair->send()->Start();
-    }
-  }
-  for (auto& stream_pair : audio_streams_) {
-    if (stream_pair->config_.autostart) {
-      stream_pair->send()->Start();
-    }
-  }
-  for (auto& call : clients_) {
-    call->call_->SignalChannelNetworkState(MediaType::AUDIO, kNetworkUp);
-    call->call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkUp);
-  }
+  if (start_time_.IsInfinite())
+    Start();
 
   rtc::Event done_;
   while (!exit_function() && Duration() < max_duration) {
@@ -363,6 +348,32 @@
                                            1000);
     }
   }
+}
+
+void Scenario::Start() {
+  start_time_ = Timestamp::us(clock_->TimeInMicroseconds());
+  for (auto& activity : repeated_activities_) {
+    activity->SetStartTime(start_time_);
+  }
+
+  for (auto& stream_pair : video_streams_)
+    stream_pair->receive()->Start();
+  for (auto& stream_pair : audio_streams_)
+    stream_pair->receive()->Start();
+  for (auto& stream_pair : video_streams_) {
+    if (stream_pair->config_.autostart) {
+      stream_pair->send()->Start();
+    }
+  }
+  for (auto& stream_pair : audio_streams_) {
+    if (stream_pair->config_.autostart) {
+      stream_pair->send()->Start();
+    }
+  }
+}
+
+void Scenario::Stop() {
+  RTC_DCHECK(start_time_.IsFinite());
   for (auto& stream_pair : video_streams_) {
     stream_pair->send()->video_capturer_->Stop();
     stream_pair->send()->send_stream_->Stop();
@@ -373,6 +384,7 @@
     stream_pair->receive()->receive_stream_->Stop();
   for (auto& stream_pair : audio_streams_)
     stream_pair->receive()->receive_stream_->Stop();
+  start_time_ = Timestamp::PlusInfinity();
 }
 
 Timestamp Scenario::Now() {
@@ -380,6 +392,8 @@
 }
 
 TimeDelta Scenario::Duration() {
+  if (start_time_.IsInfinite())
+    return TimeDelta::Zero();
   return Now() - start_time_;
 }
 
diff --git a/test/scenario/scenario.h b/test/scenario/scenario.h
index 5ee017c..38bef44 100644
--- a/test/scenario/scenario.h
+++ b/test/scenario/scenario.h
@@ -140,9 +140,12 @@
   // Runs the scenario for the given time or until the exit function returns
   // true.
   void RunFor(TimeDelta duration);
+  void RunUntil(TimeDelta max_duration);
   void RunUntil(TimeDelta max_duration,
                 TimeDelta probe_interval,
                 std::function<bool()> exit_function);
+  void Start();
+  void Stop();
 
   // Triggers sending of dummy packets over the given nodes.
   void TriggerPacketBurst(std::vector<NetworkNode*> over_nodes,
diff --git a/test/scenario/video_stream.cc b/test/scenario/video_stream.cc
index 528a9cc2..3639923 100644
--- a/test/scenario/video_stream.cc
+++ b/test/scenario/video_stream.cc
@@ -256,6 +256,7 @@
 void SendVideoStream::Start() {
   send_stream_->Start();
   video_capturer_->Start();
+  sender_->call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkUp);
 }
 
 void SendVideoStream::UpdateConfig(
@@ -375,6 +376,11 @@
     receiver_->call_->DestroyFlexfecReceiveStream(flecfec_stream_);
 }
 
+void ReceiveVideoStream::Start() {
+  receive_stream_->Start();
+  receiver_->call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkUp);
+}
+
 VideoStreamPair::~VideoStreamPair() = default;
 
 VideoStreamPair::VideoStreamPair(CallClient* sender,
diff --git a/test/scenario/video_stream.h b/test/scenario/video_stream.h
index a68dbf6..ebf9c95 100644
--- a/test/scenario/video_stream.h
+++ b/test/scenario/video_stream.h
@@ -65,6 +65,7 @@
  public:
   RTC_DISALLOW_COPY_AND_ASSIGN(ReceiveVideoStream);
   ~ReceiveVideoStream();
+  void Start();
 
  private:
   friend class Scenario;
