Integration tests for kscreenlocker are in the [kwin repository](https://invent.kde.org/plasma/kwin/-/blob/master/autotests/integration/lockscreen.cpp).