"On Friday". Normally next Friday. It could be also the Friday which occurs within a given context ("I'll visit for Christmas day and then see you on Friday" would mean the Friday after Christmas).
"On a Friday". On some day which is a Friday, but not stating which.
"We will have a test the next week". This only makes sense if there is already a context. Hence:
"We will be studying calculus until the 8th of February. We will have a test the next week". means there will be a test some time in the period 9th-15th of February.
With a stated context, the the anchors the timeframe to that context. Otherwise it could be unclear whether "next week" mean "next after what we just discussed" or "next after now".
"We will have a test next week". Means the week after now.