Let $X$ be an oriented closed connected surface. The set of group representations from the fundamental group of $X$ to an algebraic group $G$ has a structure of an algebraic variety. This variety is called the $G$-representation variety of $X$. In this talk, I will use a geometric method developed by González-Prieto, Logares, Muñoz, and Newstead to compute the virtual classes of $G$-representation varieties where $G$ is the group of complex upper-triangular matrices of rank 2, 3, or 4. This is joint work with Jesse Vogel.