Thank you for reaching out to us.
There is no constraint on taking a pregnancy test during the fast.
Please let us know if we can be of further assistance. You may find it helpful to arrange a free consultation with a Yoetzet Halacha Fertility Counselor, details
here.