[Ns-developers] improving regression tests of ns-3
Gustavo Carneiro
gjcarneiro at gmail.com
Wed Mar 19 17:40:05 PDT 2008
On 20/03/2008, Mathieu Lacage <mathieu.lacage at sophia.inria.fr> wrote:
>
>
> On Wed, 2008-03-19 at 23:39 +0000, Gustavo Carneiro wrote:
>
> >
> > In src/internet-node/udp-socket.cc you will find already some unit
> > tests of higher layers, UDP sockets in this case. I implemented it
> > using PointToPointNetDevices connecting some nodes. I think it works
>
>
> yes, I know.
>
>
> > well, and to be honest I don't completely understand why a new
> > special netdevice is needed just for unit testing. I mean,
> > PointToPointNetDevice is deterministic, so it should be more than
> > enough for any kind of unit testing...
>
>
> the problem is that the module 'internet-node' is not supposed to depend
> on the 'point-to-point' module. Furthermore, for the sake of writing
> tests, I would like to test only what I am interested in, not some other
> random piece of code like PointToPointNetDevice. i.e., I would like to
> isolate the different components of the system to avoid testing
> unrelated pieces when I really want to test UdpSocket.
Well, you'll still be testing SimpleNetDevice anyway... you can't run away
from testing other things. I'm not sure SimpleNetDevice will be that much
simpler than PointToPointNetDevice. But if you really want it, well, it's
your work.. :-)
You make a good point about internet-node depending on point-to-point. I am
to blame, but I hate that.
--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
More information about the Ns-developers
mailing list