sylph icon indicating copy to clipboard operation
sylph copied to clipboard

Add option to run tests in profile mode

Open vishna opened this issue 6 years ago • 4 comments
trafficstars

Currently all tests run in debug mode by default with no option to change it. My main goal using this library and AWS Device farm is collecting profiling reports.

vishna avatar Aug 28 '19 13:08 vishna

Should be possible to get working (pending no unexpected Device Farm issues). Haven't used profiling programmatically, so there's that. I assume you end-up with some log artifacts to include in the download from Device Farm.

If lucky, just adding the option to build in profile mode should be enough to get it going.

To help with my assumptions, can you describe a little about the workflow in your use case?

mmcc007 avatar Aug 28 '19 19:08 mmcc007

If lucky, just adding the option to build in profile mode should be enough to get it going.

This is how I run it locally:

flutter drive --profile --target=test_driver/app.dart

...any place in yaml where I could add this? 😃

vishna avatar Aug 29 '19 09:08 vishna

When running on device farm you're generally required to upload a signed .ipa or .apk. Found a way to get debug apps packaged as signed .ipa/.apk.

If the same packaging approach works for profile apps, then can move forward. Will have to do some manual testing on device farm to confirm that an app built in profile mode can run profile integration tests.

From there, can integrate into sylph.

Since profiling generates test artifacts, will require implementing #22.

So the profile workflow in sylph should look something like:

  1. Get profile config from config file Setting profile mode requires setting a flag and artifact dirname in config file
  2. Build and upload profile .ipa/.apk
  3. Run the integration tests on device farm The integration tests will gather profiling and write to a directory
  4. Download profiling artifacts

Does this workflow fit your use case? Any changes?

mmcc007 avatar Aug 29 '19 17:08 mmcc007

That's exactly what I'm going for.

vishna avatar Aug 30 '19 07:08 vishna