Introduction

MSM communities are at high risk for HIV infection, with an infection risk that is 28 times greater than that of other adult men [1]. From 0.23 cases per 100,000 people in 2004 to 4.2 cases per 100,000 people in 2017, China has an upsurge in the prevalence of HIV [2]. For both public health detection and prevention, HIV testing is crucial. The effectiveness of routine HIV testing in lowering HIV infection rates in MSM populations has been demonstrated [3,4,5,6]. The main factors influencing the willingness to test for HIV in the MSM population are knowledge, sexual behavior, positive attitudes, and risk perception [7,8,9,10]. Additionally, HIV testing intention has a significant impact on the promotion of HIV testing among MSM, making this a worthwhile research issue [11]. Therefore, based on the KAB theory, we analyzed the influence of knowledge, attitude, and behavior on HIV testing willingness using SEM.

Methods

Research subjects

The non-probability sampling strategy was employed in this study to seek MSM volunteers in Chongqing and Sichuan through non-governmental organization (NGO) collaboration, peer referral and “snowballing” of core members, voluntary counseling and testing (VCT) clinics, and online channels like QQ and WeChat. After obtaining informed consent from the volunteers, a structured electronic questionnaire was distributed to the volunteers by the staff and then collected uniformly.

Measures

Sociodemographic characteristics include age, household registration, ethnicity, educational level, employment status, marital status, and monthly disposable income. Based on previous literature, 13 observational variables were identified to measure knowledge of HIV [12]. Attitude was measured using four observed variables (i.e., “Getting tested for HIV helps people feel better”). Five variables were observed in behavior (i.e., drug usage).

Statistical analysis

SAS version 9.4 was used for data collation and univariate analysis. Categorical data were described in frequencies and percentages, while continuous variables were expressed as means and standard deviations (SD). The chi-square test was used to compare differences between groups. The data were modeled and analyzed using MPLUS version 8.3 for structural equations. The variables with statistical significance (p < 0.05) were selected to construct the model.

Results

1687 MSM in total met the study’s eligibility requirements. The participants’ average age was 29 (SD = 8.02) years old. A total of 964 (57.1%) MSM indicated a willingness to test in the next 6 months. Testing willingness varied by age, household registration, education level, employment status, and monthly disposable income (Table 1). The mean age of participants who were willing to test was 29.65(SD = 8.15), while those who did not intend to test for HIV in the future had a mean age of 27.85(SD = 7.71).

Table 1 Testing willingness of MSM with different demographic characteristics (n = 1687)

The testing willingness of MSM with different knowledge, attitudes, behaviors is shown in Table 2. MSM who answered correctly were more likely to be tested for HIV than those who answered incorrectly. The vast majority of participants in our study had a positive view of HIV testing. For MSM, willingness to undergo HIV testing increases with the perceived benefits of HIV testing. Higher HIV testing intentions were reported by MSM with several sexual partners in the previous six months, no drug use, no commercial sex activity, and no STDs.

Table 2 Testing willingness of MSM with different knowledge, attitude, behavior. (n = 1687)

Structural equation model

Figure 1 presents the results from the modified structural equation modeling. The fit indices show that the hypothesized model fit the data acceptably well (CFI = 0.99, TLI = 0.99 RMSEA = 0.04, SRMR = 0.02, and Chi-square/df = 4.2). Knowledge affected HIV testing willingness mainly by changing attitudes, and the standardized indirect effect was 0.19. The standardized direct effect of attitude on willingness to test for HIV was 0.22. The direct effect of behavior on HIV testing willingness was 0.13.

Fig. 1
figure 1

Modified structural equation model of HIV testing willingness. Note: A solid line indicates that the relationship is statistically significant (p < 0.05), and a dashed line indicates that the relationship had no statistical significance (p > 0.05). *** indicated statistical significance with p < 0.001

Discussion

Our study found that MSM had a moderate level of willingness to participate in HIV testing. 57.1% of MSM expressed willingness to be tested for HIV in the next 6 months. A high level of HIV-related knowledge could help MSM establish a correct HIV risk perception and make them aware of the benefits of HIV testing, thus increasing their willingness to test for HIV, according to structural equation modeling. The positive effect of MSM’s HIV knowledge on willingness to test was primarily indirect through its effect on attitude, the study found. This was in line with earlier research, which found that higher levels of knowledge were strongly linked to more optimistic attitudes and that MSM who were more aware of HIV/AIDS were more likely to be open to getting tested for the virus [13, 14]. It is recommended that the government actively take effective measures to strengthen HIV knowledge and enrich the content of HIV knowledge so that high-risk groups with relatively low knowledge can understand the necessity and importance of HIV testing.

Attitude had the greatest impact on willingness to test for HIV. Our findings showed that MSM with a greater perceived benefit of HIV testing had a higher willingness to test. Positive, accurate HIV testing beliefs can, to some extent, influence MSM’s HIV testing habits. But the development of beliefs must take place over time. In order for high-risk people to acquire positive and accurate concepts to raise testing rates, national authorities should continue to push knowledge about the necessity, importance, and benefits of HIV testing.

Consistent with previous findings, our study showed that MSM with high-risk sexual behaviors have a lower willingness to test for HIV [15,16,17]. As a result, MSM who engage in hazardous sexual activity and are sexually active should be the focus of HIV prevention education, which is essential for lowering HIV incidence. There were limitations to this study. Firstly, this study asked about sensitive topics and behaviors in the past 6 months, which may have been affected by reporting bias and recall bias. Secondly, because participants were recruited in Chongqing, Sichuan, the obtained results may not be generalizable to all MSM with HIV.

Conclusion

In our study, more than half of the MSM agreed to have an HIV test. We suggested that a series of measures targeting HIV awareness, high-risk sexual behavior, and attitude development should be taken to increase the willingness of the MSM population to test for HIV.