urine or blood?

Is a beta hCG test done through urine or blood work?