google / EarlGrey

:tea: iOS UI Automation Test Framework
http://google.github.io/EarlGrey/
Apache License 2.0
5.62k stars 744 forks source link

Add the ability to ignore activity from certain classes #358

Open samhann opened 7 years ago

samhann commented 7 years ago

I have an analytics SDK that turns itself on by default. Its hard to make it completely idle. Also there are a lot of processes going on in the background.

It would help if there was a regex that said ignore timer activity in these classes.

khandpur commented 7 years ago

Hey Samhan, could you clarify a few things:

Its hard to make it completely idle

Are you referring to network activity?

It would help if there was a regex that said ignore timer activity in these classes.

As in NSTimer, cfrunlooptimer or gcd timer?

samhann commented 7 years ago

The analytics library itself is using an NSTimer to poll for something even though it doesn't always send something.

This can happen in various ways.

So a regex saying ... If the invocation is from class X or Y or Z ignore it would be useful.

sid-github commented 7 years ago

Hey Samhan you could try adjusting GREYConfiguration value for kGREYConfigKeyNSTimerMaxTrackableInterval as a possible workaround.

see https://github.com/google/EarlGrey/blob/d9eb1bc9b25569ec2384a217c008a3cc68ea2c1f/EarlGrey/Common/GREYConfiguration.h#L71

On Wed, Dec 14, 2016 at 9:26 PM, Samhan Salahuddin <notifications@github.com

wrote:

The analytics library itself is using an NSTimer to poll for something even though it doesn't always send something.

This can happen in various ways.

So a regex saying ... If the invocation is from class X or Y or Z ignore it would be useful.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/google/EarlGrey/issues/358#issuecomment-267242211, or mute the thread https://github.com/notifications/unsubscribe-auth/AOMCo-7r9eDRC6pT9kWsHUG13PGMYTsFks5rIM-FgaJpZM4LCPuB .

-- Siddartha (Sid) | Software Engineer, Tools and Infrastructure | 972-965-5567