troybowman / ios_instruments_client

MIT License
185 stars 38 forks source link

XCUITest support #1

Closed umutuzgur closed 3 years ago

umutuzgur commented 5 years ago

Hi,

I just wanted to ask if we can implement xcuitest support? I think that would be amazing for iOS testers

troybowman commented 5 years ago

I would love to work on this, but it doesn't look easy and will likely require a lot of time.

If I make any progress on it (even just some preliminary exploration) I'll be sure to let you know!

tweibro23 commented 5 years ago

Does this amazing tool support to get the performance(e.g: memory/cpu/fps...) of the App processes running on the iPhone?

troybowman commented 5 years ago

No, not currently. It does seem possible to extend the current functionality to support this, but it will require more work.

YY-Wei commented 5 years ago

1.Does this tool support to kill iOS App with the Bundle ID? 2.Looking forward to supporting to get performance data of processes,this tool is wonderful.

troybowman commented 5 years ago

@YY-Wei you cannot kill an iOS app directly with the bundle ID, you will have to use multiple steps.

For instance, if you want to kill the app with bundle ID "com.facebook.Facebook" you can do this:

  1. ./ios_instruments_client applist > /tmp/applist.txt

  2. in applist.txt, there should be a description of the Facebook app that contains something like:

    ContainerBundleIdentifier = "com.facebook.Facebook"; DisplayName = Facebook;

  3. Use the DisplayName to find the PID:

    ./ios_instruments_client proclist | grep Facebook 1494 Facebook

  4. ./ios_instruments_client kill 1494

If you take a look at the source code, it should be fairly straightforward to extend the "kill" phase to accept a bundle ID, look up the DisplayName, and kill the process automatically.

YY-Wei commented 5 years ago

@YY-Wei you cannot kill an iOS app directly with the bundle ID, you will have to use multiple steps.

For instance, if you want to kill the app with bundle ID "com.facebook.Facebook" you can do this:

  1. ./ios_instruments_client applist > /tmp/applist.txt
  2. in applist.txt, there should be a description of the Facebook app that contains something like: ContainerBundleIdentifier = "com.facebook.Facebook"; DisplayName = Facebook;
  3. Use the DisplayName to find the PID: ./ios_instruments_client proclist | grep Facebook 1494 Facebook
  4. ./ios_instruments_client kill 1494

If you take a look at the source code, it should be fairly straightforward to extend the "kill" phase to accept a bundle ID, look up the DisplayName, and kill the process automatically.

Thank you very much for your detailed reply!