In general, you won't "test" (actually, in that meaning, a better word is check and probably statically check, related to static program analysis) by statically parsing the assembler without running the compiled program, because it is too difficult. However, you might have some testing scripts which parse the generated assembler for a given input program and check its structure (I don't think it is wise to do so...).
In practice, most compilers have an extensive test suite. If you are coding a compiler for some existing language (e.g. if you are coding a C compiler), you might try to reuse them (for example, GCC has a well established test suite that you could adapt to your compiler; some tests are indeed "parsing" the generated assembly or the emitted diagnostics).
However, look also at the CompCert project which is about a formally verified C compiler (an important part of that work is the formalization of the semantics of C and of the behavior of the compiler).
How can I test the generated assembly before the compiler is complete enough to do anything useful?
You probably cannot do that, except by manual inspection of that assembly code. You probably want to work to get, as quickly as possible, a tiny part of your language compilable (to some program that you could test). For example, you might decide to work hard to make the empty program compilable, then to make a 1 line single assignment program compilable, then to make some few tiny 5 lines programs compilable, etc... So your compiler would have a growing sequence of test suite.
You may want to compile your compiler with itself. This is a long tradition (and then the ability to compile your compiler is a strong test). Read about bootstrapping compilers (and look into J.Pitrat's blog about bootstrapping artificial intelligence; it has many interesting pages).
You could also base your compiler work above some "compiling" library like libgccjit or LLVM, or choose to compile to C (or to some other language, higher level than assembly). That could save you a lot of efforts.
Be aware that in practice, C compilers should be optimizing, and that is why it is hard to compete with existing compilers. See also this.
a
, something like a.globl a
.)void main() { extern int a; printf("a=%d\n",a); }
, whether also in assembly or compiled by a (more trusted) compiler.