On ground it is easy to test.
Sit cloaked in a corner far enough away, out of weapons range. Have the rest of the group scattered about, one member agro a group of enemies by proxy (don't shoot them) and watch what happens. Since everyone has 0 agro they will split up and attack random people, and yes they will find you, very far away sitting in a corner cloaked.
Second test is easy, in incursion make sure you have everyone assigned to a corner. Watch as patrols in your corner have your team mates targeting but not attacking. Run up beside enemy, agro by proxy and duck behind a corner... watch the enemy run across the entire map to go kill your team mate.
AI targeting in the game with 0 threat generated is buggy as anything, or when a team mate dies they'll split up and go after anyone.
In space, enemies 'see' you at 10KM. On ground, generally, enemies see you at around 20-25M.
And unless you attack first (instantly aggroing), it takes them a few seconds to actually attack you, usually.
At least from my experience
This is where the Sniper Rifle shines--it's the one weapon type having both a Primary and Secondary fire mode with a range outside of the enemies' perception range. If you use Aim mode (X key) and a Power Cell (and other buffs if you are Tac), then you can use the secondary fire mode to one-shot one of the weaker enemies in a group before they even realize that you are there.
How many Starfleet Engineers does it take to exchange an Anti-positronic Photon Emitter?