Welcome to the forum.
No, there is no test for a computer, ECM, PCM, ECU.
They do run a self test when they power up each time you turn on the key.
CEL(check engine light) comes on for that self test, then will go off after engine starts if it passes the tests.
There are also some codes that will indicate internal computer issues.
Also if you hook up an OBD2 code reader/scanner and you can read codes and see live data then computer is working OK
As far as computer problems go, 99.999% of engine trouble will not be computer related, so long long shot.
90% of engine issues will be mechanical, not related to sensors or computer.
Vacuum leaks top the list when a vehicle approaches 10 years old
Wiring is also common issue as vehicle gets older