To differentiate between tests expressed in a form of source code, and tests expressed as manual instructions to be executed by humans, you can use the term “automated tests,” as opposed to “manual tests.” Both terms are frequently used, including in the debate about whether all tests should be automated or not.
When it comes to your second distinction, I'm not sure to understand what you mean by tests executed by an external machine. Unless there is some form of artificial intelligence, the external machine runs code, so it's exactly the same. If your intent is specifically to differentiate between tests coded by a developer versus tests run by an artificial intelligence system, you may use the term “test code.” I've never seen the term being used; at the same time, I've never seen any tests run by artificial intelligence either.
Don't combine both, however. “Automated test code” doesn't mean anything (or at least not what you are asking for; it would rather mean that the code which performs the test was somehow generated automatically).