Background. Primary care is an important provider of sexual health care in England. We sought to explore the extent of testing for chlamydia and HIV in general practice and its relation to associated measures of sexual health in two contrasting geographical settings. Methods. We analysed chlamydia and HIV testing data from 64 general practices and one genitourinary medicine (GUM) clinic in Brent (from mid-2003 to mid-2006) and 143 general practices and two GUM clinics in Avon (2004). We examined associations between practice testing status, practice characteristics and hypothesised markers of population need (area level teenage conception rates and Index of Multiple Deprivation, IMD scores). Results. No HIV or chlamydia testing was done in 19% (12/64) of general practices in Brent, compared to 2.1% (3/143) in Avon. In Brent, the mean age of general practitioners (GPs) in Brent practices that tested for chlamydia or HIV was lower than in those that had not conducted testing. Practices where no HIV testing was done had slightly higher local teenage conception rates (median 23.5 vs. 17.4/1000 women aged 15-44, p = 0.07) and served more deprived areas (median IMD score 27.1 vs. 21.8, p = 0.05). Mean yearly chlamydia and HIV testing rates, in practices that did test were 33.2 and 0.6 (per 1000 patients aged 15-44 years) in Brent, and 34.1 and 10.3 in Avon, respectively. In Brent practices only 20% of chlamydia tests were conducted in patients aged under 25 years, compared with 39% in Avon. Conclusions. There are substantial geographical differences in the intensity of chlamydia and HIV testing in general practice. Interventions to facilitate sexually transmitted infection and HIV testing in general practice are needed to improve access to effective sexual health care. The use of routinely-collected laboratory, practice-level and demographic data for monitoring sexual health service provision and informing service planning should be more widely evaluated.