ABSTRACT There is a growing body of literature that recognizes the importance of test anxiety in learning contexts. However, currently little is known about test anxiety experienced in online assessment and its role in online learning efforts and outcomes based on insights from Learning Management Systems (LMS) interaction data. This study investigated the mediating role of test anxiety in the relationship between behavioral engagement and academic achievement. To test the research model, the study data were analyzed using the Partial Least Squares Structural Equation Modelling approach. The analyses drew on data from 2994 online distance learners. Behavioral engagement of students was derived from learning analytics indicators based on LMS interaction data. Our results showed that test anxiety reduces the positive effect of online behavioral engagement on academic achievement. This study provides valuable insights for educators, students, and test designers in understanding the dynamics between online test anxiety, behavioral engagement and academic achievement and developing effective strategies for online learning. This analysis highlights the importance of understanding the interplay between these factors for educators, students, and test designers to develop effective online learning strategies.