This question was moved from health, so I am not a doctor, but I can tell you that if the child looks like you or you and your boyfriend, there would be no way to tell aside from a blood test.
Do you think that your bf suspected that you cheated?
How can you be sure that it's not his?
It's not an easy situation. You can look back and say maybe I should have used protection, maybe I shouldn't have done it, but what's done is done. The fact is, you can't be 100% positive that it's not his until the child is born, or unless you hadn't slept with him because pregnancy dates can be off by a week or more.
When the child is born, you are going to want to get a dna test done, if for no other reason than to be sure in your own heart. Now whether or not you sneak and get the dna from both guys, and send it into an online dna testing lab, or you come out and tell your bf that you are not sure is up to you. I know you think that it might cause the two of you to break up, but you have to balance that with possibly living with a lie.
Overall, it's a decision you have to give a lot of thought to. The child deserves to know who his real father is, regardless of how good a father you think he will be. The father also deserves to know if it is his son, or if it's not his son. I know you are very afraid right now, and when we are afraid, it's very hard to think straight. No one can tell you what to do, you have to do what you think is best for your child.
I welcome your thoughts, let me know if you want to talk more