E
Ethan Strauss
Hi,
I have a method which produces a random DNA sequence. I would like to
write a unit test for it, but can't quite figure out what makes sense. It is
easy to test that a DNA sequence is produced. What I can't figure is
randomness. By it's very nature random is random. I have written a simple
test that generates 500 sequences and checks that none of them are the same.
That works, but seems very weak besides, if the sequences are truly random,
the same one should be generated occasionally. I can imagine that I could
create thousands of sequences and then do statistics on them to see if they
are random, but I don't want to go there. Any other thoughts about what to
do?
Thanks!
Ethan
I have a method which produces a random DNA sequence. I would like to
write a unit test for it, but can't quite figure out what makes sense. It is
easy to test that a DNA sequence is produced. What I can't figure is
randomness. By it's very nature random is random. I have written a simple
test that generates 500 sequences and checks that none of them are the same.
That works, but seems very weak besides, if the sequences are truly random,
the same one should be generated occasionally. I can imagine that I could
create thousands of sequences and then do statistics on them to see if they
are random, but I don't want to go there. Any other thoughts about what to
do?
Thanks!
Ethan