adb – How to find PID of test runner

I have my app and my tests saved as following:

App package name: com.my.app
Test runner: com.my.app.test

When I run the app by itself, I can use adb to see the pid of my app: adb shell ps | grep com.my.app

u0_a839      14710  1044 41927360 714352 0                  0 S com.my.app

When I run my app with automation, I tried calling the same adb command while the tests were running: adb shell ps | grep com.my.app.test
But nothing shows up.