diff --git a/tests/daemon/face/datagram-transport.t.cpp b/tests/daemon/face/datagram-transport.t.cpp
index 4e88ff2..d86f669 100644
--- a/tests/daemon/face/datagram-transport.t.cpp
+++ b/tests/daemon/face/datagram-transport.t.cpp
@@ -26,8 +26,6 @@
 #include "unicast-udp-transport-fixture.hpp"
 #include "multicast-udp-transport-fixture.hpp"
 
-#include "transport-test-common.hpp"
-
 #include <boost/mpl/vector.hpp>
 
 namespace nfd::tests {
diff --git a/tests/daemon/face/internal-face.t.cpp b/tests/daemon/face/internal-face.t.cpp
index 5c57341..e44c73c 100644
--- a/tests/daemon/face/internal-face.t.cpp
+++ b/tests/daemon/face/internal-face.t.cpp
@@ -25,9 +25,9 @@
 
 #include "face/internal-face.hpp"
 
-#include "transport-test-common.hpp"
 #include "tests/key-chain-fixture.hpp"
 #include "tests/daemon/global-io-fixture.hpp"
+#include "tests/daemon/face/transport-test-common.hpp"
 
 namespace nfd::tests {
 
diff --git a/tests/daemon/face/multicast-ethernet-transport.t.cpp b/tests/daemon/face/multicast-ethernet-transport.t.cpp
index bff61c7..2791ca7 100644
--- a/tests/daemon/face/multicast-ethernet-transport.t.cpp
+++ b/tests/daemon/face/multicast-ethernet-transport.t.cpp
@@ -23,12 +23,12 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "transport-test-common.hpp"
-
 #include "ethernet-fixture.hpp"
 
 #include "common/global.hpp"
 
+#include "tests/daemon/face/transport-test-common.hpp"
+
 namespace nfd::tests {
 
 using namespace nfd::face;
diff --git a/tests/daemon/face/multicast-udp-transport-fixture.hpp b/tests/daemon/face/multicast-udp-transport-fixture.hpp
index 959ca9c..4c984f4 100644
--- a/tests/daemon/face/multicast-udp-transport-fixture.hpp
+++ b/tests/daemon/face/multicast-udp-transport-fixture.hpp
@@ -32,6 +32,7 @@
 #include "tests/test-common.hpp"
 #include "tests/daemon/limited-io.hpp"
 #include "tests/daemon/face/dummy-link-service.hpp"
+#include "tests/daemon/face/transport-test-common.hpp"
 
 namespace nfd::tests {
 
@@ -43,7 +44,7 @@
 {
 protected:
   void
-  initialize(ip::address address)
+  initialize(const shared_ptr<const ndn::net::NetworkInterface>& netif, const ip::address& address)
   {
     ip::address mcastAddr;
     if (address.is_v4()) {
@@ -53,19 +54,19 @@
     else {
       // the group FF0X::114 is reserved for experimentation at all scope levels (RFC 4727)
       auto v6Addr = ip::address_v6::from_string("FF01::114");
-      v6Addr.scope_id(address.to_v6().scope_id());
+      v6Addr.scope_id(netif->getIndex());
       mcastAddr = v6Addr;
     }
     mcastEp = udp::endpoint(mcastAddr, 7373);
     remoteMcastEp = udp::endpoint(mcastAddr, 8383);
 
     MulticastUdpTransport::openRxSocket(remoteSockRx, mcastEp, address);
-    MulticastUdpTransport::openTxSocket(remoteSockTx, udp::endpoint(address, 0), nullptr, true);
+    MulticastUdpTransport::openTxSocket(remoteSockTx, udp::endpoint(address, 0), &*netif, true);
 
     udp::socket sockRx(g_io);
     udp::socket sockTx(g_io);
     MulticastUdpTransport::openRxSocket(sockRx, remoteMcastEp, address);
-    MulticastUdpTransport::openTxSocket(sockTx, udp::endpoint(address, txPort), nullptr, true);
+    MulticastUdpTransport::openTxSocket(sockTx, udp::endpoint(address, txPort), &*netif, true);
 
     face = make_unique<Face>(make_unique<DummyLinkService>(),
                              make_unique<MulticastUdpTransport>(mcastEp, std::move(sockRx), std::move(sockTx),
diff --git a/tests/daemon/face/multicast-udp-transport.t.cpp b/tests/daemon/face/multicast-udp-transport.t.cpp
index efdd4f2..2457e6d 100644
--- a/tests/daemon/face/multicast-udp-transport.t.cpp
+++ b/tests/daemon/face/multicast-udp-transport.t.cpp
@@ -23,8 +23,6 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "transport-test-common.hpp"
-
 #include "multicast-udp-transport-fixture.hpp"
 
 #include <boost/mpl/vector.hpp>
@@ -34,12 +32,7 @@
 using namespace nfd::face;
 
 BOOST_AUTO_TEST_SUITE(Face)
-
-using MulticastUdpTransportFixtureWithAddress =
-  IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::Any,
-                     AddressScope::Global, MulticastInterface::Yes>;
-
-BOOST_FIXTURE_TEST_SUITE(TestMulticastUdpTransport, MulticastUdpTransportFixtureWithAddress)
+BOOST_AUTO_TEST_SUITE(TestMulticastUdpTransport)
 
 using MulticastUdpTransportFixtures = boost::mpl::vector<
   IpTransportFixture<MulticastUdpTransportFixture, AddressFamily::V4, AddressScope::Global, MulticastInterface::Yes>,
@@ -63,7 +56,12 @@
   BOOST_CHECK_GT(this->transport->getSendQueueCapacity(), 0);
 }
 
-BOOST_AUTO_TEST_CASE(PersistencyChange)
+using MulticastUdpTransportFixtureWithAddress = IpTransportFixture<MulticastUdpTransportFixture,
+                                                                   AddressFamily::Any,
+                                                                   AddressScope::LinkLocal,
+                                                                   MulticastInterface::Yes>;
+
+BOOST_FIXTURE_TEST_CASE(PersistencyChange, MulticastUdpTransportFixtureWithAddress)
 {
   TRANSPORT_TEST_INIT();
 
diff --git a/tests/daemon/face/null-face.t.cpp b/tests/daemon/face/null-face.t.cpp
index ad5e4cf..451f21c 100644
--- a/tests/daemon/face/null-face.t.cpp
+++ b/tests/daemon/face/null-face.t.cpp
@@ -27,7 +27,7 @@
 #include "face/null-transport.hpp"
 
 #include "tests/daemon/global-io-fixture.hpp"
-#include "transport-test-common.hpp"
+#include "tests/daemon/face/transport-test-common.hpp"
 
 namespace nfd::tests {
 
diff --git a/tests/daemon/face/stream-transport.t.cpp b/tests/daemon/face/stream-transport.t.cpp
index 2acacfb..c827900 100644
--- a/tests/daemon/face/stream-transport.t.cpp
+++ b/tests/daemon/face/stream-transport.t.cpp
@@ -26,8 +26,6 @@
 #include "tcp-transport-fixture.hpp"
 #include "unix-stream-transport-fixture.hpp"
 
-#include "transport-test-common.hpp"
-
 #include <boost/asio/read.hpp>
 #include <boost/mpl/vector.hpp>
 
diff --git a/tests/daemon/face/tcp-channel.t.cpp b/tests/daemon/face/tcp-channel.t.cpp
index 9f838c4..8937f5b 100644
--- a/tests/daemon/face/tcp-channel.t.cpp
+++ b/tests/daemon/face/tcp-channel.t.cpp
@@ -44,7 +44,7 @@
   SKIP_IF_IP_UNAVAILABLE(address);
   // do not listen
 
-  auto channel = this->makeChannel(typename IpAddressFromFamily<F::value>::type());
+  auto channel = this->makeChannel(IpAddressTypeFromFamily<F::value>());
   channel->connect(tcp::Endpoint(address, 7040), {},
     [this] (const shared_ptr<nfd::Face>&) {
       BOOST_FAIL("Connect succeeded when it should have failed");
diff --git a/tests/daemon/face/tcp-transport-fixture.hpp b/tests/daemon/face/tcp-transport-fixture.hpp
index 2ea4a2b..1d1d5ac 100644
--- a/tests/daemon/face/tcp-transport-fixture.hpp
+++ b/tests/daemon/face/tcp-transport-fixture.hpp
@@ -32,6 +32,7 @@
 #include "tests/test-common.hpp"
 #include "tests/daemon/limited-io.hpp"
 #include "tests/daemon/face/dummy-link-service.hpp"
+#include "tests/daemon/face/transport-test-common.hpp"
 
 namespace nfd::tests {
 
@@ -64,7 +65,7 @@
   }
 
   void
-  initialize(ip::address address,
+  initialize(const shared_ptr<const ndn::net::NetworkInterface>&, const ip::address& address,
              ndn::nfd::FacePersistency persistency = ndn::nfd::FACE_PERSISTENCY_PERSISTENT)
   {
     tcp::endpoint remoteEp(address, 7070);
diff --git a/tests/daemon/face/tcp-transport.t.cpp b/tests/daemon/face/tcp-transport.t.cpp
index 3d86064..9e52dfd 100644
--- a/tests/daemon/face/tcp-transport.t.cpp
+++ b/tests/daemon/face/tcp-transport.t.cpp
@@ -23,8 +23,6 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "transport-test-common.hpp"
-
 #include "tcp-transport-fixture.hpp"
 
 #include <boost/mpl/vector.hpp>
diff --git a/tests/daemon/face/tcp-udp-channel.t.cpp b/tests/daemon/face/tcp-udp-channel.t.cpp
index 6a29660..cd57b80 100644
--- a/tests/daemon/face/tcp-udp-channel.t.cpp
+++ b/tests/daemon/face/tcp-udp-channel.t.cpp
@@ -40,7 +40,7 @@
 {
   using Fixture = F;
   static constexpr AddressFamily ADDRESS_FAMILY = AF;
-  using Address = typename IpAddressFromFamily<AF>::type;
+  using Address = IpAddressTypeFromFamily<AF>;
 };
 
 using FixtureAndAddressList = boost::mpl::vector<
diff --git a/tests/daemon/face/test-ip.cpp b/tests/daemon/face/test-ip.cpp
index 593797e..2cf01c9 100644
--- a/tests/daemon/face/test-ip.cpp
+++ b/tests/daemon/face/test-ip.cpp
@@ -84,6 +84,12 @@
 boost::asio::ip::address
 getTestIp(AddressFamily family, AddressScope scope, MulticastInterface mcast)
 {
+  return std::get<boost::asio::ip::address>(getTestInterfaceAndIp(family, scope, mcast));
+}
+
+std::tuple<shared_ptr<const ndn::net::NetworkInterface>, boost::asio::ip::address>
+getTestInterfaceAndIp(AddressFamily family, AddressScope scope, MulticastInterface mcast)
+{
   for (const auto& interface : collectNetworkInterfaces()) {
     if (!interface->isUp() ||
         !matchTristate(mcast, interface->canMulticast())) {
@@ -97,7 +103,7 @@
            static_cast<int>(scope) == static_cast<int>(address.getScope())) &&
           (scope != AddressScope::Loopback ||
            address.getIp().is_loopback())) {
-        return address.getIp();
+        return {interface, address.getIp()};
       }
     }
   }
diff --git a/tests/daemon/face/test-ip.hpp b/tests/daemon/face/test-ip.hpp
index c2bb8ca..9fb57ab 100644
--- a/tests/daemon/face/test-ip.hpp
+++ b/tests/daemon/face/test-ip.hpp
@@ -30,6 +30,7 @@
 
 #include <boost/asio/ip/address.hpp>
 #include <ndn-cxx/net/network-address.hpp>
+#include <ndn-cxx/net/network-interface.hpp>
 
 namespace nfd::tests {
 
@@ -61,8 +62,6 @@
 std::ostream&
 operator<<(std::ostream& os, MulticastInterface mcast);
 
-/** \brief Derives IP address type from AddressFamily
- */
 template<AddressFamily AF>
 struct IpAddressFromFamily;
 
@@ -78,18 +77,36 @@
   using type = boost::asio::ip::address_v6;
 };
 
-/** \brief Get an IP address from any available network interface
- *  \param family the desired address family
- *  \param scope the desired address scope
- *  \param mcast specifies if the address can, must, or must not be chosen from a multicast-capable interface
- *  \return an IP address, either boost::asio::ip::address_v4 or boost::asio::ip::address_v6
- *  \retval unspecified address, if no appropriate address is available
+/**
+ * \brief Derives IP address type from AddressFamily
  */
-boost::asio::ip::address
+template<AddressFamily AF>
+using IpAddressTypeFromFamily = typename IpAddressFromFamily<AF>::type;
+
+/**
+ * \brief Get an IP address from any available network interface, satisfying the given requirements
+ * \param family the desired address family
+ * \param scope the desired address scope
+ * \param mcast specifies if the address can, must, or must not be chosen from a multicast-capable interface
+ * \return an IP address, either boost::asio::ip::address_v4 or boost::asio::ip::address_v6
+ * \retval unspecified address, if no appropriate address is available
+ */
+[[nodiscard]] boost::asio::ip::address
 getTestIp(AddressFamily family = AddressFamily::Any,
           AddressScope scope = AddressScope::Any,
           MulticastInterface mcast = MulticastInterface::Any);
 
+/**
+ * \brief Get a network interface and an IP address on it that satisfy the given requirements
+ * \param family the desired address family
+ * \param scope the desired address scope
+ * \param mcast specifies if the address can, must, or must not be chosen from a multicast-capable interface
+ */
+[[nodiscard]] std::tuple<shared_ptr<const ndn::net::NetworkInterface>, boost::asio::ip::address>
+getTestInterfaceAndIp(AddressFamily family = AddressFamily::Any,
+                      AddressScope scope = AddressScope::Any,
+                      MulticastInterface mcast = MulticastInterface::Any);
+
 } // namespace nfd::tests
 
 /** \brief Skip the rest of the test case if \p address is unavailable
diff --git a/tests/daemon/face/test-netif.cpp b/tests/daemon/face/test-netif.cpp
index 1a2752b..68b66cd 100644
--- a/tests/daemon/face/test-netif.cpp
+++ b/tests/daemon/face/test-netif.cpp
@@ -28,6 +28,9 @@
 
 namespace nfd::tests {
 
+using ndn::net::NetworkInterface;
+using ndn::net::NetworkMonitor;
+
 std::vector<shared_ptr<const NetworkInterface>>
 enumerateNetworkInterfaces(NetworkMonitor& netmon)
 {
diff --git a/tests/daemon/face/test-netif.hpp b/tests/daemon/face/test-netif.hpp
index a1e354e..9e32d60 100644
--- a/tests/daemon/face/test-netif.hpp
+++ b/tests/daemon/face/test-netif.hpp
@@ -28,30 +28,25 @@
 
 #include "core/common.hpp"
 
-#include <ndn-cxx/net/network-address.hpp>
 #include <ndn-cxx/net/network-interface.hpp>
 #include <ndn-cxx/net/network-monitor.hpp>
 
 namespace nfd::tests {
 
-using ndn::net::NetworkAddress;
-using ndn::net::NetworkInterface;
-using ndn::net::NetworkMonitor;
-
 /** \brief Enumerate network interfaces using the given NetworkMonitor
  *  \param netmon a NetworkMonitor constructed on the global io_service.
  *  \note This function is blocking
  *  \note Signals are supported if caller keeps \p netmon running
  */
-std::vector<shared_ptr<const NetworkInterface>>
-enumerateNetworkInterfaces(NetworkMonitor& netmon);
+std::vector<shared_ptr<const ndn::net::NetworkInterface>>
+enumerateNetworkInterfaces(ndn::net::NetworkMonitor& netmon);
 
 /** \brief Collect information about network interfaces
  *  \param allowCached if true, previously collected information can be returned
  *  \note This function is blocking if \p allowCached is false or no previous information exists
  *  \warning Signals are not triggered on returned NetworkInterfaces because NetworkMonitor is not running
  */
-std::vector<shared_ptr<const NetworkInterface>>
+std::vector<shared_ptr<const ndn::net::NetworkInterface>>
 collectNetworkInterfaces(bool allowCached = true);
 
 } // namespace nfd::tests
diff --git a/tests/daemon/face/transport-test-common.hpp b/tests/daemon/face/transport-test-common.hpp
index 34133a1..c257a04 100644
--- a/tests/daemon/face/transport-test-common.hpp
+++ b/tests/daemon/face/transport-test-common.hpp
@@ -61,29 +61,35 @@
 protected:
   IpTransportFixture()
   {
+    std::tie(interface, address) = getTestInterfaceAndIp(AF, AS, MC);
+
     BOOST_TEST_MESSAGE("Testing with AddressFamily=" << AF <<
                        " AddressScope=" << AS <<
                        " MulticastInterface=" << MC <<
-                       " TestIp=" << address);
+                       " TestInterface=" << (interface == nullptr ? "N/A" : interface->getName()) <<
+                       " TestIp=" << (address.is_unspecified() ? "N/A" : address.to_string()));
   }
 
-  [[nodiscard]] std::pair<bool, std::string>
+  [[nodiscard]] std::tuple<bool, std::string>
   checkPreconditions() const
   {
-    return {!address.is_unspecified(), "no appropriate IP address available"};
+    return {interface != nullptr && !address.is_unspecified(),
+            "no appropriate interface or IP address available"};
   }
 
   template<typename... Args>
   void
   initialize(Args&&... args)
   {
-    TransportFixtureBase::initialize(address, std::forward<Args>(args)...);
+    TransportFixtureBase::initialize(interface, address, std::forward<Args>(args)...);
   }
 
 protected:
   static constexpr AddressFamily addressFamily = AF;
   static constexpr AddressScope addressScope = AS;
-  const boost::asio::ip::address address = getTestIp(AF, AS, MC);
+
+  shared_ptr<const ndn::net::NetworkInterface> interface;
+  boost::asio::ip::address address;
 };
 
 } // namespace nfd::tests
diff --git a/tests/daemon/face/udp-channel.t.cpp b/tests/daemon/face/udp-channel.t.cpp
index d36e2f5..b95ac78 100644
--- a/tests/daemon/face/udp-channel.t.cpp
+++ b/tests/daemon/face/udp-channel.t.cpp
@@ -44,7 +44,7 @@
   SKIP_IF_IP_UNAVAILABLE(address);
   this->listen(address,1452);
 
-  auto ch1 = this->makeChannel(typename IpAddressFromFamily<F::value>::type(), 0, 1232);
+  auto ch1 = this->makeChannel(IpAddressTypeFromFamily<F::value>(), 0, 1232);
   connect(*ch1);
 
   BOOST_CHECK_EQUAL(this->limitedIo.run(2, 1_s), LimitedIo::EXCEED_OPS);
diff --git a/tests/daemon/face/udp-factory.t.cpp b/tests/daemon/face/udp-factory.t.cpp
index 5d9613e..41a5dfd 100644
--- a/tests/daemon/face/udp-factory.t.cpp
+++ b/tests/daemon/face/udp-factory.t.cpp
@@ -34,6 +34,7 @@
 
 using face::UdpChannel;
 using face::UdpFactory;
+using ndn::net::NetworkInterface;
 
 class UdpFactoryFixture : public FaceSystemFactoryFixture<UdpFactory>
 {
@@ -79,11 +80,11 @@
 
     if (localAddress.is_v4()) {
       BOOST_ASSERT(!netifsV4.empty());
-      return factory.createMulticastFace(netifsV4.front(), localAddress, mcastEndpoint);
+      return factory.createMulticastFace(*netifsV4.front(), localAddress, mcastEndpoint);
     }
     else {
       BOOST_ASSERT(!netifsV6.empty());
-      return factory.createMulticastFace(netifsV6.front(), localAddress, mcastEndpoint);
+      return factory.createMulticastFace(*netifsV6.front(), localAddress, mcastEndpoint);
     }
   }
 
@@ -120,7 +121,7 @@
   hasAddressFamily(const NetworkInterface& netif, ndn::net::AddressFamily af)
   {
     return std::any_of(netif.getNetworkAddresses().begin(), netif.getNetworkAddresses().end(),
-                       [af] (const NetworkAddress& a) { return a.getFamily() == af; });
+                       [af] (const auto& a) { return a.getFamily() == af; });
   }
 
   /** \brief determine whether a UDP multicast face is created on \p netif
@@ -130,7 +131,7 @@
   {
     auto ip = boost::asio::ip::address::from_string(face.getLocalUri().getHost());
     return std::any_of(netif.getNetworkAddresses().begin(), netif.getNetworkAddresses().end(),
-                       [ip] (const NetworkAddress& a) { return a.getIp() == ip; });
+                       [ip] (const auto& a) { return a.getIp() == ip; });
   }
 
 protected:
diff --git a/tests/daemon/face/unicast-ethernet-transport.t.cpp b/tests/daemon/face/unicast-ethernet-transport.t.cpp
index 54c262d..6e4dd6b 100644
--- a/tests/daemon/face/unicast-ethernet-transport.t.cpp
+++ b/tests/daemon/face/unicast-ethernet-transport.t.cpp
@@ -23,12 +23,12 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "transport-test-common.hpp"
-
 #include "ethernet-fixture.hpp"
 
 #include "common/global.hpp"
 
+#include "tests/daemon/face/transport-test-common.hpp"
+
 namespace nfd::tests {
 
 using namespace nfd::face;
diff --git a/tests/daemon/face/unicast-udp-transport-fixture.hpp b/tests/daemon/face/unicast-udp-transport-fixture.hpp
index e7fb76d..7ec4896 100644
--- a/tests/daemon/face/unicast-udp-transport-fixture.hpp
+++ b/tests/daemon/face/unicast-udp-transport-fixture.hpp
@@ -32,6 +32,7 @@
 #include "tests/test-common.hpp"
 #include "tests/daemon/limited-io.hpp"
 #include "tests/daemon/face/dummy-link-service.hpp"
+#include "tests/daemon/face/transport-test-common.hpp"
 
 namespace nfd::tests {
 
@@ -43,7 +44,7 @@
 {
 protected:
   void
-  initialize(ip::address address,
+  initialize(const shared_ptr<const ndn::net::NetworkInterface>&, const ip::address& address,
              ndn::nfd::FacePersistency persistency = ndn::nfd::FACE_PERSISTENCY_PERSISTENT)
   {
     udp::socket sock(g_io);
@@ -61,7 +62,7 @@
   }
 
   void
-  remoteConnect(ip::address address = ip::address_v4::loopback())
+  remoteConnect(const ip::address& address = ip::address_v4::loopback())
   {
     udp::endpoint remoteEp(address, 7070);
     remoteSocket.open(remoteEp.protocol());
diff --git a/tests/daemon/face/unicast-udp-transport.t.cpp b/tests/daemon/face/unicast-udp-transport.t.cpp
index bb5605e..e69904a 100644
--- a/tests/daemon/face/unicast-udp-transport.t.cpp
+++ b/tests/daemon/face/unicast-udp-transport.t.cpp
@@ -23,8 +23,6 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "transport-test-common.hpp"
-
 #include "unicast-udp-transport-fixture.hpp"
 
 #include <boost/mpl/vector.hpp>
diff --git a/tests/daemon/face/unix-stream-transport-fixture.hpp b/tests/daemon/face/unix-stream-transport-fixture.hpp
index 9603247..d95be2c 100644
--- a/tests/daemon/face/unix-stream-transport-fixture.hpp
+++ b/tests/daemon/face/unix-stream-transport-fixture.hpp
@@ -32,6 +32,7 @@
 #include "tests/test-common.hpp"
 #include "tests/daemon/limited-io.hpp"
 #include "tests/daemon/face/dummy-link-service.hpp"
+#include "tests/daemon/face/transport-test-common.hpp"
 
 #include <boost/filesystem.hpp>
 
@@ -87,7 +88,7 @@
   {
   }
 
-  std::pair<bool, std::string>
+  [[nodiscard]] std::tuple<bool, std::string>
   checkPreconditions() const
   {
     return {true, ""};
diff --git a/tests/daemon/face/unix-stream-transport.t.cpp b/tests/daemon/face/unix-stream-transport.t.cpp
index 41acb0b..692f601 100644
--- a/tests/daemon/face/unix-stream-transport.t.cpp
+++ b/tests/daemon/face/unix-stream-transport.t.cpp
@@ -23,8 +23,6 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "transport-test-common.hpp"
-
 #include "unix-stream-transport-fixture.hpp"
 
 namespace nfd::tests {
diff --git a/tests/daemon/face/websocket-channel.t.cpp b/tests/daemon/face/websocket-channel.t.cpp
index a396530..15d1a57 100644
--- a/tests/daemon/face/websocket-channel.t.cpp
+++ b/tests/daemon/face/websocket-channel.t.cpp
@@ -41,16 +41,14 @@
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(Uri, F, AddressFamilies)
 {
-  using Address = typename IpAddressFromFamily<F::value>::type;
-  websocket::Endpoint ep(Address::loopback(), 20070);
+  websocket::Endpoint ep(IpAddressTypeFromFamily<F::value>::loopback(), 20070);
   auto channel = this->makeChannel(ep.address(), ep.port());
   BOOST_CHECK_EQUAL(channel->getUri(), FaceUri(ep, "ws"));
 }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(Listen, F, AddressFamilies)
 {
-  using Address = typename IpAddressFromFamily<F::value>::type;
-  auto channel = this->makeChannel(Address());
+  auto channel = this->makeChannel(IpAddressTypeFromFamily<F::value>());
   BOOST_CHECK_EQUAL(channel->isListening(), false);
 
   channel->listen(nullptr);
diff --git a/tests/daemon/face/websocket-transport-fixture.hpp b/tests/daemon/face/websocket-transport-fixture.hpp
index 2e1e61e..eed4923 100644
--- a/tests/daemon/face/websocket-transport-fixture.hpp
+++ b/tests/daemon/face/websocket-transport-fixture.hpp
@@ -32,6 +32,7 @@
 #include "tests/test-common.hpp"
 #include "tests/daemon/limited-io.hpp"
 #include "tests/daemon/face/dummy-link-service.hpp"
+#include "tests/daemon/face/transport-test-common.hpp"
 
 namespace nfd::tests {
 
@@ -86,10 +87,12 @@
     client.connect(con);
   }
 
-  /** \brief initialize both server and client, and have each other connected, create Transport
+  /**
+   * \brief Initialize both server and client, and have each other connected, create Transport
    */
   void
-  initialize(ip::address address,
+  initialize(const shared_ptr<const ndn::net::NetworkInterface>&,
+             const ip::address& address,
              time::milliseconds pingInterval = 10_s,
              time::milliseconds pongTimeout = 1_s)
   {
diff --git a/tests/daemon/face/websocket-transport.t.cpp b/tests/daemon/face/websocket-transport.t.cpp
index e8733b2..23d15f0 100644
--- a/tests/daemon/face/websocket-transport.t.cpp
+++ b/tests/daemon/face/websocket-transport.t.cpp
@@ -23,8 +23,6 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "transport-test-common.hpp"
-
 #include "websocket-transport-fixture.hpp"
 
 #include <boost/mpl/vector.hpp>
@@ -67,7 +65,7 @@
   TRANSPORT_TEST_CHECK_PRECONDITIONS();
   auto mappedAddr = ip::address_v6::v4_mapped(this->address.to_v4());
   BOOST_REQUIRE(mappedAddr.is_v4_mapped());
-  WebSocketTransportFixture::initialize(mappedAddr);
+  WebSocketTransportFixture::initialize(this->interface, mappedAddr);
 
   checkStaticPropertiesInitialized(*this->transport);
 
