How early is to early to take a pregnancy test?

Sara • Would love another child
So I'n wondering if when Dr. tested me yesterday.I was having signs of a uti but they said it wasn't so she gave a pregnancy test too. It was a bfn but I'm only 7dpo. Im still having dull cramps and AF isn't due untill the 30 th. So confused? ??