It could be either of them.
In my case, test invite came by email, and the oath invite came by mail (despite that after the interview the officer said i'll get it the same way that I got the test invite).
In case of my wife, she got them both by email.