The Fear takes effect when you become engaged in combat.
If your character runs up to and engages a target, whether or not your character attacks the target in that turn.
If an enemy runs up to your character and engages it, whether or not the enemy makes any attacks against your character that turn.
Engaging an enemy is as simple as getting a character adjacent to an enemy. Then you are engaged.
Adjacent meaning: close enough to smack 'im with a sword.
The Fear occurs immediatly and would occur before any attacks are made.
Following normal fear rules, once engaged with your character an enemy only takes the fear test once, even if the enemy disengages and then is re-engaged. If it passes the enemy is not going to be scared of you at any time in the combat, if failed you apply the shock table.
If your character increases his fear rating, even if an enemy succesfully passed a lower fear test. All enemies affected by the new, higher fear rating would have to take another test at the higher level.
Example, 3 enemies.
your character has terror be thy friend
1 was engaged and failed his fear test and shirked away from you.
2 was engaged and passed his fear test, nothing happens
3 was not engaged and did not take a fear test (because terror be they friend only works on engaged characters).
Your character uses some solo or squad mode ability and gains the Fear(1) trait. Fear traits stack, so your character now has normal Fear(1) and Fear(2) for any unit he engages. Following the above example:
1 is no longer engaged with your character so it does not take another fear test. It failed a Fear(1) test and will ignore any additional Fear(1) tests from the same source (but other Fear(1) sources can cause a new test).
2 is still engaged so he now has to take a Fear(2) test, since your character is now "more scary"
3 is still not engaged but must now take a Fear(1) test, since your character now has the normal Fear(1) aura due to its ability.
Had example #1 passed the Fear(1) test when engaged then disengaged before your character gained the additional fear he would be immune to any Fear(1) trait from any source. The character faced down something scary and only something "more scary" would affect it. If you fail a fear test though, you do not become immune to other fear traits of the same level (although multiples of identical Fear level enemies appearing at once would cause 1 test and the results applied to all visible enemies with that level of fear).
Another example is a blood angel with winged jump packs and terror be thy friend. He barges into a room, every enemy in the room has to take a Fear(1) test due to the Winged Jump Pack. He then engages an enemy who passed the Fear(1) test. This enemy must now take a Fear(2) test as terror be they friend stacks with the jump packs and the enemy is now facing a source of fear higher than the initial Fear(1), although the other enemies not engaged are still fine since terror be thy friend only works when engaged in melee.
Fear can be a little confusing until you get the knack of the mechanics, then its pretty simple.