Hepatitis B tests detect substances that reflect a current or previous infection with hepatitis B virus (HBV). Some tests detect viral proteins (antigens) or the antibodies that are produced in response to an infection, while other types of tests detect or evaluate the genetic material (DNA) of the virus.