We introduce a kernel-based two-sample test for comparing probability distributions up to group actions. Our construction yields invariant kernels for locally compact $σ$-compact groups and extends classical Haar-based approaches beyond the compact setting. The resulting invariant Maximum Mean Discrepancy (MMD) test is developed in a general framework where the sample space is assumed to be Polish. Under natural conditions, the invariant kernel induces a characteristic kernel on the quotient space, ensuring consistency of the associated MMD test. The method is well suited to functional data, where invariances such as temporal shifts arise naturally, and its effectiveness is illustrated through simulation studies.