To some extent it depends on the actual goal. Is this intended as a test harness for an app in a controlled environment? Or as a means of automation on a desktop?
Faking udev ought to work across different compositors. The virtual keyboard extensions might work for some compositors but different compositors support different protocol extensions. (E.g. Mir supports virtual_keyboard_unstable_v1 but not org_kde_kwin_fake_input.)
If this is just for an application test harness, then it should be possible to test against a specific, even a bespoke, compositor.
This could be complicated for most people I know as they have employers, and work (especially paid) outside that raises contract concerns.
Maybe ask on the wayland-devel mailing list?